Saturday, June 28, 2008

Issues with Active Scaffold and Rails 2.1, Solved

If you are looking to upgrade to Rails 2.1 and you are using Active Scaffold, be aware it still has a few rough edges.

Make sure you install the Rails 2.1 branch of Active Scaffold:


git clone git://github.com/activescaffold/active_scaffold
cd active_scaffold
git branch -r (just lists the branches)
git checkout origin/rails-2.1


(Check out the full thread for Rails 2.1 and Active Scaffold compatibility)

Second, I had to patch vendor/plugins/active_scaffold/lib/extensions/generic_view_path.rb. On line 53, make it look like this:


if !@template.controller.is_a?(ActionMailer::Base) && @template.controller.class.uses_active_scaffold?


I had to add !@template.controller.is_a?(ActionMailer::Base) &&

All my tests are now passing!

I still love Active Scaffold, even though it's a bit behind the times.

2 comments:

laurence said...

Thank you! This fix should be more well known. It is still a problem 9 months later!

laurence said...

Thank you! This fix should be more well known. It is still a problem 9 months later!