Problem with Sortable Table Columns

Hey everybody,
i’ve got a really nerving problem with sorting table columns, which i
cant solve by myself. So i need your help.

I follwed all steps as showed in this railscast:

and it worked very well.

BUT as i restated my app i get this stupid error message:

NoMethodError in GroupsController#index

You have a nil object when you didn’t expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.+

RAILS_ROOT: c:/Users/Vennil/rails/gruppenmanager
Application Trace | Framework Trace | Full Trace


Why the hell does it worked before and not now? Any ideas?

Many thanks in advance!


EDIT: Oh i forgotten to post my Modelline:

12| @users = User.find(:all, :order => sort_column + " " +

12| @users = User.find(:all, :order => sort_column + " " +

Well, which value is null, sort_column or sort_direction?

Oftentimes, I’ve seen code that sets the direction for descending, but
not ascending, which might be your issue.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs