attachment_test.rb
44.2 KB
-
Add +as_json+ method to Attachment class · 4ea2de63
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.
Ehren Kret committed