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@example.com
<% @students= @students.sort_by(&:last_name) %>
i am able to sort it but not in alphabetical order. Help me