> 1) I've seen two propositions do detach the js framework specific code > from the rails core: > > * Yehuda suggested that we have a javascript file for each framework > (prototype.rails.js, jquery.rails.js, etc...) which implement the > helpers. Rails js helpers would generate js code, implemented by > prototype.rails.js or another depending on the choosen framework.
Yes, this is exactly what we should have. So remote_form_for should just have either a special class, like rails_remote_form, or a special attribute, ala remote=true. The JS drivers will then know to look for that class/attribute and wire the behavior in automatically with their new onload/dom watcher hooks. So Rails should never really generate any JS for these helpers. Just decorate them with the proper class names/attributes. Then every JS library can write a driver that'll look for these Rails specific clues and wire them up. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
