ruby-on-railsfieldrails-admin

rails_admin show all field in list except one field


In rails_admin gem i have a model with some field. In list action is possible to view all field except one field? if i write:

rails_admin do
 list do
   field :name
 end
end

I see only this field, i need the inverse behavior. I have found no solutions

#somethis like this
rails_admin do
 list do
   field :default , except :created_at
 end
end

can you help me?

A possible workaround is list all necessary field, but is not very clean in my opinion

SOLUTION this works for me:

list do
      exclude_fields :created_at
end

Solution

  • "Once in add specified fields mode, you can exclude some specific fields with exclude_fields & exclude_fields_if:"

    https://github.com/railsadminteam/rails_admin/wiki/Fields#exclusion

    example:

    rails_admin do
     list do
       field :default
     end
    
       exclude_fields :created_at
    end