You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to rails...@googlegroups.com
Hey everyone. I'm trying to do something seemingly simple and can't figure it out.
An article belongs to a state. When editing the article, I want the states list to be in alphabetical order (by :name). But they are appearing by :id desc.
I have tried
setting a default_scope on the state model to order(:name)
overriding the column in rails admin config (see below)
config.model Article do
list do; end
export do; end
show do; end
edit do
field :title
field :state do
sortable :name
end
field :school
...
end
create do; end
update do; end
end
No matter what I do, the states always appear id desc.