Hey all,
I am trying to list students in alphabetical order starting from
a to z but using search logic I unable to do that. can any one help me out.
These lines are in controller
@search = Student.search(params[:search])
@[email protected]
View
<% @students= @students.sort_by(&:last_name) %>
i am able to sort it but not in alphabetical order. Help me
Cheers,
Kp
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
To view this discussion on the web visit
https://groups.google.com/d/msg/rubyonrails-talk/-/Rj9Qh0KXBWkJ.
For more options, visit https://groups.google.com/groups/opt_out.