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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
3dfcb95f
Commit
3dfcb95f
authored
Jan 23, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use ruby 1.9 hash syntax
parent
630ff574
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
app/controllers/passwords_controller.rb
app/controllers/passwords_controller.rb
+2
-2
app/controllers/projects/protected_branches_controller.rb
app/controllers/projects/protected_branches_controller.rb
+1
-1
No files found.
app/controllers/passwords_controller.rb
View file @
3dfcb95f
...
...
@@ -5,12 +5,12 @@ class PasswordsController < Devise::PasswordsController
resource_found
=
resource_class
.
find_by_email
(
email
)
if
resource_found
&&
resource_found
.
ldap_user?
flash
[
:alert
]
=
"Cannot reset password for LDAP user."
respond_with
({},
:location
=>
after_sending_reset_password_instructions_path_for
(
resource_name
))
and
return
respond_with
({},
location:
after_sending_reset_password_instructions_path_for
(
resource_name
))
and
return
end
self
.
resource
=
resource_class
.
send_reset_password_instructions
(
resource_params
)
if
successfully_sent?
(
resource
)
respond_with
({},
:location
=>
after_sending_reset_password_instructions_path_for
(
resource_name
))
respond_with
({},
location:
after_sending_reset_password_instructions_path_for
(
resource_name
))
else
respond_with
(
resource
)
end
...
...
app/controllers/projects/protected_branches_controller.rb
View file @
3dfcb95f
...
...
@@ -24,7 +24,7 @@ class Projects::ProtectedBranchesController < Projects::ApplicationController
)
respond_to
do
|
format
|
format
.
json
{
render
:json
=>
protected_branch
,
status: :ok
}
format
.
json
{
render
json:
protected_branch
,
status: :ok
}
end
else
respond_to
do
|
format
|
...
...
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