Commit 102aaf0682e7e670fecbaf2cdc9ed1c35647f04f
1 parent
edcd4659
Exists in
master
and in
4 other branches
Use simple render syntax in controllers
Showing
4 changed files
with
9 additions
and
9 deletions
Show diff stats
app/controllers/admin/groups_controller.rb
| ... | ... | @@ -25,7 +25,7 @@ class Admin::GroupsController < Admin::ApplicationController |
| 25 | 25 | if @group.save |
| 26 | 26 | redirect_to [:admin, @group], notice: 'Group was successfully created.' |
| 27 | 27 | else |
| 28 | - render action: "new" | |
| 28 | + render "new" | |
| 29 | 29 | end |
| 30 | 30 | end |
| 31 | 31 | |
| ... | ... | @@ -40,7 +40,7 @@ class Admin::GroupsController < Admin::ApplicationController |
| 40 | 40 | if @group.update_attributes(group_params) |
| 41 | 41 | redirect_to [:admin, @group], notice: 'Group was successfully updated.' |
| 42 | 42 | else |
| 43 | - render action: "edit" | |
| 43 | + render "edit" | |
| 44 | 44 | end |
| 45 | 45 | end |
| 46 | 46 | ... | ... |
app/controllers/admin/users_controller.rb
| ... | ... | @@ -53,7 +53,7 @@ class Admin::UsersController < Admin::ApplicationController |
| 53 | 53 | format.html { redirect_to [:admin, @admin_user], notice: 'User was successfully created.' } |
| 54 | 54 | format.json { render json: @admin_user, status: :created, location: @admin_user } |
| 55 | 55 | else |
| 56 | - format.html { render action: "new" } | |
| 56 | + format.html { render "new" } | |
| 57 | 57 | format.json { render json: @admin_user.errors, status: :unprocessable_entity } |
| 58 | 58 | end |
| 59 | 59 | end |
| ... | ... | @@ -76,7 +76,7 @@ class Admin::UsersController < Admin::ApplicationController |
| 76 | 76 | else |
| 77 | 77 | # restore username to keep form action url. |
| 78 | 78 | admin_user.username = params[:id] |
| 79 | - format.html { render action: "edit" } | |
| 79 | + format.html { render "edit" } | |
| 80 | 80 | format.json { render json: admin_user.errors, status: :unprocessable_entity } |
| 81 | 81 | end |
| 82 | 82 | end | ... | ... |
app/controllers/merge_requests_controller.rb
| ... | ... | @@ -54,7 +54,7 @@ class MergeRequestsController < ProjectResourceController |
| 54 | 54 | @merge_request.reload_code |
| 55 | 55 | redirect_to [@project, @merge_request], notice: 'Merge request was successfully created.' |
| 56 | 56 | else |
| 57 | - render action: "new" | |
| 57 | + render "new" | |
| 58 | 58 | end |
| 59 | 59 | end |
| 60 | 60 | |
| ... | ... | @@ -64,7 +64,7 @@ class MergeRequestsController < ProjectResourceController |
| 64 | 64 | @merge_request.mark_as_unchecked |
| 65 | 65 | redirect_to [@project, @merge_request], notice: 'Merge request was successfully updated.' |
| 66 | 66 | else |
| 67 | - render action: "edit" | |
| 67 | + render "edit" | |
| 68 | 68 | end |
| 69 | 69 | end |
| 70 | 70 | ... | ... |
app/controllers/projects_controller.rb
| ... | ... | @@ -27,7 +27,7 @@ class ProjectsController < ProjectResourceController |
| 27 | 27 | if @project.saved? |
| 28 | 28 | redirect_to @project |
| 29 | 29 | else |
| 30 | - render action: "new" | |
| 30 | + render "new" | |
| 31 | 31 | end |
| 32 | 32 | end |
| 33 | 33 | format.js |
| ... | ... | @@ -43,7 +43,7 @@ class ProjectsController < ProjectResourceController |
| 43 | 43 | format.html { redirect_to edit_project_path(@project), notice: 'Project was successfully updated.' } |
| 44 | 44 | format.js |
| 45 | 45 | else |
| 46 | - format.html { render action: "edit", layout: "project_settings" } | |
| 46 | + format.html { render "edit", layout: "project_settings" } | |
| 47 | 47 | format.js |
| 48 | 48 | end |
| 49 | 49 | end |
| ... | ... | @@ -90,7 +90,7 @@ class ProjectsController < ProjectResourceController |
| 90 | 90 | redirect_to(@forked_project, notice: 'Project was successfully forked.') |
| 91 | 91 | else |
| 92 | 92 | @title = 'Fork project' |
| 93 | - render action: "fork" | |
| 93 | + render "fork" | |
| 94 | 94 | end |
| 95 | 95 | end |
| 96 | 96 | format.js | ... | ... |