diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-06-26 23:24:17 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-06-26 23:24:17 +0300 |
commit | 8fee5a0572372b1d3a69fa1816380eb11182afaf (patch) | |
tree | fc55e8387fc298d874629faaf3c4f3a4260d7164 /app/services/milestones | |
parent | 2acde87e0d223bbc3ecd15777b9a1048d6bc5172 (diff) | |
download | gitlab-ce-8fee5a0572372b1d3a69fa1816380eb11182afaf.tar.gz |
Make app works with strong params
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/services/milestones')
-rw-r--r-- | app/services/milestones/update_service.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/milestones/update_service.rb b/app/services/milestones/update_service.rb index 307e96a2b36..ed64847f429 100644 --- a/app/services/milestones/update_service.rb +++ b/app/services/milestones/update_service.rb @@ -1,7 +1,7 @@ module Milestones class UpdateService < Milestones::BaseService def execute(milestone) - state = params.delete('state_event') || params.delete(:state_event) + state = params[:state_event] case state when 'activate' @@ -11,7 +11,7 @@ module Milestones end if params.present? - milestone.update_attributes(params) + milestone.update_attributes(params.except(:state_event)) end milestone |