Skip to content

Commit d9785f7

Browse files
committed
Allow override in the view
1 parent 4b5ac2b commit d9785f7

File tree

3 files changed

+0
-17
lines changed

3 files changed

+0
-17
lines changed

app/controllers/shipit/tasks_controller.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ def index
1616
def new
1717
@definition = stack.find_task_definition(params[:definition_id])
1818
@task = stack.tasks.build(definition: @definition)
19-
@task.definition.override_variables(params)
2019
end
2120

2221
def show

app/models/shipit/task_definition.rb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,6 @@ def render_title(env)
4040
"This task (title: #{@title}) cannot be shown due to an incorrect variable name. Check your shipit.yml file"
4141
end
4242

43-
def override_variables(params)
44-
variables.each do |var|
45-
if params.key?(var.name)
46-
var.override_value(params[var.name])
47-
end
48-
end
49-
end
50-
5143
def allow_concurrency?
5244
@allow_concurrency
5345
end

app/models/shipit/variable_definition.rb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,6 @@ def default_provided?
1515
@default_provided
1616
end
1717

18-
def override_value(value)
19-
@override = value.to_s
20-
end
21-
22-
def value
23-
@override.presence || default
24-
end
25-
2618
def to_h
2719
{
2820
'name' => @name,

0 commit comments

Comments
 (0)