search for: has_and_belongs_to_many_association

Displaying 8 results from an estimated 8 matches for "has_and_belongs_to_many_association".

2006 Mar 20
2
AHHHhhhhh... has_and_belongs_to_many, that is going on?
..."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'' from ...associations.rb:753:in `reviewers_score_cards''...
2007 Jul 17
5
habtm confusion
.../lib/active_record/connection_adapters/sqlite_adapter.rb:359:in `table_structure'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/sqlite_adapter.rb:210:in `columns'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/associations/has_and_belongs_to_many_association.rb:165:in `finding_with_ambigious_select?'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_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:15...
2005 Mar 30
0
Help - dependencies.rb - `const_missing': uninitialized constant
...epresentatife" anywhere. Show template trace C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.9.1/lib/active_record/associations/association_proxy.rb:11:in `initialize'' (eval):1:in `initialize'' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.9.1/lib/active_record/associations/has_and_belongs_to_many_association.rb:5:in `eval'' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.9.1/lib/active_record/associations/association_proxy.rb:11:in `initialize'' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.9.1/lib/active_record/associations/has_and_belongs_to_many_association.rb:5:in `initialize''...
2005 Sep 06
6
strange behavior of acts_as_taggable
...ction_adapters/abstract_adapter.rb:462:in `log'' from ./script/../config/../vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:109:in `execute'' from ./script/../config/../vendor/rails/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb:135:in `insert_record'' from ./script/../config/../vendor/rails/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb:86:in `push_with_attributes'' from ./script/../config/../lib/taggable.rb:286:in `tag'' from ./scri...
2006 Aug 18
9
Rails is doing what I want - but I don''t understand how.
Hi guys, I have the strangest thing happening. The funny part is its doing exactly what I want to do, I just don''t understand how. Basically here is my model. class Role < ActiveRecord::Base has_and_belongs_to_many :users has_and_belongs_to_many :rights def self.names names = Array.new() for role in Role.find :all names << role.name end return
2006 Apr 11
0
habtm and :uniq
...s: http://dev.rubyonrails.org/ticket/2019 Does anyone have information regarding whether there are plans to fix this behaviour? It seems strange to me to force uniqueness in Ruby (i.e. application code) but not in the database. For example, in activerecord/lib/active_record/associations/ has_and_belongs_to_many_association.rb there is a line which reads @reflection.options[:uniq] ? uniq(records) : records This would be superflous if the "<<" operator checked for uniqueness. I''d be grateful for any information on this topic. Thanks, Manuel Holtgrewe
2010 Oct 11
8
Nooby Stuck - "has_and_belongs_to_many" relationship
...call'' from /Library/Ruby/Gems/1.8/gems/arel-1.0.1/lib/arel/session.rb:17:in `create'' from /Library/Ruby/Gems/1.8/gems/arel-1.0.1/lib/arel/algebra/relations/relation.rb:159:in `insert'' from /Library/Ruby/Gems/1.8/gems/activerecord-3.0.0/lib/active_record/associations/has_and_belongs_to_many_association.rb:70:in `insert_record'' from /Library/Ruby/Gems/1.8/gems/activerecord-3.0.0/lib/active_record/associations/association_collection.rb:136:in `<<'' from /Library/Ruby/Gems/1.8/gems/activerecord-3.0.0/lib/active_record/associations/association_collection.rb:479:in `add_reco...
2006 Nov 20
5
RMagick load problems?
...ach'' /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/associations/has_and_belongs_to_many_association.rb:91:in `method_missing'' /app/models/user.rb:89:in `member_of?'' /app/controllers/application.rb:25:in `set_organization'' /vendor/rails/actionpack/lib/action_controller/filters.rb:456:in `send'' /vendor/rails/actionpack/lib/action_controller/filt...