diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index f43a5c5..ef148ae 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -171,6 +171,8 @@ @project = Project.find(params[:id]) authorize @project +puts project_params + if user_signed_in? && @project.editable_by(current_user.id) then if @project.update_attributes(project_params) respond_to do |format| diff --git a/app/models/project.rb b/app/models/project.rb index 793a6c2..7fd01d1 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -15,14 +15,14 @@ # Set the is_public flag to false if we are making this a test plan # ----------------------------------------------------------------- def is_test=(val) - self[:is_public] = false if val && is_public? + self[:is_public] = false if (val == 1) && is_public? # val comes in as 1 or 0 self[:is_test] = val end # Set the is_test flag to false if we are making this plan public # ----------------------------------------------------------------- def is_public=(val) - self[:is_test] = false if val && is_test? + self[:is_test] = false if (val == 1) && is_test? # val comes in as 1 or 0 self[:is_public] = val end