trestle icon indicating copy to clipboard operation
trestle copied to clipboard

Just exclude a field

Open paulocheque opened this issue 6 years ago • 1 comments

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

paulocheque avatar Apr 11 '19 03:04 paulocheque

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.

JamesDullaghan avatar Jan 16 '22 22:01 JamesDullaghan