diff --git a/app/models/plan.rb b/app/models/plan.rb index 96d3aea..98c5f19 100644 --- a/app/models/plan.rb +++ b/app/models/plan.rb @@ -1,7 +1,7 @@ class Plan < ActiveRecord::Base attr_accessible :locked, :project_id, :version_id, :version, :plan_sections, - :Exported_plans, :as => [:default, :admin] + :Exported_plans, :project, :version, :as => [:default, :admin] A4_PAGE_HEIGHT = 297 #(in mm) A4_PAGE_WIDTH = 210 #(in mm) diff --git a/app/models/question.rb b/app/models/question.rb index aed95fb..a5b1d7a 100644 --- a/app/models/question.rb +++ b/app/models/question.rb @@ -20,7 +20,10 @@ accepts_nested_attributes_for :suggested_answers, :allow_destroy => true accepts_nested_attributes_for :themes - attr_accessible :default_value, :dependency_id, :dependency_text, :guidance,:number, :parent_id, :suggested_answer, :text, :section_id,:question_format_id,:options_attributes, :suggested_answers_attributes, :option_comment_display, :theme_ids, :as => [:default, :admin] + attr_accessible :default_value, :dependency_id, :dependency_text, :guidance,:number, :parent_id, + :suggested_answer, :text, :section_id,:question_format_id,:options_attributes, + :suggested_answers_attributes, :option_comment_display, :theme_ids, + :options, :section, :question_format, :as => [:default, :admin] ## # returns the text from the question diff --git a/app/models/section.rb b/app/models/section.rb index e67367d..28bc4c7 100644 --- a/app/models/section.rb +++ b/app/models/section.rb @@ -11,7 +11,7 @@ # accepts_nested_attributes_for :version attr_accessible :organisation_id, :description, :number, :title, :version_id, :questions, :version, - :published, :questions_attributes, :as => [:default, :admin] + :published, :questions_attributes, :organisation, :as => [:default, :admin] ## # return the title of the section