3 ms·
Regarding #2, what is he talking about escaping? A simple call to the j helper (short for escape_javascript) and your render calls are properly escaped. Regar
by aantix 14y ago
Regarding #2, what is he talking about escaping? A simple call to the j helper (short for escape_javascript) and your render calls are properly escaped.
Regarding #1; AJAX updates are incredibly easy (see the Railscast for review http://railscasts.com/episodes/136-jquery-ajax-revised?view=asciicast http://railscasts.com/episodes/136-jquery-ajax-revised?view=...). In fact, most of the Backbone BS that people are doing now days could be much more easily accomplished with a simple form_for (:remote => true) with a simple rjs response.
This author appears to have lost the simplicity in it's approach. Review the Railscast and this video of DHH showing off the new Basecamp (http://www.youtube.com/watch?v=FkLVl3gpJP4 http://www.youtube.com/watch?v=FkLVl3gpJP4) and maybe you'll reconsider.
- homakov 14y ago2 let's start with the fact that rails escapes all html by default in normal views. In .js templates you have to do it manually 1 AJAX updates are easy, right. w/o RJS as well i don't describe my approach because my approach is different — i wrote a post about other websites' approach (RJS is used in the wild)