search for: inquiry_id

Displaying 2 results from an estimated 2 matches for "inquiry_id".

2007 Sep 21
1
Temporary disabling after_update
...ce my old database trigger with ActiveRecord callbacks in rails. I have a model like following: class Action < ActiveRecord::Base belongs_to :inquiry def after_update #clean up all action associated with the inquiry. Action.update_all("latest = ''''", ["inquiry_id = ?", self.inquiry_id]) #find the latest action latest_action = Action.find(:first, :conditions => ["deleted <> 1 and inquiry_id = ?", self.inquiry_id], :order => "action_date DESC, id DESC") #mark ''Y'' to the latest action. late...
2010 Jan 20
0
need help with nested forms and habtm
...I desperately need your help :-). My Question is: is it possible to use nested forms for habtm associations? --> Here some more info about what I wanted to do and what failed ### Basic info ### I''ve got following model associations: Customer has_many :inquiries attr_accessible :inquiry_ids accepts_nested_attributes_for :inquiries Inquiry belongs_to :customer has_and_belongs_to_many :machines accepts_nested_attributes_for :machines attr_accessible :machine_ids Machine has_and_belongs_to_many :inquiries I''m on Rails 2.3.5 and formtastic 0.9.7 ### What I...