Created
October 31, 2013 16:58
-
-
Save reedlaw/7253177 to your computer and use it in GitHub Desktop.
Request and response model
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 Request < Hashie::Mash | |
def object_attributes | |
self[:object_attributes].to_hash.with_indifferent_access | |
end | |
end | |
class Response < Hashie::Mash | |
def persisted? | |
!id.nil? | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment