summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/controllers/profiles/keys_controller.rb7
-rw-r--r--app/models/key.rb2
-rw-r--r--app/models/merge_request_diff.rb2
-rw-r--r--app/models/milestone.rb2
4 files changed, 7 insertions, 6 deletions
diff --git a/app/controllers/profiles/keys_controller.rb b/app/controllers/profiles/keys_controller.rb
index 6713cd7c8c7..88414b13564 100644
--- a/app/controllers/profiles/keys_controller.rb
+++ b/app/controllers/profiles/keys_controller.rb
@@ -15,7 +15,7 @@ class Profiles::KeysController < ApplicationController
end
def create
- @key = current_user.keys.new(params[:key])
+ @key = current_user.keys.new(key_params)
if @key.save
redirect_to profile_key_path(@key)
@@ -53,4 +53,9 @@ class Profiles::KeysController < ApplicationController
end
end
+ private
+
+ def key_params
+ params.require(:key).permit(:title, :key)
+ end
end
diff --git a/app/models/key.rb b/app/models/key.rb
index 035c9efa016..d59993b1905 100644
--- a/app/models/key.rb
+++ b/app/models/key.rb
@@ -19,8 +19,6 @@ class Key < ActiveRecord::Base
belongs_to :user
- attr_accessible :key, :title
-
before_validation :strip_white_space, :generate_fingerpint
validates :title, presence: true, length: { within: 0..255 }
diff --git a/app/models/merge_request_diff.rb b/app/models/merge_request_diff.rb
index 7dce71a677b..d3c07555b0c 100644
--- a/app/models/merge_request_diff.rb
+++ b/app/models/merge_request_diff.rb
@@ -22,8 +22,6 @@ class MergeRequestDiff < ActiveRecord::Base
belongs_to :merge_request
- attr_accessible :state, :st_commits, :st_diffs
-
delegate :target_branch, :source_branch, to: :merge_request, prefix: nil
state_machine :state, initial: :empty do
diff --git a/app/models/milestone.rb b/app/models/milestone.rb
index 39ab0b536a3..e28de72c37f 100644
--- a/app/models/milestone.rb
+++ b/app/models/milestone.rb
@@ -16,7 +16,7 @@
class Milestone < ActiveRecord::Base
include InternalId
- attr_accessible :title, :description, :due_date, :state_event
+ #attr_accessible :title, :description, :due_date, :state_event
belongs_to :project
has_many :issues