Let's say I have an Foo ActiveRecord model with fields foo_id, foo_name and foo_description.

After doing something like

@foo = Foo.find(1)

Is there any method "model_fields" such that: @foo.model_fields() would return the array:

["foo_id", "foo_name", "foo_description"] ?

Thanks for the help.

Edit
Report