How do I get from a Ruby model all attributes or column_names which belong to a certain class (that is, which have a certain column type in the database)?
E.g.:
-Get all column_names belonging to class ActiveSupport::TimeWithZone from following Model having fields:
:id
:order_id String
:slot_id Integer
:delivery_date TimeWithZone
:packed_date TimeWithZone
:created_at TimeWithZone
:updated_at TimeWithZone
-Output:
['created_at','updated_at','delivery_date','packed_date']