30 Aug '15, 4pm

Passing #ruby variables to javascript function in #rails view

I'm wondering what the best practice is for passing variables to JavaScript functions in a rails view. Right now I'm doing something like: <% content_for :javascript do %> <script type="text/javascript"> Event.observe(window, 'load', function(){ js_function(<%= @ruby_array.to_json %>, <%= @ruby_var %>); )} </script> <% end %> Is this the right way to go about it?

Full article: http://stackoverflow.com/questions/2464966/passing-ruby-v...

Tweets

Senior Developer (Ruby on Rails & JavaScript) #JavaScript

Senior Developer (Ruby on Rails & JavaScript) #...

snip.ly 31 Aug '15, 8am

× Close Customize Your Links Kobe used Sniply to add the message you just clicked SHOW ME HOW Psst, hey Kobe! You're on a ...

#tech #job #wrk Javascript, Python, Perl, Ruby,...

albuquerque.craigslist.org 30 Aug '15, 8am

Our new and innovative gigs startup is looking for experienced and qualified programmers and web developers. We have hundr...

New #job: Ruby on Rails Developer - TDD, Cloud ...

aplitrak.com 28 Aug '15, 1pm

Ruby on Rails Developer - TDD, Cloud platforms, JavaScript - URGENT - Salary up to £45,000 A self-motivated and passionate...

Seeking a #Ruby On Rails & #Javascript #Develop...

dublinstartupjobs.com 26 Aug '15, 11am

PlayON – www.playon.co – is looking for an ambitious Ruby / Ruby On Rails & Javascript developer who enjoys working with w...

Today in #Ruby, #Rails, & #Python is out! Stori...

paper.li 31 Aug '15, 1pm

Today in #Ruby, #Rails, & #Python Today in #Ruby, #Rails, & #Python, by David Young: News from Rubyists and Pythonistas Pl...

ALERT ☆★☆ #ITJob #Job #Dearborn - Ruby on Rails...

fulltimegigs.com 28 Aug '15, 2pm

Solid career advancement for Ruby on Rails Developer! Contract to hire six months, but eventually remote work possible. Mu...

Senior Ruby on Rails Engineer #sql #mongodb #jo...

findmjob.com 29 Aug '15, 10pm

We are in need of a Senior Ruby on Rails developer to join our growing team. Our company is currently in a startup phase a...

Is #OrchardRoad no longer a cool place to hang?...

youth.sg 30 Aug '15, 11am

I have never gone to Orchard Road frequently. The things there are rather expensive and as a teenager I can only dream buy...

New Job Alert: Ruby on Rails and Facebook integ...

freelancer.com 29 Aug '15, 8pm

integration facebook wall website , facebook wall ruby rails , facebook connect ruby rails , facebook apps ruby rails , fa...

rails hosting: #What are the good Ruby on Rails...

new-york.tetrag.com 03 Sep '15, 2pm

#What are the good Ruby on Rails hosting service out there? Stack Overflow I use Dreamhost . I have been with them for age...

Reparar bugs en aplicacion rails by rexdev

freelancer.com 29 Aug '15, 10pm

subir guardar imagenes en flash as3 , ruby rails en hyves , pasos para vender una aplicacion para el iphone en la app stor...

Ruby On Rails Help #RubyOnRails

sofetch.io 28 Aug '15, 8pm

Keeping your rails test suite maintainable As an app starts getting bigger so does it’s test suite. Going from 100 specs t...

Remote job: Front End Engineer - Mobile Web at ...

jobmote.com 01 Sep '15, 12am

As part of our User Experience team, you would be joining a small but passionate group of individuals who work daily to im...

Senior Ruby on Rails Developer at: United State...

jobs.rubynow.com 26 Aug '15, 8pm

Based in Boulder, Colorado, Mondo Robot is a multidisciplinary team of digital artisans that bring together passion, colla...