I’m trying to render a json from an ActiveRecord::Base object, including paperclip‘s methods.
> i = Model.last
> i.to_json methods: :picture
=> # Successful output
Problem is, I need .picture.url(:tiny) and to_json methods: 'picture.url(:tiny)' doesn’t work. Is there a way to make to_json work or I’ll have to work this around other way?
in your picture model, create a method called
picture_avatarthen use that method to pass to
to_json