Commit 7d6d3421 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Share form editable attributes mf runner via model

parent 732e98ee
...@@ -58,6 +58,6 @@ class Admin::RunnersController < Admin::ApplicationController ...@@ -58,6 +58,6 @@ class Admin::RunnersController < Admin::ApplicationController
end end
def runner_params def runner_params
params.require(:runner).permit(:token, :description, :tag_list, :active) params.require(:runner).permit(Ci::Runner::FORM_EDITABLE)
end end
end end
...@@ -64,6 +64,6 @@ class Projects::RunnersController < Projects::ApplicationController ...@@ -64,6 +64,6 @@ class Projects::RunnersController < Projects::ApplicationController
end end
def runner_params def runner_params
params.require(:runner).permit(:description, :tag_list, :active) params.require(:runner).permit(Ci::Runner::FORM_EDITABLE)
end end
end end
...@@ -23,6 +23,7 @@ module Ci ...@@ -23,6 +23,7 @@ module Ci
LAST_CONTACT_TIME = 5.minutes.ago LAST_CONTACT_TIME = 5.minutes.ago
AVAILABLE_SCOPES = ['specific', 'shared', 'active', 'paused', 'online'] AVAILABLE_SCOPES = ['specific', 'shared', 'active', 'paused', 'online']
FORM_EDITABLE = [:description, :tag_list, :active]
has_many :builds, class_name: 'Ci::Build' has_many :builds, class_name: 'Ci::Build'
has_many :runner_projects, dependent: :destroy, class_name: 'Ci::RunnerProject' has_many :runner_projects, dependent: :destroy, class_name: 'Ci::RunnerProject'
......
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