trestle
trestle copied to clipboard
Just exclude a field
Hi,
I would like to use the automatic generated fields in table, forms, etc.
BUT, I would like to exclude just a couple of fields.
Is there any way I can do this without need to define every field again and again?
Thanks in advance
I'm encountering the same issue. This might be something cool to implement.
I'm thinking something along the lines of EXCLUDED_ADMIN = [:created_at, :updated_at]
and it uses something like Model.column_names.except(::EXCLUDED_ADMIN)
and then iterates over the column names creating the form and the columns in a base class and inherits from the base class.