Commit 102aaf06 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Use simple render syntax in controllers

parent edcd4659
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment