Class: ForemanSalt::SaltVariablesController
- Inherits:
-
LookupKeysController
- Object
- LookupKeysController
- ForemanSalt::SaltVariablesController
- Includes:
- Foreman::Controller::AutoCompleteSearch, Concerns::SaltVariableParameters
- Defined in:
- app/controllers/foreman_salt/salt_variables_controller.rb
Overview
UI controller for salt variables
Instance Method Summary collapse
Methods included from Concerns::SaltVariableParameters
Instance Method Details
#create ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'app/controllers/foreman_salt/salt_variables_controller.rb', line 21 def create @salt_variable = SaltVariable.new(salt_variable_params) if @salt_variable.save process_success else process_error end end |
#index ⇒ Object
11 12 13 14 15 |
# File 'app/controllers/foreman_salt/salt_variables_controller.rb', line 11 def index @salt_variables = resource_base.search_for(params[:search], order: params[:order]).paginate(page: params[:page], per_page: params[:per_page]) end |
#new ⇒ Object
17 18 19 |
# File 'app/controllers/foreman_salt/salt_variables_controller.rb', line 17 def new @salt_variable = SaltVariable.new end |
#resource_class ⇒ Object
30 31 32 |
# File 'app/controllers/foreman_salt/salt_variables_controller.rb', line 30 def resource_class "ForemanSalt::#{controller_name.singularize.classify}".constantize end |