search for: has_many_through_association

Displaying 18 results from an estimated 18 matches for "has_many_through_association".

2007 Mar 22
2
Enumerable sum oddity
...> a = Account.find(1) => #<Account:0x39c80a8 @attributes={...} >> a.consultations => [] >> a.consultations.sum(&:foo) ArgumentError: wrong number of arguments (1 for 2) from ./script/../config/../config/../vendor/rails/activerecord/ lib/active_record/associations/has_many_through_association.rb:110:in `calculate'' from ./script/../config/../config/../vendor/rails/activerecord/ lib/active_record/associations/has_many_through_association.rb:110:in `send'' from ./script/../config/../config/../vendor/rails/activerecord/ lib/active_record/associations/has_man...
2006 Mar 03
2
Through relationship
...ave a nil object when you didn''t expect it! The error occured while evaluating nil.options RAILS_ROOT: /Users/flip/Documents/workspace/SolidSuite/public/../ config/.. Application Trace | Framework Trace | Full Trace #{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/ associations/has_many_through_association.rb:66:in `construct_conditions'' #{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/ associations/has_many_through_association.rb:7:in `initialize'' #{RAILS_ROOT}/vendor/rails/activerecord/lib/active_record/ associations.rb:695:in `new'' #{RAILS_ROOT}/vendor/rails...
2006 Apr 06
4
Record retrieval in Many-to-many using :through not working
...122:in `const_missing'' from (eval):1:in `compute_type'' from c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.0 /lib/active_recor 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:1...
2006 May 28
7
Self-referential has_many :through relationship
...undError: ActiveRecord::HasManyThroughSourceAssociationNotFoundError from /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/reflection.rb:173:in `check_validity!'' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/associations/has_many_through_association.rb:6:in `initialize'' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/associations.rb:876:in `potential_friends'' from (irb):4 By the way I have read the excellent article over at http://blog.hasmanythrough.com/articles/2006/04/21/self-r...
2006 May 20
1
acts_as_paranoid overrides ActiveRecord::Base??
...onfig/../config/../lib/acts_as_paranoid.rb:66:in `validate_find_options'' from /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_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_prox...
2006 Mar 27
2
:through and STI
...iverecord/lib/active_record/reflection.rb:112:in `send'' from ./script/../config/../config/../vendor/rails/activerecord/lib/active_record/reflection.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/associ...
2007 Aug 15
2
has_many :through ... What am I missing?
.../activerecord-1.15.3/lib/ active_record/reflection.rb:125:in `send'' from /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/ active_record/reflection.rb:125:in `klass'' from /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/ active_record/associations/has_many_through_association.rb:115:in `find_target'' from /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/ active_record/associations/association_proxy.rb:131:in `load_target'' from /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/ active_record/associations/association_proxy...
2008 Feb 06
1
RSpec 1.1.3 + ZenTest 3.9.1 + Rails 1.2.6 do NOT ignore folders ^vendor/*
...pec 1.1.3 installed as a gem When starting autotest with -v option, there is a lot of noise because autotest does not ignore the vendor folder, the migrations, etc ...: Dunno! vendor/plugins/acts_as_solr/solr/lib/jetty-util-6.1.3.jar Dunno! vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb Dunno! vendor/rails/actionpack/lib/action_view.rb Dunno! vendor/plugins/active_scaffold/test/extensions/array.rb Dunno! vendor/plugins/active_scaffold/lib/extensions/nil_id_in_url_params.rb Dunno! config/amazon_s3.yml Dunno! vendor/rails/actionpack/lib/action_controller/base.rb Dunno! vendor/plu...
2008 Jan 16
0
[CruiseControl] RubyOnRails build 8649 failed
...ns.rb:110:in `save!'' ./test/../lib/active_record/transactions.rb:118:in `rollback_active_record_state!'' ./test/../lib/active_record/transactions.rb:110:in `save!'' ./test/../lib/active_record/validations.rb:909:in `create!'' ./test/../lib/active_record/associations/has_many_through_association.rb:60:in `<<'' ./test/../lib/active_record/base.rb:1702:in `with_scope'' ./test/../lib/active_record/associations/has_many_through_association.rb:60:in `send'' ./test/../lib/active_record/associations/has_many_through_association.rb:60:in `<<'' ./test/../...
2008 Aug 31
9
assigning collection values and exceptions
...g update_attributes, for updating. The owner object (Report) already exists, and every invalid Reason assigned through << will simply result in a raised ActiveRecord::InvalidRecord exception. This is best described directly into rails'' code in association_collection.rb (<<) and has_many_through_association.rb (insert_record). Now I may trap this exception in controller and do something with it, however I lose in some way my validation error messages on my form, which is dynamic (add/remove reasons via js). The reason why I''m not using :accessible or some other plugin to ease multimodel for...
2006 Jul 31
2
ambiguous column name in has_many :through
...by/gems/1.8/gems/activerecord-1.14.3/lib/active_record/base.rb:924:in `find_every'' from C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.3/lib/active_record/base.rb:381:in `find'' from C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.3/lib/active_record/associations/has_many_through_association.rb:36:in `find'' from ./script/../config/../config/../app/models/account.rb:65:in `late_items'' from (irb):7 Is there anything I can change in my model to avoid this error and still find the late_items? Should I just modify the conditions of my join to include &quo...
2006 Mar 23
2
rails 1.1 and mysql errors
...ships ............. test_reference_roles_through_membership(UserTest): ActiveRecord::ActiveRecordError: Invalid source reflection macro :has_and_belongs_to_many for has_many roles, :through => memberships c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2.4008/lib/active_record/associations/has_many_through_association.rb:75:in `construct_conditions '' Rails 1.1 does not fix the existing "shim" error with mysql `destroy_without_habtm_shim_for_[xxMODELxx]'' The ticket with patch is here and it has worked well for me for several months: http://dev.rubyonrails.org/ticket/3175 I am very...
2010 Apr 19
1
Problem with mongrel_rails, but works with script/server
On Mon, Apr 19, 2010 at 9:21 AM, <rpavesic at gmail.com> wrote: > Hi there, I am having problem with mongrel_rails and > I do not know whom to ask so I found your e-mail as > one of the last people contributing to mongrel_rails, so > may be you would be able to help me out. > Please, email mongrel-users mailing list for problems, so in that way all benefit from the answers.
2006 Jun 19
3
Strange behavior of :through association.
...ontroller#index Could not find the association :person in model Host RAILS_ROOT: script/../config/.. /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/reflection.rb:169:in `check_validity!'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/associations/has_many_through_association.rb:6:in `initialize'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/associations.rb:876:in `new'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/associations.rb:876:in `hosts'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/acti...
2006 Oct 16
6
Rails AR/Oracle Unit Test: [5310] failed (but getting better)
...e Fix has_many :through to add the appropriate conditions when going through an association using STI. Closes #5783. [Jonathan Viney] (sorry, forgot to commit the actual files) ------------------------------------------------------------------------ U activerecord/lib/active_record/associations/has_many_through_association.rb U activerecord/lib/active_record/associations.rb U activerecord/CHANGELOG Updated to revision 5310. 1) Error: test_load_schema(AAACreateTablesTest): ActiveRecord::StatementInvalid: ./test/../lib/active_record/connection_adapters/abstract_adapter.rb:128:in `log'': OCIError: ORA-00972...
2006 Jul 10
10
has_many :through and foreign key parameters
I just took my HABTM and turned it into a :through since my join table has another "non-joiny" attribute. I went from this: has_many_and_belongs_to :jobs, :join_table => ''tablename'', :foreign_key => ''x'', :association_foreign_key => ''y'' to this: has_many :jobs, :through =>
2011 Nov 24
5
ActiveRecord::AssociationTypeMismatch
Hi to all, I have this error and I don''t understand why. I have three model, Image and Playlist and PlaylistItem. Everything works fine. The app should work also a XML REST service. When I made this call I obtain this XML because the playlist don''t contains images: GET http://0.0.0.0:3000/playlists/7.xml <playlist> <id>7</id>
2007 Jun 14
19
Please test export/collect from svn
For those of you out there using export/collect (which we really need to come up with a better name for...), can you test the current SVN code? I''m mostly wondering if the performance is any better. To use it, you''ll have to remove your current database, since the database schema is significantly changed. I''m getting what looks like an additional 25% reduction