search for: raise_on_type_mismatch

Displaying 20 results from an estimated 20 matches for "raise_on_type_mismatch".

2007 Mar 26
5
Session trouble
....delivery_location = delivery_location session[:order].delivery_location.save When it gets to session[:order].delivery_location = delivery_location I get the error You have a nil object when you didn''t expect it! The error occurred while evaluating nil.klass /association_proxy.rb:147:in `raise_on_type_mismatch'' /associations/has_one_association.rb:44:in `replace'' /associations.rb:900:in `delivery_location='' /delivery_locations_controller.rb:21:in `create'' my Order model has_one :delivery_location my DeliveryLocation model belongs_to :order Any suggestions would be aw...
2006 Apr 04
1
habtm and options_from_collection_for_select [1.0.0]
I ran into a problem using options_from_collection_for_select : ActiveRecord::AssociationTypeMismatch (Topic expected, got String): /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/ active_record/associations/association_collection.rb:128:in `raise_on_type_mismatch'' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/ active_record/associations/association_collection.rb:114:in `replace'' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/ active_record/associations/association_collection.rb:114:in `replace''...
2005 Dec 21
2
ActiveRecord Error with << in Collection
...cord::AssociationTypeMismatch in Cmdb#create ConfigurationItemAttributeValue expected, got Array RAILS_ROOT: ./script/../config/.. Application Trace | Framework Trace | Full Trace c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/associations/association_collection.rb:128:in `raise_on_type_mismatch'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/associations/association_collection.rb:114:in `replace'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/associations/association_collection.rb:114:in `each'' c:/ruby/lib/ruby/gems/...
2009 Sep 09
1
Paperclip attachment to AWS - ActiveRecord::AssociationTypeMismatch Going Nuts!
...e Graphic(#37649720) expected, got Tempfile(#27280470) RAILS_ROOT: C:/devlopment_tools/projects/codex1/active/bugtrigger Application Trace | Framework Trace | Full Trace c:/devlopment_tools/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.3/lib/active_record/associations/association_proxy.rb:263:in `raise_on_type_mismatch'' c:/devlopment_tools/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.3/lib/active_record/associations/has_one_association.rb:52:in `replace'' c:/devlopment_tools/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.3/lib/active_record/associations.rb:1246:in `graphic='' c:/devlopment_...
2009 Sep 10
2
Paperclip attachment to AWS - ActiveRecord::AssociationTypeMismatch
...Graphic(#37649720) expected, got Tempfile(#27280470) RAILS_ROOT: C:/devlopment_tools/projects/codex1/active/bugtrigger Application Trace | Framework Trace | Full Trace c:/devlopment_tools/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.3/ lib/ active_record/associations/association_proxy.rb:263:in `raise_on_type_mismatch'' c:/devlopment_tools/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.3/ lib/ active_record/associations/has_one_association.rb:52:in `replace'' c:/devlopment_tools/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.3/ lib/ active_record/associations.rb:1246:in `graphic='' c:/devlopm...
2007 Feb 08
5
a possible bug in Has_many :through using :soucre
...object instead of the id field. The trickiest part of all this is that I get a really strange error message: ActiveRecord::AssociationTypeMismatch: User expected, got User from c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.2 /lib/active_recor d/associations/association_proxy.rb:148:in `raise_on_type_mismatch'' from c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.2 /lib/active_recor d/associations/belongs_to_association.rb:22:in `replace'' from c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.2 /lib/active_recor d/associations.rb:900:in `user='' from c:/r...
2006 Jul 28
3
Forms: handle foreign keys (AssociationTypeMismatch)
...pected, got String RAILS_ROOT: /Users/Josh/Webwork/psyguideorg/public/../config/.. Application Trace | Framework Trace | Full Trace /Applications/Locomotive2/Bundles/rails112.locobundle/powerpc/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/associations/association_proxy.rb:134:in `raise_on_type_mismatch'' /Applications/Locomotive2/Bundles/rails112.locobundle/powerpc/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/associations/belongs_to_association.rb:22:in `replace'' /Applications/Locomotive2/Bundles/rails112.locobundle/powerpc/lib/ruby/gems/1.8/gems/activerecord-1.1...
2006 Jan 31
2
How can I overwrite the parent.children.push(child) Method?
Hi all I want to overwrite the push method (which is an alias of <<, the same as concat) of collections, and there I want to test if :uniq is set to true in the relationship. If so, the method should check if the passed object is already related to the parent, or not (only then it will be added). But I just can''t find the original code of this method, so I could overwrite
2006 Jan 23
0
type mismatch because of misled array index
...ActiveRecord::AssociationTypeMismatch in View#bookslist Book expected, got NilClass RAILS_ROOT: /Volumes/TRAVELDRIVE/sandcastle/script/../config/.. Application Trace | Framework Trace | Full Trace #{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:115:in `raise_on_type_mismatch'' #{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:24:in `<<'' #{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:23:in `each'' #{RAILS_ROOT}/vendor/rails/activerecord/lib/act...
2010 Sep 01
0
Error on update_attributes with HABTM relationship
...920) expected, got Provider(#39471020) If I update an image with NO linked providers, everything is fine. I''m stumped. Here''s the last couple of lines from the trace, in case it''s helpful: activerecord (3.0.0) lib/active_record/associations/ association_proxy.rb:260:in `raise_on_type_mismatch'' activerecord (3.0.0) lib/active_record/associations/ association_collection.rb:522:in `block in remove_records'' activerecord (3.0.0) lib/active_record/associations/ association_collection.rb:522:in `each'' activerecord (3.0.0) lib/active_record/associations/ association_c...
2008 Jul 13
2
Problem with ActiveRecord::AssociationTypeMismatch
...er.new :first_name => "hello", :last_name => "world" I get this Error: ActiveRecord::AssociationTypeMismatch: Attribute(#17724630) expected, got Array(#104100) from /Library/Ruby/Gems/1.8/gems/activerecord-2.1.0/lib/active_record/ associations/association_proxy.rb:214:in `raise_on_type_mismatch'' from /Library/Ruby/Gems/1.8/gems/activerecord-2.1.0/lib/active_record/ associations/association_collection.rb:229:in `replace'' from /Library/Ruby/Gems/1.8/gems/activerecord-2.1.0/lib/active_record/ associations/association_collection.rb:229:in `each'' from /Library/Rub...
2006 Feb 27
1
Nested hash from form params into create()?
...onal_id INTEGER UNSIGNED NOT NULL ); ## ERROR ## CartItemOptionalVariation expected, got Array RAILS_ROOT: script/../config/.. Application Trace | Framework Trace | Full Trace /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/associations/association_collection.rb:128:in `raise_on_type_mismatch'' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/associations/association_collection.rb:114:in `replace'' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/associations/association_collection.rb:114:in `each'' /usr/local/lib/rub...
2010 Jan 26
2
accepts_nested_attributes_for :has_many :through => 'bug?'
...------------- The error ActiveRecord::AssociationTypeMismatch in UsersController#create Company(#2180266380) expected, got Array(#2148226700) RAILS_ROOT: /Users/mark/Programming/ruby/s/ /Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/ associations/association_proxy.rb:263:in `raise_on_type_mismatch'' /Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/ associations/association_collection.rb:320:in `replace'' /Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/ associations/association_collection.rb:320:in `each'' /Library/Ruby/Gems/1.8/gems/ac...
2009 Feb 02
4
AssociationTypeMismatch got Fixnum
...h their sources; In production and development ( I use mongrel_cluster in the first and a single mongrel on the second) I got this error: ActiveRecord::AssociationTypeMismatch (Source expected, got Fixnum): /vendor/rails/activerecord/lib/active_record/associations/ association_proxy.rb:150:in `raise_on_type_mismatch'' /vendor/rails/activerecord/lib/active_record/associations/ belongs_to_association.rb:22:in `replace'' [...] The fact that scares me *a lot* is that I get it on random basis and reloading the page solves it. It looks like that sometimes the record isn''t retrieved cor...
2007 Jun 23
3
has_and_belongs_to_many and dynamic find
...m doing something obviously wrong, and not really a problemn as I can use find :first ..... but still curious, why does find_by_name blow up ? Cheers all, tom The full trace is here C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/ associations/association_proxy.rb:148:in `raise_on_type_mismatch'' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/ associations/association_collection.rb:24:in `<<'' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/ associations/association_collection.rb:23:in `each'' C:/ruby/lib/ruby/gems/1...
2006 Jul 24
2
Thread.new with ActiveRecord under Mongrel vs. FastCGI
Hi All, I''m going to end up hosting a site on a server in a fastcgi environment, but I''ve been doing most of my development under mongrel. I have a bit of code that spawns a thread, and in the thread it makes some remote calls (openuri) and does some database inserts via activerecord. When I do this under FastCGI, everything appears to work as expected. When I do it under
2010 Jul 16
31
Added associations but don't see generated methods
Hi, I''ve got a Rails app working that includes two two classes, etc.: Expense & Vendor. I eventually learned that the mental concept I had of their relationship should be express in Rails as: class Expense < ActiveRecord::Base; belongs_to :vendor; end class Vendor < ActiveRecord::Base; has_many :expenses; end
2006 Nov 26
5
associations help?
I have Users who can "own" Projects. There is only one owner. Users in general can be authorized to view certain projects. Here is my initial stab at this: class User < ActiveRecord::Base has_many :projects # ownership has_many :project_viewers, :dependent => :destroy has_many :projects, :through => :project_viewers, :uniq => true ... end class
2007 Dec 04
10
ActiveRecord::AssociationTypeMismatch
..._id) @task.task_users << task_user end @task.save This is not working. Following error is thrown. ActiveRecord::AssociationTypeMismatch (TaskUser expected, got TaskUser): C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.6/lib/active_record/associations/association_proxy.rb:148:in `raise_on_type_mismatch'' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.6/lib/active_record/associations/association_collection.rb:24:in `<<'' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.6/lib/active_record/associations/association_collection.rb:23:in `each'' C:/ruby/lib/r...
2005 Aug 25
1
newbie questions about hosting address
...Relationship.new(:src_entity => @entity, :created_by => @entity.created_by, :target_entity => target_entity, :relationship_type => rel_type) And the error that is thrown is this: /usr/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/associations/association_proxy.rb:93:in `raise_on_type_mismatch'': Entity expected, got Entity (ActiveRecord::AssociationTypeMismatch) from /usr/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/associations/belongs_to_association.rb:25:in `replace'' from /usr/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/associations.r...