Skip to content

Commit

Permalink
Merge 21e33df into 6472173
Browse files Browse the repository at this point in the history
  • Loading branch information
timoschilling committed Sep 10, 2014
2 parents 6472173 + 21e33df commit 9c48a41
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/active_admin/resource_dsl.rb
Expand Up @@ -151,9 +151,13 @@ def collection_action(name, options = {}, &block)
delegate :before_save, :after_save, to: :controller
delegate :before_destroy, :after_destroy, to: :controller

# Standard rails filters
delegate :before_filter, :skip_before_filter, :after_filter, :skip_after_filter, :around_filter, :skip_filter,
to: :controller
# Standard rails actions
types = [:filter]
types << :action if Rails::VERSION::MAJOR == 4
types.each do |type|
delegate :"before_#{type}", :"skip_before_#{type}", :"after_#{type}", :"skip_after_#{type}", :"around_#{type}", :"skip_#{type}",
to: :controller
end

# Specify which actions to create in the controller
#
Expand Down

0 comments on commit 9c48a41

Please sign in to comment.