Moving to 2.0
Posted by Andre Foeken Thu, 18 Oct 2007 13:27:19 GMT
Issues found so far:
Lots of small routing changes. Thank god for grep! :
addresses_path(@employee) => employee_addresses_path(@employee). (Don't forget the *_url methods!)Several plugins failed due to
extract_options_from_args!. This method has been replaced with the nicer:args.extract_options!(i.e acts_as_paranoid, acts_as_mappable, paginating_find)acts_as_paranoid had minor issues: fix by replacing
construct_count_with_legacy_argstoconstruct_count_options_from_argsActiveResource is now part of rails core. Be sure to freeze edge twice if you are upgrading from 1.2.3 or lower. All of our libXML additions had to be redone. (this time through /patches, tnx fngtps)
Different behavior of the render method. Before you could call
render "addresses/show"if you wanted to, this has been changed torender :template => "addresses/show". This affects several plugins too (like rspec_on_rails)We no longer need the mysql_tasks plugin, since this functionality is now build right in!
redhillonrails_core has some issues with connection adapters. Apparently rails 2.0 no longer loads adapters it doesn't need. This creates some issues with the redhills plugin since it tries to include stuff in those adapters. Adding a begin/rescue block around each include solves the issue.
The development environment no longer needs the
config.breakpoint_server = truesetting.Polymorphic models are now saved with the base class as type in external objects.
Autocomplete textfields are now a plugin:
./script/plugin install auto_completeIf you have overridden the to_json methods, be sure to change that to
to_json options={}, else they might fail.Migrations no longer working? Try removing duplicate names. We have two migrations with the same name (but different id) and it just skipped the first one (!)
Benefits so far:
- Speed! We did expect some speed increase, but this is major! Our pdf generating stuff uses a lot of ActiveRecord and we saw decreases of more than 50% request time.

cheers for this. the migration issue exists longer. had this with 1.2.something
Should be construct_count_options_from_legacy_args(*args)