search for: association_proxy

Displaying 20 results from an estimated 64 matches for "association_proxy".

2006 Mar 24
1
Bug (or feature?) in association_proxy: attributes in conditions
Hi List, When I do something like belongs_to :thing, :conditions => ''var = #{my_var}'' method_missing in association_proxy.rb gets recursively called. Are these bind-style vars not allowed? Given the code in the conditions method of association_proxy.rb, it looks lilke they''re meant to be. I''m running -v 4021 of rails. Cheers, Ian
2007 Jan 10
3
ActiveRecord Error?
...he bowels of ActiveRecord. So, my question is, is there a Rails bug here, or are we doing something fundamentally inappropriate? 1) Error: test_update(WidgetTest): ArgumentError: wrong number of arguments (1 for 0) /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/associations/association_proxy.rb:110:in `save'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/associations/association_proxy.rb:110:in `send'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/associations/association_proxy.rb:110:in `method_missing'' /usr/...
2006 Apr 16
8
"Cannot convert String to Integer" after using association
...; </div> <% end %> After which point, any attempt on my part to retrieve data from @entity ( for instance <%= @entity.id %> results in: cannot convert String into Integer The stack trace is: c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/associations/association_proxy.rb:75:in `[]'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/associations/association_proxy.rb:75:in `send'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/associations/association_proxy.rb:75:in `method_missing'' c:/ruby/lib/r...
2006 Mar 20
2
AHHHhhhhh... has_and_belongs_to_many, that is going on?
..."first_name"=>"Lam", "jack"=>"johnson", "reviewer_id"=>"1"}>] >> r.reviewers_score_cards NameError: uninitialized constant ReviewersScoreCard from ...dependencies.rb:195:in `const_missing'' from ...association_proxy.rb:12:in `initialize'' from ...has_and_belongs_to_many_association.rb:5:in `eval'' from ...association_proxy.rb:12:in `initialize'' from ...has_and_belongs_to_many_association.rb:5:in `initialize'' from ...associations.rb:753:in `new...
2007 Aug 22
1
mock framework ethics question
...nd rails AssociationProxies. See http://rubyforge.org/tracker/?func=detail&atid=3149&aid=12547&group_id=797 for details. The crux is that if you do this (rspec mock syntax): obj.should_receive(:msg).with(mock_of_a_model) and the implementation does this: obj.msg(containing_model.association_proxy) the expectation fails. This is because the comparison that rspec mocks make is: expected == actual which, in this case ends up being: mock_of_a_model == association_proxy As it turns out, mocha and flexmock do this the same way, which means that this will fail in any of the three framewor...
2009 Jul 20
2
Hitting unknown error with "can't dup NilClass"
.../gems/activerecord-2.3.2/lib/active_record/ base.rb:616:in `find'' /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/ associations/belongs_to_association.rb:44:in `find_target'' /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/ associations/association_proxy.rb:240:in `load_target'' /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/ associations/association_proxy.rb:112:in `reload'' /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/ associations.rb:1231:in `user'' Need some help for thi...
2006 Apr 06
4
Record retrieval in Many-to-many using :through not working
...ecor d/reflection.rb:112:in `klass'' from c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0 /lib/active_recor d/associations/has_many_through_association.rb:54:in `find_target'' from c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0 /lib/active_recor d/associations/association_proxy.rb:116:in `load_target'' from c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0 /lib/active_recor d/associations/association_proxy.rb:109:in `method_missing'' from c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0 /lib/active_recor d/associations/has_many_through_a...
2006 Jul 24
2
Thread.new with ActiveRecord under Mongrel vs. FastCGI
...ror when saving records to the database. I have a class Bookmark, that has a belongs_to relationship with User, and when I assign the user to the bookmark: azbm.user = auser I get the error: User expected, got User /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.3/lib/active_record/associations/association_proxy.rb:134 and then more of a stack trace. Obviously the message is weird (the class it reports and the class it got are the same). I also know the code works fine in Mongrel if I''m not using threads, and it works fine in FastCGI with or without threads. Any ideas what''s going...
2006 Nov 20
5
RMagick load problems?
...: NoMethodError (undefined method `parent_of?'' for #<District:0x3412780>): /vendor/rails/activerecord/lib/active_record/base.rb:1847:in `method_missing'' /app/models/project.rb:59:in `parent_of?'' /vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:127:in `each'' /vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:127:in `send'' /vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:127:in `method_missing'' /vendor/rails/activerecord/lib/active_record...
2006 Dec 20
4
undefined method `fullname' for #<User:0x357e380>, BUT works on first view?
...omment.created_at) -%> ago 11: </div> 12: <hr> 13: </div> /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4.5618/lib/active_recor d/base.rb:1848:in `method_missing'' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4.5618/lib/active_recor d/associations/association_proxy.rb:123:in `send'' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4.5618/lib/active_recor d/associations/association_proxy.rb:123:in `method_missing'' #{RAILS_ROOT}/app/views//comments/_comment.rhtml:10:in `_run_rhtml_47app47views47comments47_comment46rhtml'' /usr/...
2009 Jun 04
1
wrong number of arguments (1 for 0)
...rd-2.3.2/lib/active_record/ associations/has_many_association.rb:61:in `save'' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/ associations/has_many_association.rb:61:in `insert_record'' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/ associations/association_proxy.rb:145:in `send'' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/ associations/association_proxy.rb:145:in `send'' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/ autosave_association.rb:291:in `save_collection_association'' /usr/lib/ruby/...
2009 Nov 17
5
has_many :through and foo.bars.include?
...sociations/association_collection.rb:380:in `method_missing_without_paginate'' from /usr/lib64/ruby/gems/1.8/gems/activerecord-2.3.4/lib/ active_record/base.rb:2143:in `with_scope'' from /usr/lib64/ruby/gems/1.8/gems/activerecord-2.3.4/lib/ active_record/associations/association_proxy.rb:206:in `send'' from /usr/lib64/ruby/gems/1.8/gems/activerecord-2.3.4/lib/ active_record/associations/association_proxy.rb:206:in `with_scope'' from /usr/lib64/ruby/gems/1.8/gems/activerecord-2.3.4/lib/ active_record/associations/association_collection.rb:376:in `m...
2006 Mar 13
0
Problems with association named :task
...though, it gives me the error: undefined method `find'' for Rake::Task:Class ./script/../config/../vendor/rails/activerecord/lib/active_record/associations/belongs_to_association.rb:44:in `find_target'' ./script/../config/../vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:106:in `load_target'' ./script/../config/../vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:32:in `reload'' ./script/../config/../vendor/rails/activerecord/lib/active_record/associations.rb:661:in `task'' ./script/../config/../vendor/rails...
2005 Oct 27
0
has_one with Single Table Inheritance - NameError : uninitialized constant
...9;'item_id'' end Whenever I try to access user.wishlist I get the follow exception : g:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.1/lib/active_support/dependencies.rb:198:in `const_missing'' g:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.12.1/lib/active_record/associations/association_proxy.rb:11:in `initialize'' g:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.12.1/lib/active_record/associations/belongs_to_association.rb:6:in `eval'' g:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.12.1/lib/active_record/associations/association_proxy.rb:11:in `initialize'' g:/ruby/...
2006 May 20
1
acts_as_paranoid overrides ActiveRecord::Base??
..._record/base.rb:376:in `find'' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/associations/has_many_through_association.rb:54:in `find_target'' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/associations/association_proxy.rb:116:in `load_target'' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/associations/association_proxy.rb:109:in `method_missing'' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/associations/has_many_thr...
2010 Aug 30
1
taskomatic.rb : set_vm_vnc_port
...sr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:208:in `rollback_active_record_state!'/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:200:in `save!'/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/associations/association_proxy.rb:217:in `send'/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/associations/association_proxy.rb:217:in `method_missing'/usr/share/ovirt-server/task-omatic/./task_vm.rb:133:in `set_vm_vnc_port'/usr/share/ovirt-server/task-omatic/taskomatic.rb:426:in `task_start_vm&...
2006 Jan 03
2
Newbie Install Question
Hi, I''ve been trying to get rails going on one of our dedicated servers, with no luck. I have ruby installed, gems, etc... When i goto to create my first rails app i get this: rails test /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/ associations/association_proxy.rb:6: warning: instance_methods: parameter will default to ''true'' as of 1.8.1 /usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_view/vendor/ builder/blankslate.rb:26: warning: instance_methods: parameter will default to ''true'' as of 1.8.1 /usr/lib/rub...
2007 May 28
1
upload_column problems on post after validation error
...ibutes='' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1671:in `each'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:1671:in `attributes='' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/associations/association_proxy.rb:123:in `send'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/associations/association_proxy.rb:123:in `method_missing'' app/controllers/hostel_controller.rb:53:in `update_customer''| At line 53 in hostel_controller.update_customer there is the line:...
2006 Mar 27
2
:through and STI
...n.rb:112:in `klass'' from ./script/../config/../config/../vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb:54:in `find_target'' from ./script/../config/../config/../vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:116:in `load_target'' from ./script/../config/../config/../vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:109:in `method_missing'' from ./script/../config/../config/../vendor/rails/activerecord/lib/active_record/associations/ha...
2007 Jul 17
5
habtm confusion
...tive_record/associations/has_and_belongs_to_many_association.rb:55:in `find'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/associations/association_collection.rb:159:in `find_target'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/associations/association_proxy.rb:131:in `load_target'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/associations/association_proxy.rb:29:in `respond_to?'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/helpers/form_options_helper.rb:116:in `options_for_select'' /usr/li...