search for: pgmupdate

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

Did you mean: pgm_update
2006 Mar 13
2
relationship woes
I have two tables: class PgmUpdate < ActiveRecord::Base has_many :pgm_visits, :foreign_key => ''pgm_update_fk'' ... and class PgmVisit < ActiveRecord::Base belongs_to :pgm_update, :foreign_key => ''pgm_update_fk'', :dependent => true ... According to the has_many docs (http://a...
2006 Mar 14
1
Where to validate?
class PgmUpdate < ActiveRecord::Base has_many :pgm_visits ... class PgmVisit < ActiveRecord::Base belongs_to :pgm_update ... I am trying to make sure that none of the visits in PgmUpdate overlap start and end dates. Should this validation exist in PgmUpdate or the controller? It seems natur...