Active Record


Table A-5. Deprecated associations
Rails 1.1.6Rails 1.2
:dependent => true :dependent => :destroy
:exclusively_dependent :dependent => :delete_all
push_with_attributes If associations require attributes, use has_many :through
concat_with_attributes If associations require attributes, use has_many :through


Table A-6. Deprecated methods
Rails 1.1.6Rails 1.2
count by conditions or joins count( column_name, options )
find_all find(:all, ...)
find_first find(:first, ...)
human_attribute_name .humanize
User.transaction(@user1, @user2) { ... } Object level transaction support has been deprecated. Install object_transactions plug-in.





Rails Cookbook
Rails Cookbook (Cookbooks (OReilly))
ISBN: 0596527314
EAN: 2147483647
Year: 2007
Pages: 250
Authors: Rob Orsini

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net