Tagged with rails

Found the following articles that are tagged with rails.

Friday, January 02, 2009 Unobtrusive Javascript with Rails and jQuery

Rails defaults to using the Prototype Javascript library, and it provides helpers to generate Javascript from within your views. This approach is great for getting started with Rails, but I’d prefer to have all my Javascript be unobtrusive. There are a few Rails plugins that attempt to make the built-in Javascript helpers unobtrusive, but after playing with a few of these solutions I decided to give jQuery a try.

Read more »

Tuesday, February 10, 2009 Using shoulda custom macros from gems

For a while now, I’ve been using Shoulda for testing my Rails apps. Shoulda’s killer feature is its extensive set of macros (such as should_require_unique_attributes and should_render_template) that turn complex tests into a single line of code. Some Rails plugins are starting to include their own custom Shoulda macros to simplify testing their features.

Read more »