diff --git a/app/models/section.rb b/app/models/section.rb index d487dd9..48b83ae 100644 --- a/app/models/section.rb +++ b/app/models/section.rb @@ -2,16 +2,15 @@ ## # Associations - belongs_to :version + belongs_to :phase belongs_to :organisation has_many :questions, :dependent => :destroy - has_many :plan_sections, :dependent => :destroy #Link the data accepts_nested_attributes_for :questions, :reject_if => lambda {|a| a[:text].blank? }, :allow_destroy => true # accepts_nested_attributes_for :version - attr_accessible :organisation_id, :description, :number, :title, :version_id , :published, :questions_attributes, :as => [:default, :admin] + attr_accessible :organisation_id, :description, :number, :title, :published, :questions_attributes, :as => [:default, :admin] ## # return the title of the section