Add +as_json+ method to Attachment class
The +as_json+ method enables Attachment objects to be rendered as JSON by Rails' JSON rendering framework. The Attachment object is not a native ActiveRecord attribute, but it can be accessed via the +:methods+ option provided to the +to_json+ method.
Showing
Please
register
or
sign in
to comment