Archive for October 23, 2008

Rails 2.1.2 security fix release

Posted in Code on October 23, 2008 by wolpert

Just an FYI, Rails 2.1.2 has been released, which contains some security fixes.

Views in Rails

Posted in Code on October 23, 2008 by wolpert

I had to create a view for a join table of a many-to-many relationship in my model. To do this, I had to have a database migration use the ‘execute’ command to create the view. Tests failed because the schema.rb dump file does not deal with views. To fix, I had to set the following in my environments.rb file.

ActiveRecord::Base.schema_format= :sql

Then everything worked. At that point, it was just fixing my tests.