-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can I globaly change the output format types ? #336
Comments
On dates and times and all that, RABL is just calling
and then:
Purely aircoded so it may not work exactly, but the gist is there. Also you could overwrite to_json on Time:
|
Closing. If still a question or problem, please reopen. |
When using oj with rabl, you'd better override class ActiveSupport::TimeWithZone
def as_json
iso8601(6)
end
end It took me awhile to find this, so I thought it's worth sharing it here. |
Hi!
I am getting
For date time fields. Is there a way to change the output format fro all DateTime attributes? What If I want a format like "2012-08-21 22:29:38 UTC" but for all DateTimes in all my templates.
Could it be done per class type?
Thaks
The text was updated successfully, but these errors were encountered: