Skip to content

Instantly share code, notes, and snippets.

@abacha
Created February 28, 2013 02:29
Show Gist options
  • Select an option

  • Save abacha/5053700 to your computer and use it in GitHub Desktop.

Select an option

Save abacha/5053700 to your computer and use it in GitHub Desktop.
class VisitReport < ActiveRecord::Base
attr_accessible :comments, :attachments_attributes, :person_id, :person_name,
:clients_visit_reports_attributes
validates_presence_of :comments, :clients_visit_reports
has_many :clients_visit_reports, :class_name => ClientsVisitReport
accepts_nested_attributes_for :clients_visit_reports, :allow_destroy => true
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment