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.3.24 app/controllers/admin/system_commands_controller.rb
redde-0.3.23 app/controllers/admin/system_commands_controller.rb
redde-0.3.22 app/controllers/admin/system_commands_controller.rb
redde-0.3.21 app/controllers/admin/system_commands_controller.rb
redde-0.3.20 app/controllers/admin/system_commands_controller.rb
redde-0.3.19 app/controllers/admin/system_commands_controller.rb
redde-0.3.18 app/controllers/admin/system_commands_controller.rb
redde-0.3.17 app/controllers/admin/system_commands_controller.rb
redde-0.3.16 app/controllers/admin/system_commands_controller.rb
redde-0.3.15 app/controllers/admin/system_commands_controller.rb
redde-0.3.14 app/controllers/admin/system_commands_controller.rb
redde-0.3.13 app/controllers/admin/system_commands_controller.rb
redde-0.3.12 app/controllers/admin/system_commands_controller.rb
redde-0.3.11 app/controllers/admin/system_commands_controller.rb
redde-0.3.10 app/controllers/admin/system_commands_controller.rb
redde-0.3.9 app/controllers/admin/system_commands_controller.rb
redde-0.3.8 app/controllers/admin/system_commands_controller.rb
redde-0.3.7 app/controllers/admin/system_commands_controller.rb
redde-0.3.6 app/controllers/admin/system_commands_controller.rb
redde-0.3.5 app/controllers/admin/system_commands_controller.rb