Check your theme for instances of:
RAILS_ROOTreplace withRails.rootRAILS_ENVreplace withRails.env
Note that Rails.root is a Pathname, so you can replace, for example:
File.join(RAILS_ROOT, 'public', 'alavetelitheme')
... with:
Rails.root.join('public', 'alavetelitheme')
This...
require 'dispatcher'
Dispatcher.to_prepare doshould be replaced with this...
Rails.configuration.to_prepare doYou need to upgrade your custom routes to the new Rails syntax.
The list_public_bodies_default helper has been removed from Alaveteli
In lib/patch_mailer_paths.rb change ActionMailer::Base.view_paths.unshift File.join(File.dirname(__FILE__), "views") to ActionMailer::Base.prepend_view_path File.join(File.dirname(__FILE__), "views")
There's also ActionMailer::Base.append_view_path for replacing ActionMailer::Base.view_paths <<.
Rename view templates from filename.rhtml to filename.html.erb.
Run this in the root of your theme directory: ruby -e 'Dir.glob("lib/views/**/*.rhtml").each { |f| `git mv #{f} #{f.gsub(".rhtml", ".html.erb")}` }'
GOTCHA! One exception is mailer templates, these should be renamed to filename.text.erb as we only use text emails.
Due to a naming conflict, Configuration has been renamed to AlaveteliConfiguration.
You may have this in your theme for things like Configuration::site_name, just change it to AlaveteliConfiguration::site_name
Replace instances of request.request_uri with request.fullpath
The Rails 3 releases notes are irritatingly
imprecise
about which such helpers have changed. You can find some candidates
with this git grep command:
git grep -E '<%[^=].*(_for|_tag|link_to)\b'
(Ignore content_for in those results.)