ruby on rails - How to sort RailsAdmin dropdown (while editing an object)? -
i using railsadmin gem , if model has belongs_to association. shows dropdown.
this dropdown searchable, it's not sorted.
is there way sort it?
i saw way sort column railsadmin list. however, haven't seen way sort dropdown.
as far i'm aware, way order records in drop down, configuring rails_admin list of model has_many association. example:
class thing belongs_to :thing_category end class thingcategory has_many :things rails_admin list sort_by :column_name end end end
unfortunately, orders both list view (in dashboard), , drop down. i'm not sure there's way around that.
more info here: https://github.com/sferik/rails_admin/wiki/list
Comments
Post a Comment