Displaying 3 results from an estimated 3 matches for "validate_associ".
2006 Aug 17
2
validates_associated bug?
i seem to be experiencing a bug where rails tells me that my
organization object''s associated credit card is invalid (activerecord
validation-wise invalid), when i know it to be valid. this happens
only if i tell the organization to validate_associated :credit_card.
i know the associated credit card is valid, because a) that
credit_card object itself throws no validation errors, and b) if i
change @credit_card.save to
@credit_card.update_attributes(params[:credit_card]) i get a new
credit_card record in the database, yet the overall transact...
2005 Apr 04
1
Validation problems: ActiveRecord::AssociationTypeMismatch
Hi everyone, I''m starting on my first rails project and I have a
problem that I''m sure has a simple solution. I have two models, an
address model and a state model. The address belongs_to :state,
foreign_key=>"state" and validate_associated :state
I have new & edit controllers for address which contain a drop down
list for the state choice. My list was created with
options_from_collection_for_select @states, "id", "name",
@address.state
When I go to the new or edit page, everything looks good. However,...
2005 Apr 04
0
Validation problem with active record: AssociationTypeMismatch
...blems: ActiveRecord::AssociationTypeMismatch
Hi everyone, I''m starting on my first rails project and I have a
problem that I''m sure has a simple solution. I have two models, an
address model and a state model. The address belongs_to :state,
foreign_key=>"state" and validate_associated :state
I have new & edit controllers for address which contain a drop down
list for the state choice. My list was created with
options_from_collection_for_select @states, "id", "name",
@address.state
When I go to the new or edit page, everything looks good. However,...