Sha256: 80002951c2c40e151a53d355923accadb24c74a4ebdf8b5c7e2043964f7d7f77

Contents?: true

Size: 584 Bytes

Versions: 6

Compression:

Stored size: 584 Bytes

Contents

class Admin::SitesController < Admin::ResourceController
  helper :sites
  before_action :authorize_role
  only_allow_access_to :index, :show, :new, :create, :edit, :update, :remove, :destroy,
                       when: :admin,
                       denied_url: { controller: 'pages', action: 'index' },
                       denied_message: 'You must have administrative privileges to perform this action.'

  %w(move_higher move_lower move_to_top move_to_bottom).each do |action|
    define_method action do
      model.send(action)
      response_for :update
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
trusty-cms-7.0.8 app/controllers/admin/sites_controller.rb
trusty-cms-7.0.7 app/controllers/admin/sites_controller.rb
trusty-cms-7.0.6 app/controllers/admin/sites_controller.rb
trusty-cms-7.0.5 app/controllers/admin/sites_controller.rb
trusty-cms-7.0.4 app/controllers/admin/sites_controller.rb
trusty-cms-7.0.3 app/controllers/admin/sites_controller.rb