Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/administrate_exportable/exporter_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ def record_attribute(record, attribute_key, attribute_type)
field.truncate
when Administrate::Field::Time.to_s
field.data.strftime("%I:%M%p").to_s if field.data
when Administrate::Field::JSONB.to_s
field.to_json
else
field.to_s
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does field.to_s below produce the same output?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I get an Administrate object.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then this fix would make sense to me. Would this need to be included as a dependency?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, yes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then I'm not sure it makes sense to do.

end
Expand Down