BigW Consortium Gitlab

group_variable_presenter.rb 463 Bytes
Newer Older
Shinya Maeda committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
module Ci
  class GroupVariablePresenter < Gitlab::View::Presenter::Delegated
    presents :variable

    def placeholder
      'GROUP_VARIABLE'
    end

    def form_path
      if variable.persisted?
        group_variable_path(group, variable)
      else
        group_variables_path(group)
      end
    end

    def edit_path
      group_variable_path(group, variable)
    end

    def delete_path
      group_variable_path(group, variable)
    end
  end
end