Skip to content

Instantly share code, notes, and snippets.

@eriknomitch
Created May 3, 2013 23:30
Show Gist options
  • Save eriknomitch/5515113 to your computer and use it in GitHub Desktop.
Save eriknomitch/5515113 to your computer and use it in GitHub Desktop.
as_json
def as_json(options = {})
json = super(options)
[:follow_status, :other_thing].each do |attr|
json[attr.to_s] = options[attr].send(attr, self) if options[attr]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment