Skip to content

Instantly share code, notes, and snippets.

@inem
Created August 23, 2009 15:57
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 inem/173339 to your computer and use it in GitHub Desktop.
Save inem/173339 to your computer and use it in GitHub Desktop.
# Controller
def jazz_party
@humans = Human.all[0..1]
respond_to do |format|
format.json { }
end
end
#View (jazz_party.json.jazz)
-@humans => people
:only
.name => login
:code => enhanced_name
name + "!!!"
:code => hello_world
"Hello world!"
+pets => animals
:except
.human_id
.pet_type_id
+toys
:methods
.railsize("We ","are happy ","to code ","with power of X ","and Y")
<pet_type
:only
.class_name => pet_type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment