summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2015-12-10 17:44:06 +0100
committerKamil Trzcinski <ayufan@ayufan.eu>2015-12-11 18:02:09 +0100
commit64bfd9d71a4017e0b5336a2c1565926f4b8beedd (patch)
tree8b7770af4cf0e54db3ada26550af9cbda4eabbb0 /app/controllers
parent8cdd54cc0696b76daa2baf463d02d944b50bac6a (diff)
downloadgitlab-ce-64bfd9d71a4017e0b5336a2c1565926f4b8beedd.tar.gz
Remove ci_ prefix from all ci related things
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/admin/runner_projects_controller.rb4
-rw-r--r--app/controllers/projects/builds_controller.rb6
-rw-r--r--app/controllers/projects/runner_projects_controller.rb2
-rw-r--r--app/controllers/projects/runners_controller.rb6
-rw-r--r--app/controllers/projects/triggers_controller.rb8
-rw-r--r--app/controllers/projects/variables_controller.rb2
6 files changed, 14 insertions, 14 deletions
diff --git a/app/controllers/admin/runner_projects_controller.rb b/app/controllers/admin/runner_projects_controller.rb
index 20d621742f9..d25619d94e0 100644
--- a/app/controllers/admin/runner_projects_controller.rb
+++ b/app/controllers/admin/runner_projects_controller.rb
@@ -2,8 +2,8 @@ class Admin::RunnerProjectsController < Admin::ApplicationController
before_action :project, only: [:create]
def index
- @runner_projects = project.ci_runner_projects.all
- @runner_project = project.ci_runner_projects.new
+ @runner_projects = project.runner_projects.all
+ @runner_project = project.runner_projects.new
end
def create
diff --git a/app/controllers/projects/builds_controller.rb b/app/controllers/projects/builds_controller.rb
index e7e2ab43130..26ba12520c7 100644
--- a/app/controllers/projects/builds_controller.rb
+++ b/app/controllers/projects/builds_controller.rb
@@ -8,7 +8,7 @@ class Projects::BuildsController < Projects::ApplicationController
def index
@scope = params[:scope]
- @all_builds = project.ci_builds
+ @all_builds = project.builds
@builds = @all_builds.order('created_at DESC')
@builds =
case @scope
@@ -23,7 +23,7 @@ class Projects::BuildsController < Projects::ApplicationController
end
def cancel_all
- @project.ci_builds.running_or_pending.each(&:cancel)
+ @project.builds.running_or_pending.each(&:cancel)
redirect_to namespace_project_builds_path(project.namespace, project)
end
@@ -76,7 +76,7 @@ class Projects::BuildsController < Projects::ApplicationController
private
def build
- @build ||= project.ci_builds.unscoped.find_by!(id: params[:id])
+ @build ||= project.builds.unscoped.find_by!(id: params[:id])
end
def artifacts_file
diff --git a/app/controllers/projects/runner_projects_controller.rb b/app/controllers/projects/runner_projects_controller.rb
index 69863387354..e2785caa2fb 100644
--- a/app/controllers/projects/runner_projects_controller.rb
+++ b/app/controllers/projects/runner_projects_controller.rb
@@ -18,7 +18,7 @@ class Projects::RunnerProjectsController < Projects::ApplicationController
end
def destroy
- runner_project = project.ci_runner_projects.find(params[:id])
+ runner_project = project.runner_projects.find(params[:id])
runner_project.destroy
redirect_to runners_path(project)
diff --git a/app/controllers/projects/runners_controller.rb b/app/controllers/projects/runners_controller.rb
index 863c5d131ab..4993b2648a5 100644
--- a/app/controllers/projects/runners_controller.rb
+++ b/app/controllers/projects/runners_controller.rb
@@ -5,9 +5,9 @@ class Projects::RunnersController < Projects::ApplicationController
layout 'project_settings'
def index
- @runners = project.ci_runners.ordered
+ @runners = project.runners.ordered
@specific_runners = current_user.ci_authorized_runners.
- where.not(id: project.ci_runners).
+ where.not(id: project.runners).
ordered.page(params[:page]).per(20)
@shared_runners = Ci::Runner.shared.active
@shared_runners_count = @shared_runners.count(:all)
@@ -60,7 +60,7 @@ class Projects::RunnersController < Projects::ApplicationController
protected
def set_runner
- @runner ||= project.ci_runners.find(params[:id])
+ @runner ||= project.runners.find(params[:id])
end
def runner_params
diff --git a/app/controllers/projects/triggers_controller.rb b/app/controllers/projects/triggers_controller.rb
index 421e648a2dd..30adfad1daa 100644
--- a/app/controllers/projects/triggers_controller.rb
+++ b/app/controllers/projects/triggers_controller.rb
@@ -4,18 +4,18 @@ class Projects::TriggersController < Projects::ApplicationController
layout 'project_settings'
def index
- @triggers = project.ci_triggers
+ @triggers = project.triggers
@trigger = Ci::Trigger.new
end
def create
- @trigger = project.ci_triggers.new
+ @trigger = project.triggers.new
@trigger.save
if @trigger.valid?
redirect_to namespace_project_triggers_path(@project.namespace, @project)
else
- @triggers = project.ci_triggers.select(&:persisted?)
+ @triggers = project.triggers.select(&:persisted?)
render :index
end
end
@@ -29,6 +29,6 @@ class Projects::TriggersController < Projects::ApplicationController
private
def trigger
- @trigger ||= project.ci_triggers.find(params[:id])
+ @trigger ||= project.triggers.find(params[:id])
end
end
diff --git a/app/controllers/projects/variables_controller.rb b/app/controllers/projects/variables_controller.rb
index 1dab978f462..10efafea9db 100644
--- a/app/controllers/projects/variables_controller.rb
+++ b/app/controllers/projects/variables_controller.rb
@@ -17,6 +17,6 @@ class Projects::VariablesController < Projects::ApplicationController
private
def project_params
- params.require(:project).permit({ ci_variables_attributes: [:id, :key, :value, :_destroy] })
+ params.require(:project).permit({ variables_attributes: [:id, :key, :value, :_destroy] })
end
end