Displaying 3 results from an estimated 3 matches for "collection_association".
2012 Mar 02
0
ConnectionNotEstablished when using connection on AR::Base abstract subclass
...ation.rb:98:in
`association_scope''
from /Users/mlartz/.rvm/gems/ruby-1.9.3-p0@tmp/gems/
activerecord-3.2.2/lib/active_record/associations/association.rb:87:in
`scoped''
from /Users/mlartz/.rvm/gems/ruby-1.9.3-p0@tmp/gems/
activerecord-3.2.2/lib/active_record/associations/
collection_association.rb:380:in `find_target''
from /Users/mlartz/.rvm/gems/ruby-1.9.3-p0@tmp/gems/
activerecord-3.2.2/lib/active_record/associations/
collection_association.rb:333:in `load_target''
from /Users/mlartz/.rvm/gems/ruby-1.9.3-p0@tmp/gems/
activerecord-3.2.2/lib/active_record/associ...
2012 Nov 03
0
ids writer fields for HABTM relationship.
.../code]
I scratched my head for quite a long time before finding out that after
restarting the rails server, the error would disappear and the Person
would actually be updated...
So with the help of pry and pry-debugger, i have pinpointed the exact
source of the "NoMethodError" error (in collection_association.rb, at
line 69):
[code]
# Implements the ids writer method, e.g. foo.item_ids= for
Foo.has_many :items
def ids_writer(ids)
pk_column = reflection.primary_key_column
ids = Array.wrap(ids).reject { |id| id.blank? }
ids.map! { |i| pk_column.type_cast(i) }
replace(...
2012 Jan 17
4
Find all association methods
Hi all,
I want to get all association methods in one single model....
Any default method is provided by Active Record ???
i am using ruby 1.9.3 and rails 3.1.3
Please reply me ....
Thanks,
kingston.s
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to