Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
cb74c014
Commit
cb74c014
authored
Jun 26, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Key strong params
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
8f60b5b4
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
6 deletions
+7
-6
app/controllers/profiles/keys_controller.rb
app/controllers/profiles/keys_controller.rb
+6
-1
app/models/key.rb
app/models/key.rb
+0
-2
app/models/merge_request_diff.rb
app/models/merge_request_diff.rb
+0
-2
app/models/milestone.rb
app/models/milestone.rb
+1
-1
No files found.
app/controllers/profiles/keys_controller.rb
View file @
cb74c014
...
...
@@ -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
app/models/key.rb
View file @
cb74c014
...
...
@@ -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
}
...
...
app/models/merge_request_diff.rb
View file @
cb74c014
...
...
@@ -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
...
...
app/models/milestone.rb
View file @
cb74c014
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment