Unobtrusive Javascript for Ruby On Rails Plugin!

Rails is a great framework, especially for writing AJAX applications, but the Javascript that the built-in Rails helpers output is a pain in the ass for many. Unobtrusive Javascript for Rails aims to change that.

What can you do with the UJS for Rails Plugin?

Define your page behaviours using CSS-style selectors and Ruby

UJS for Rails makes it easy to apply

behaviour to your page. Simply specify the element(s) of your page that you want the behaviour to apply to using CSS-style selectors and the event that you want to trigger the behaviour, and the Javascript that you want to run. In addition, you can write your behaviours using RJS-style Ruby to Javascript proxies. Use built-in Rails Javascript and AJAX helpers unobtrusively out of the box

If you need to retrofit an existing application with unobtrusive behaviour or you are used to using the Rails JavaScript Helpers then that’s not a problem. UJS for Rails has upgraded the Rails JavaScript Helpers so they apply their JavaScript unobtrusively. Simply work the same way you always have done and UJS for Rails will handle it for you.

You can visit the UJS 4 Rails plugin page here and download it right now.