Displaying 4 results from an estimated 4 matches for "configure_dependency_for_has_mani".
Did you mean:
configure_dependency_for_has_many
2008 May 28
2
functional testing joins table problem
I have models/controllers
Class Facility
has_many :facilities_services, :dependent => :delete_all
Class Service
has_many :facilities_services, :dependent => :delete_all
Class FacilitiesServices
belongs_to :facility
belongs_to :service
so in my test/functional/facilities_controller_test.rb, I have
post :destroy, :id => 5
which tosses an error...
2008 Apr 04
1
Urgent help needed! "uninitialized constant" error.
I need a hint on what could be causing the following error message:
NameError in Project areasController#destroy
uninitialized constant ProjectArea::KeyAspect
D:/Ruby/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:477:in
`const_missing''
(eval):1:in `configure_dependency_for_has_many''
2010 Mar 24
1
How to stub a has_many relationship in Rails 2.3.5
We have a test that has been working find until we upgraded to rails 2.3.5.
I''m not too familiar with mocks/stubs so maybe there is an easy solution.
Here is a simple example of our scenario.
Class Person < ActiveRecord::Base
has_many :aliases, :dependent => :nullify
before_destroy :mark_aliases_as_deleted
def mark_aliases_as_deleted
self.aliases.each do
2006 Jul 31
0
Issues with has_many, belongs_to and dependency settings
I have 2 models SmsAddress & OutboundSmsAtom
SmsAddress {
has_many :other_objects, :dependency => :nullify
}
OutboundSmsAtom {
#note this object also "belongs_to" other objects if that matters
belongs_to :this_object
}
Whenever I try to destroy an object of type ThisObject, which at the time
has 0 "children" OtherObjects I get the following type of