Skip to content

Instantly share code, notes, and snippets.

@reedlaw
Created October 31, 2013 16:58
Show Gist options
  • Save reedlaw/7253177 to your computer and use it in GitHub Desktop.
Save reedlaw/7253177 to your computer and use it in GitHub Desktop.
Request and response model
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