I am using the Ransack gem in my Rails application. It is working as expected, but how can I reorder the list of attributes in the dropdown box for the attribute select? Unfortunately for me, "Name" of the User is near the bottom of the list, when ideally it would be at the top.
.field
= f.attribute_fields do |a|
= a.attribute_select associations: [:terms, :contact_informations, :educational_experiences, :home_towns, :local_residences, :permanent_addresses, :emergency_contact_informations]
The above is my current attribute_select, right now it lists all of the Users attributes, then attributes for each of the associations. In my models, I am using the following to filter out some of the attributes.
def self.ransackable_attributes(auth_object = nil)
super - ['id', 'first_name', 'middle_name', 'last_name', 'created_at', 'updated_at', 'encrypted_password', 'reset_password_token', 'reset_password_sent_at', 'remember_created_at',
'sign_in_count', 'current_sign_in_at', 'last_sign_in_at', 'current_sign_in_ip', 'last_sign_in_ip']
end