Rails RJS Templates Plugin

Update

Go and get Rails 1.1 and you won't need this plugin.

Background

Marcel Molina Jr. recently announced that RJS templates would not be included in the 1.0 release of Rails, but that they might include them as a plugin.

I thought that it was about time for me to learn the plugin system in Rails anyway, so I packaged up all of Sam Stephenson's hard work on the RJS templates from changesets 3078 and 3084 and turned it into a plugin.

This means that you can add the new RJS templates functionality to your application without having to run on the bleeding edge. Please note that the plugin updates quite a few methods from ActiveRecord::Base and ActionView::Base, but mostly in minor ways. Take a look at the changesets, linked to above, for more details.

The plugin should work if you are running the latest Rails gem (0.14.3) or if you are running the stable branch from the subversion repository. If you are running on Edge Rails already then please stop reading now because this plugin won't do anything for you.

Installation

Follow these directions to install the plugin from my subversion repository

Now that you have installed the plugin you can proceed with my tutorial or Rick Olson's more advanced tutorial.

Please notify me of any problems or feedback you may have.

Update: The plugin now has its own page

7 Responses to “Rails RJS Templates Plugin”

  1. tobys Says:
    you rule, thank you for this. i was torn between rjs templates and the login engine, as the engine doesn't work on edge rails yet. this will be the best of both worlds, thank you!
  2. Alan Bradburne Says:
    Thank you, thank you! Keep up the great work.
  3. Marcel Molina Jr. Says:
    Thanks for putting in the work to make rjs templates available to those stuck at 1.0 or lower. Much appreciated.
  4. PJ Hyett Says:
    You da man!
  5. Justin Says:
    I tried to run the tests after installing to my vendor/ directory and I'm getting an error that seems to say it can't find action_controller? I'm running rails 0.14.3
  6. Cody Fauser Says:
    Justin, Double check that it is installed in vendor/plugins/javascript\_generator\_templates/
  7. Jason Says:
    I get the same error as Justin and I have double-checked to make sure the directory is correct. Also, just upgrades to Rails 1.0. Doesn't seem to help.

Sorry, comments are closed for this article.