Sort items passed in.

I have this on one of my views. Can anyone here help me figure out how I can sort the data that is being passed in? Is there a method like .sort? if so... where can it go? Sorry, I've tried multiple things and I can't figure this out :/

<% fields = %w(title description) <% sortable = %w(title) = render :partial => 'shared/index', :locals => { :klass => PermissionGroup, :objects => @permission_groups, :fields => fields, :sortable => sortable }

Leave a Comment