Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Bridging The Gap

Bridging The Gap

A talk on how Ruby developers can leverage ExecJS and other tools to improve their repertoire of skills.

Darcy Laycock

November 13, 2011
Tweet

More Decks by Darcy Laycock

Other Decks in Programming

Transcript

  1. RJS

  2. render :update do |page| # Update the list of users

    via JavaScript page.replace_html 'user_list', :partial => 'user', :collection => @users # Now, highlight said list. page.visual_effect :highlight, 'user_list' end
  3. it "can directly embed ruby values into javascript" do @cxt["bar"]

    = 9 @cxt['foo'] = "bar" @cxt['num'] = 3.14 @cxt['trU'] = true @cxt['falls'] = false @cxt.eval("bar + 10").should be(19) @cxt.eval('foo').should == "bar" @cxt.eval('num').should == 3.14 @cxt.eval('trU').should be(true) @cxt.eval('falls').should be(false) end