Hi, I upgraded to 0.14.3 from 0.14.2 and started receiving an error for the following code; class Project < ActiveRecord::Base ... has_many :versions, :order => ''position ASC'' ... def unarchived_versions versions.select {|v| ! v.archived } end ... The error is the following undefined method `sanitize_sql'' for ActiveRecord::Version:Module c:/applications/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/active_record/associations/association_proxy.rb:64:in `send'' c:/applications/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/active_record/associations/association_proxy.rb:64:in `sanitize_sql'' c:/applications/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/active_record/associations/has_many_association.rb:6:in `initialize'' c:/applications/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/active_record/associations.rb:735:in `new'' c:/applications/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/active_record/associations.rb:735:in `issue_versions'' c:/applications/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/active_record/associations.rb:731:in `issue_versions'' #{RAILS_ROOT}/app/models/project.rb:13:in `unarchived_versions'' I am not sure whether it is something I am doing wrong or not. Version may be new to 0.14.3 (Added on 10/09/05 21:15:45) so it may be that there is some sort of name collision. My question is whether this is the case and if it is - is there anyway to insulate ourselves from changes to the core of rails or do we just change everytime a new release comes out. It seems fairly problematic if generic names like "Version" stop being able to be used as model names. Cheers, Peter Donald
> I upgraded to 0.14.3 from 0.14.2 and started receiving an error for > the following code; > > class Project < ActiveRecord::BasePlease do post bug reports like this as a ticket on dev.rubyonrails.org. Thanks! -- David Heinemeier Hansson http://www.loudthinking.com -- Broadcasting Brain http://www.basecamphq.com -- Online project management http://www.backpackit.com -- Personal information manager http://www.rubyonrails.com -- Web-application framework
I''m having the same issue on upgrade from 0.13.1. Did anyone ever find a resolution to your problem Peter?>>> peter.j.donald-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org 11/09/05 04:00AM >>>Hi, I upgraded to 0.14.3 from 0.14.2 and started receiving an error for the following code; class Project < ActiveRecord::Base ... has_many :versions, :order => ''position ASC'' ... def unarchived_versions versions.select {|v| ! v.archived } end ... The error is the following undefined method `sanitize_sql'' for ActiveRecord::Version:Module c:/applications/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/active_record/associations/association_proxy.rb:64:in `send'' c:/applications/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/active_record/associations/association_proxy.rb:64:in `sanitize_sql'' c:/applications/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/active_record/associations/has_many_association.rb:6:in `initialize'' c:/applications/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/active_record/associations.rb:735:in `new'' c:/applications/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/active_record/associations.rb:735:in `issue_versions'' c:/applications/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/active_record/associations.rb:731:in `issue_versions'' #{RAILS_ROOT}/app/models/project.rb:13:in `unarchived_versions'' I am not sure whether it is something I am doing wrong or not. Version may be new to 0.14.3 (Added on 10/09/05 21:15:45) so it may be that there is some sort of name collision. My question is whether this is the case and if it is - is there anyway to insulate ourselves from changes to the core of rails or do we just change everytime a new release comes out. It seems fairly problematic if generic names like "Version" stop being able to be used as model names. Cheers, Peter Donald _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails ==================DISCLAIMER===============================This email may contain confidential and privileged material for the sole use of the intended recipient. Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies of it from your system. The sender accepts no responsibility for viruses and it is your responsibility to scan attachments (if any). No contracts may be concluded on behalf of the sender by means of email communications unless expressly stated to the contrary. ==================DISCLAIMER================================
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Nov 18, 2005, at 9:19 AM, Marc Love wrote:> I''m having the same issue on upgrade from 0.13.1. Did anyone ever > find > a resolution to your problem Peter? > >>>> peter.j.donald-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org 11/09/05 04:00AM >>> > Hi, > > I upgraded to 0.14.3 from 0.14.2 and started receiving an error for > the following code; > > class Project < ActiveRecord::Base > ... > has_many :versions, :order => ''position ASC'' > ...This is fixed in the next release. It''s hard (perhaps impossible) to get namespacing and autoloading working together. We''re looking at ways to better-insulate app code. jeremy -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (Darwin) iD8DBQFDfjktAQHALep9HFYRAjpKAJ9vcNy4oxqIdKrkmxiqqKwyrGqedgCdG97I a4a4dhgE35DjWNX2opG1tuw=Jm/1 -----END PGP SIGNATURE-----