lib/remnant/rails.rb in remnant-0.2.1 vs lib/remnant/rails.rb in remnant-0.2.2
- old
+ new
@@ -31,12 +31,10 @@
# stat collection below
#
# hook remnants
Remnant::Discover.find('request', ActionController::Dispatcher, :call)
- Remnant::Discover.find('dispatch', ActionController::Dispatcher, :_call)
- Remnant::Discover.find('process', ActionController::Base, :process)
Remnant::Discover.find('filters', ActionController::Filters::BeforeFilter, :call)
Remnant::Discover.find('action', ActionController::Base, :perform_action)
Remnant::Discover.find('view', ActionController::Base, :render)
Remnant::Discover.find('filters', ActionController::Filters::AfterFilter, :call)
@@ -60,10 +58,9 @@
end
# hook into perform_action for the extra remnant key
::ActionController::Base.class_eval do
def perform_action_with_remnant_key(*args, &block) #:nodoc:
- ::Remnant::Discover.results[:extra_remnant_key] = "#{params[:controller].to_s.underscore}.#{params[:action]}"
perform_action_without_remnant_key(*args, &block)
end
alias_method_chain :perform_action, :remnant_key
end
end # setup!