Sha256: b565ba8d1ce3725c0fdb57df2d027f893c18cbe732f6f5cee7cc57a5bc72fcfa
Contents?: true
Size: 1.08 KB
Versions: 14
Compression:
Stored size: 1.08 KB
Contents
module ForemanSalt class SaltEnvironmentsController < ::ForemanSalt::ApplicationController include Foreman::Controller::AutoCompleteSearch include ::ForemanSalt::Concerns::SaltEnvironmentParameters before_action :find_resource, :only => [:edit, :update, :destroy] def index @salt_environments = resource_base.search_for(params[:search], :order => params[:order]).paginate(:page => params[:page]) end def new @salt_environment = SaltEnvironment.new end def create @salt_environment = SaltEnvironment.new(salt_environment_params) if @salt_environment.save process_success else process_error end end def edit end def update if @salt_environment.update_attributes(salt_environment_params) success _('Successfully updated %s.' % @salt_environment.to_s) redirect_to salt_environments_path else process_error end end def destroy if @salt_environment.destroy process_success else process_error end end end end
Version data entries
14 entries across 14 versions & 1 rubygems