Method: Valkyrie::Persistence::Postgres::ResourceConverter#attributes
- Defined in:
- lib/valkyrie/persistence/postgres/resource_converter.rb
#attributes ⇒ Hash
Convert attributes to all be arrays to better enable querying and “changing of minds” later on.
43 44 45 46 47 48 49 |
# File 'lib/valkyrie/persistence/postgres/resource_converter.rb', line 43 def attributes Hash[ resource.attributes.except(:id, :internal_resource, :created_at, :updated_at).compact.map do |k, v| [k, Array.wrap(v)] end ] end |