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
Boxiang Sun
gitlab-ce
Commits
102aaf06
Commit
102aaf06
authored
Jun 22, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use simple render syntax in controllers
parent
edcd4659
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
9 deletions
+9
-9
app/controllers/admin/groups_controller.rb
app/controllers/admin/groups_controller.rb
+2
-2
app/controllers/admin/users_controller.rb
app/controllers/admin/users_controller.rb
+2
-2
app/controllers/merge_requests_controller.rb
app/controllers/merge_requests_controller.rb
+2
-2
app/controllers/projects_controller.rb
app/controllers/projects_controller.rb
+3
-3
No files found.
app/controllers/admin/groups_controller.rb
View file @
102aaf06
...
...
@@ -25,7 +25,7 @@ class Admin::GroupsController < Admin::ApplicationController
if
@group
.
save
redirect_to
[
:admin
,
@group
],
notice:
'Group was successfully created.'
else
render
action:
"new"
render
"new"
end
end
...
...
@@ -40,7 +40,7 @@ class Admin::GroupsController < Admin::ApplicationController
if
@group
.
update_attributes
(
group_params
)
redirect_to
[
:admin
,
@group
],
notice:
'Group was successfully updated.'
else
render
action:
"edit"
render
"edit"
end
end
...
...
app/controllers/admin/users_controller.rb
View file @
102aaf06
...
...
@@ -53,7 +53,7 @@ class Admin::UsersController < Admin::ApplicationController
format
.
html
{
redirect_to
[
:admin
,
@admin_user
],
notice:
'User was successfully created.'
}
format
.
json
{
render
json:
@admin_user
,
status: :created
,
location:
@admin_user
}
else
format
.
html
{
render
action:
"new"
}
format
.
html
{
render
"new"
}
format
.
json
{
render
json:
@admin_user
.
errors
,
status: :unprocessable_entity
}
end
end
...
...
@@ -76,7 +76,7 @@ class Admin::UsersController < Admin::ApplicationController
else
# restore username to keep form action url.
admin_user
.
username
=
params
[
:id
]
format
.
html
{
render
action:
"edit"
}
format
.
html
{
render
"edit"
}
format
.
json
{
render
json:
admin_user
.
errors
,
status: :unprocessable_entity
}
end
end
...
...
app/controllers/merge_requests_controller.rb
View file @
102aaf06
...
...
@@ -54,7 +54,7 @@ class MergeRequestsController < ProjectResourceController
@merge_request
.
reload_code
redirect_to
[
@project
,
@merge_request
],
notice:
'Merge request was successfully created.'
else
render
action:
"new"
render
"new"
end
end
...
...
@@ -64,7 +64,7 @@ class MergeRequestsController < ProjectResourceController
@merge_request
.
mark_as_unchecked
redirect_to
[
@project
,
@merge_request
],
notice:
'Merge request was successfully updated.'
else
render
action:
"edit"
render
"edit"
end
end
...
...
app/controllers/projects_controller.rb
View file @
102aaf06
...
...
@@ -27,7 +27,7 @@ class ProjectsController < ProjectResourceController
if
@project
.
saved?
redirect_to
@project
else
render
action:
"new"
render
"new"
end
end
format
.
js
...
...
@@ -43,7 +43,7 @@ class ProjectsController < ProjectResourceController
format
.
html
{
redirect_to
edit_project_path
(
@project
),
notice:
'Project was successfully updated.'
}
format
.
js
else
format
.
html
{
render
action:
"edit"
,
layout:
"project_settings"
}
format
.
html
{
render
"edit"
,
layout:
"project_settings"
}
format
.
js
end
end
...
...
@@ -90,7 +90,7 @@ class ProjectsController < ProjectResourceController
redirect_to
(
@forked_project
,
notice:
'Project was successfully forked.'
)
else
@title
=
'Fork project'
render
action:
"fork"
render
"fork"
end
end
format
.
js
...
...
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