Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It just so happens that one of my major contributions to this release was writing a 'working with JavaScript in Rails' guide: http://edgeguides.rubyonrails.org/working_with_javascript_in...

Others mentioned Turbolinks, but they forgot about remote_form_for and friends.

If you _are_ building a full JavaScript application, Ember.js works really well with Rails + ActiveModel::Serializers. There might be some rough patches until Ember hits 1.0 final, but most of the pieces are in place.



Just want to chime in and say how fantastically ActiveModel::Serializers and the Ember.js REST adapter work together. I built a project with them over the weekend and the experience was overwhelmingly frictionless to a degree I hadn't experienced doing this kind of thing in the past.


Thanks. I've been kinda ignoring AMS in order to get this release out the door, but now that it's out, expect to see much more soon...


Awesome, thanks so much for writing that guide.

JS in Rails had gotten confusing lately, with changes being made over time to supported options and 'golden paths', but insufficient docs on what Rails expected/recommended.

Thanks for working to rectify that!


Any time. Please let me know if any parts of it are confusing; the first example I wrote was pretty bad, and someone chipped in with a way better one. :)


Why is the answer on how to use Javascript to use Coffeescript? Does all RoRists use CS instead of JS, or is it considered best practice?

(I don't use either Ruby, RoR, Coffeescript or Ember.)


In order to use just JavaScript... you just write JavaScript. Nothing special. If you don't want to use it at all, you can also remove the gem from your Gemfile.

> Does all RoRists use CS instead of JS, or is it considered best practice?

It is currently considered best practice to use CS instead of JS, which is why the gem is included in your Gemfile by default. Not every Rails project uses it; Discourse just ported all their stuff to JS, even though they started with CS.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: