Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ruby-1.9.2-p180 :008 > custom_form = CustomForm.last
- => #<CustomForm id: 20, html_page_id: nil, custom_form_type_id: 1, created_at: "2011-08-31 09:50:10", updated_at: "2011-08-31 09:50:10", status_id: 1>
- ruby-1.9.2-p180 :009 > custom_form_type = CustomFormType.last
- => #<CustomFormType id: 1, name: "gastenboek", mail_template_id: 1, mail_template_staff_id: 4, created_at: nil, updated_at: nil>
- ruby-1.9.2-p180 :010 > custom_form.custom_form_type
- => nil
- ruby-1.9.2-p180 :011 >
- ________________
- class CustomForm < ActiveRecord::Base
- belongs_to :html_page
- belongs_to :custom_form_type
- has_many :custom_form_values, :dependent => :destroy
- ________________
- class CustomFormType < ActiveRecord::Base
- belongs_to :mail_template
- belongs_to :mail_template_staff, :class_name => "MailTemplate"
- has_many :custom_forms
- has_many :custom_form_type_fields, :dependent => :destroy
- end
Add Comment
Please, Sign In to add comment