Created
April 12, 2009 13:03
-
-
Save inem/93992 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Operation < ActiveRecord::Base | |
def best | |
created_at | |
end | |
def test(b) | |
"*#{b}*" | |
end | |
end | |
Operation.last.to_json(:methods => [{:test => "aa"}, :best], :only => :id) | |
=> "{"message": {"test": "*aa*", "id": 19, "best": "2009-04-12T05:44:53Z"}}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment