Sha256: e70ae849524676d91742cc0b657396bff56ec06d8a8570fd50a418ba95e684c4

Contents?: true

Size: 559 Bytes

Versions: 45

Compression:

Stored size: 559 Bytes

Contents

class Admin::SystemCommandsController < Admin::BaseController
  def index
  end

  def update
    return redirect_to [:admin, :system_commands], alert: 'Необходимо указать команду' unless params[:id].present?
    return redirect_to [:admin, :system_commands], notice: 'Недопустимый тип команды' unless Redde::SystemCommand::ALLOWED_ACTIONS.include?(params[:id].to_s)
    Redde::SystemCommand.execute(params[:id])
    redirect_to [:admin, :system_commands], notice: 'Команда отправлена'
  end
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
redde-0.4.4 app/controllers/admin/system_commands_controller.rb
redde-0.4.3 app/controllers/admin/system_commands_controller.rb
redde-0.4.2 app/controllers/admin/system_commands_controller.rb
redde-0.4.1 app/controllers/admin/system_commands_controller.rb
redde-0.4.0 app/controllers/admin/system_commands_controller.rb
redde-0.3.39 app/controllers/admin/system_commands_controller.rb
redde-0.3.38 app/controllers/admin/system_commands_controller.rb
redde-0.3.37 app/controllers/admin/system_commands_controller.rb
redde-0.3.36 app/controllers/admin/system_commands_controller.rb
redde-0.3.35 app/controllers/admin/system_commands_controller.rb
redde-0.3.34 app/controllers/admin/system_commands_controller.rb
redde-0.3.33 app/controllers/admin/system_commands_controller.rb
redde-0.3.32 app/controllers/admin/system_commands_controller.rb
redde-0.3.31 app/controllers/admin/system_commands_controller.rb
redde-0.3.30 app/controllers/admin/system_commands_controller.rb
redde-0.3.29 app/controllers/admin/system_commands_controller.rb
redde-0.3.28 app/controllers/admin/system_commands_controller.rb
redde-0.3.27 app/controllers/admin/system_commands_controller.rb
redde-0.3.26 app/controllers/admin/system_commands_controller.rb
redde-0.3.25 app/controllers/admin/system_commands_controller.rb