RJS Cheat Sheet - Code Examples Source: RJS Templates for Rails 1 <<(javascript) Writes raw JavaScript to the page. [](id) # Ruby code page['header'].show // Generated JavaScript $("header").show(); # Ruby code page['header'].first.second // Generated JavaScript $("header").first().second(); assign(variable, value) # Ruby code page.assign 'name', { :first => "Alex", :last => "Nesbitt" } // Generat