Rails notes from recent work and news

I’m fairly busy working on a couple of Rails applications. Here are some notes I’ve jotted down in the past few days.

  • So there was a security advisory about Ruby that has led to some discussion about the nature of the problems (1, 2). The Phusion folks have offered Ruby Enterprise Edition as a solution to these vulnerabilities by backporting the fixes. I haven’t followed the Debian and Ubuntu package maintainers but I’m interested to see what they come up with.

  • I tried out acts_as_audited in an application which worked fairly well once I got it working right. Some caveats (in addition to the ones in the documentation) are that multiple “Audit” statements in the Application controller will cause the entire application to fail with some error about controller being nil. Also pulling the recent version from the git repository is recommended for Rails 2.1.

  • On a similar note, though acts_as_audited can potentially replace acts_as_versioned, the latter also requires the latest version from its git repository to function correctly under Rails 2.1.
  • I learned more about sweepers due to acts_as_autided relying on them. On the one hand they’re useful but they do raise problems for testing. I had to create a new development environment for testing which was somewhat annoying. I found an article which lays out an alternative to sweepers which I found a helpful read.
  • I’ve been doing more with the FormHelper and FormTagHelper modules. I learned today that when using a select_tag with multiple set to true you also have to have the name end in a set of square brackets to indicate that there will be multiple values. I’m not at all sure why that is necessary and I don’t find it particularly intuitive.

Trackback URL for this post:

http://hightechsorcery.com/trackback/158
Creative Commons License Except where otherwise noted, content on this site is licensed under a Creative Commons by-nc-sa 3.0 License