Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/controllers/alchemy/admin/pages_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ class PagesController < ResourcesController

before_action :load_resource, except: [:index, :flush, :new, :create, :copy_language_tree, :link]

authorize_resource class: Alchemy::Page, except: [:index, :tree]
authorize_resource class: Alchemy::Page, except: [:index]

before_action only: [:index, :tree, :flush, :new, :create, :copy_language_tree] do
before_action only: [:index, :flush, :new, :create, :copy_language_tree] do
authorize! :index, :alchemy_admin_pages
end

Expand Down
3 changes: 3 additions & 0 deletions spec/dummy/config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
config.cache_store = :null_store
end

# Raise error when a before_action's only/except options reference missing actions.
config.action_controller.raise_on_missing_callback_actions = true

# Don't care if the mailer can't send.
config.action_mailer.raise_delivery_errors = false

Expand Down
3 changes: 3 additions & 0 deletions spec/dummy/config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
# Disable request forgery protection in test environment.
config.action_controller.allow_forgery_protection = true

# Raise error when a before_action's only/except options reference missing actions.
config.action_controller.raise_on_missing_callback_actions = true

config.action_mailer.perform_caching = false

# Tell Action Mailer not to deliver emails to the real world.
Expand Down