Skip to content

Instantly share code, notes, and snippets.

@smsohan
Created September 18, 2013 00:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smsohan/6602725 to your computer and use it in GitHub Desktop.
Save smsohan/6602725 to your computer and use it in GitHub Desktop.
class MyModel < ActiveRecord::Base
def weather
"cloudy"
end
def as_json(options = {})
super(options.merge(methods: weather))
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment