Displaying 5 results from an estimated 5 matches for "derive_class_nam".
Did you mean:
derive_class_name
2011 Jan 11
0
[PATCH] Polymorphic belongs_to association with :conditions issues
...it, those conditions cause a NameError when you try to access the target object, of the style saying "hey, there''s no such thing as a Note::Notable".
This is because a reflection''s sanitized_conditions method calls klass, and klass calls class_name, and class_name calls derive_class_name, and, well, derive_class_name can''t really derive a class name properly, in the case of a polymorphic belongs_to, because the reflection doesn''t have all the information it needs -- the association proxy does.
The patches are for 3-0-stable and master, and they''re fairl...
2012 Nov 19
0
has_one :through NoMethodError: undefined method `klass' for nil:NilClass when doing class_name on reflection
...n.rb:385:in
`collect''
from
/path/to/rvm/gems/ruby-1.9.3-p194@my_project/gems/activerecord-3.2.9/lib/active_record/reflection.rb:385:in
`source_reflection''
from
/path/to/rvm/gems/ruby-1.9.3-p194@my_project/gems/activerecord-3.2.9/lib/active_record/reflection.rb:530:in
`derive_class_name''
from
/path/to/rvm/gems/ruby-1.9.3-p194@my_project/gems/activerecord-3.2.9/lib/active_record/reflection.rb:127:in
`class_name''
from (irb):6:in `block in irb_binding''
from (irb):6:in `each''
from (irb):6
from
/path/to/rvm/gems/ruby-1.9.3-p19...
2009 Jun 16
2
Documenting Models
All,
I''m trying to do some documentation on the models for our interfaces
team. I espcially need them to be able to see the relationships
belongs_to and validations. However, I must be stupid with rdoc
because I can''t seem to get those two things in the generated
documentation.
Ideas?
2008 Aug 01
0
Help with Access Control
...step by step, unfortunately I am getting the following
error when I try to attempt to run the "show" method. Some tips will
really be helpful, many thanks in advance
error: stack level too deep
usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/
reflection.rb:219:in `derive_class_name''
/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/
reflection.rb:106:in `class_name''
/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/
reflection.rb:129:in `klass''
/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/...
2010 Sep 29
2
Railroad problem with :through?
...s/1.8/gems/activerecord-2.3.8/lib/active_record/reflection.rb:320:in
`collect''
from
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/reflection.rb:320:in
`source_reflection''
from
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/reflection.rb:381:in
`derive_class_name''
from
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/reflection.rb:112:in
`class_name''
from
/home/kaitest/.gem/ruby/1.8/gems/dmattes-railroad_xing-0.5.4/lib/railroad/ar_model.rb:85:in
`process_association''
from
/home/kaitest/.gem/ruby/1.8/gems/dmattes-r...