Skip to content

Instantly share code, notes, and snippets.

@softwaregravy
Created March 13, 2011 20:30
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 softwaregravy/868409 to your computer and use it in GitHub Desktop.
Save softwaregravy/868409 to your computer and use it in GitHub Desktop.
def serializable_hash(options = {})
my_options = {:except => [:id, :category, :draws, :owner_identifier, :owner_reference_data,
:primary_image, :related_data, :created_at, :updated_at, :creating_user_id ],
:include => []}.merge(options ||= {})
s = serializable_hash(my_options)
s["address"] = address.serializable_hash_for_public(options)
s
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment