durgesh
(durgesh)
April 21, 2008, 8:02am
1
Hi guys!
I am still not able to get the sorting onclick of the table headers
to work...
I get this error:
NoMethodError in PeopleController#index
You have a nil object when you didn't expect it!
You might have expected an instance of ActiveRecord::Base.
The error occurred while evaluating nil.
RAILS_ROOT: C:/ruby/contact
Application Trace | Framework Trace | Full Trace
app/helpers/sort_helper.rb:104:in `sort'
app/controllers/people_controller.rb:19:in `index'
app/controllers/people_controller.rb:18:in `sort'
app/controllers/people_controller.rb:18:in `index'
This is my code:
controller.rb
11175
(-- --)
April 21, 2008, 8:10am
2
controller.rb
helper :sort
# include SortHelper
try to comment include SortHelper, tell me what's going on?
reinhart
http://teapoci.blogspot.com
durgesh
(durgesh)
April 21, 2008, 8:53am
3
well, after commenting, i get the same error...
durgesh
(durgesh)
April 21, 2008, 8:55am
4
well, i get the same error even after commenting the code
11175
(-- --)
April 21, 2008, 9:14am
5
Bro you run it in PeopleController or PersonController, please check it
back because i see your script is person not people in your commented
code for view in helper. And also check your config/route.rb to ensure
your controller name.
Reinhart
durgesh
(durgesh)
April 21, 2008, 10:57am
6
yes, i confirmed, it is peoplecontroller, and i have used
peoplecontroller itself, yet i am getting the error...what could be
the mistake?