search for: contact_addresses

Displaying 4 results from an estimated 4 matches for "contact_addresses".

Did you mean: contact_address
2006 May 06
3
Question about one-to-many-to-many
...tables/models. I can''t get cascading deletes (haven''t tried updates yet) to work when the master record is deleted. I''m using MySQL 4.1.x, and the error message is: Mysql::Error: #23000Cannot delete or update a parent row: a foreign key constraint fails: DELETE FROM contact_addresses WHERE (contact_id = 1). Is this something that''s not supported by MySQL? Or might I have setup my models (has_many, belongs_to, etc.) incorrectly? -- Posted via http://www.ruby-forum.com/.
2007 Aug 03
0
acts_as_paranoid and Association Extensions (has_one troubles)
Hi... Isn''t there a proper way or hack/workaround for the following? * For the example with unfortunate disabilities.. look below,,, Usage of has_* (associationmethods) do {def with_deleted AccociatedModel#with_scope} {Paranoid''s#find_with_deleted}... The has_one associations give me a nil object when invoking it with Model.association_OBJECT.with_deleted. Has_many does like
2006 Aug 11
5
Unit tests - NilClass problem
Hi! Yesterday I started to write my unit tests for the fist time using rails. I''m using this method: http://blog.codahale.com/2005/12/23/a-rails-howto-simplify-your-unit-tests/ My customer_test.rb looks like this: require File.dirname(__FILE__) + ''/../test_helper'' class CustomerTest < Test::Unit::TestCase fixtures :customers # Replace this with your real
2007 Nov 21
0
Testing transactional updates in story runner
How do you guys test transactional updates with story runner? I have an action that needs to update four different models: Enrollment.transaction do @contact.update_addresses(params[:contact_address], params [:billing_address]) @enrollment.update_attributes!(params[:enrollment]) end The last update_attributes! will raise ActiveRecord::RecordNotValid if anything was