Skip to content

Commit

Permalink
Moved Spree::StoreController class_eval from engine to store_controll…
Browse files Browse the repository at this point in the history
…er_decorator.

Part of spree#2415
  • Loading branch information
parndt authored and radar committed Jan 15, 2013
1 parent 39323ea commit a10cfe1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
Spree::StoreController.class_eval do
# Include list of visited paths in notification payload hash
def default_notification_payload
{ :user => try_spree_current_user, :order => current_order, :visited_paths => session[:visited_paths] }
end

protected
def apply_coupon_code
Expand Down
8 changes: 0 additions & 8 deletions promo/lib/spree/promo/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,6 @@ class Engine < Rails::Engine
def self.activate
require 'decorators'
Decorators.register! root

# Why isn't this in a decorator?
Spree::StoreController.class_eval do
# Include list of visited paths in notification payload hash
def default_notification_payload
{ :user => try_spree_current_user, :order => current_order, :visited_paths => session[:visited_paths] }
end
end
end

def self.root
Expand Down

0 comments on commit a10cfe1

Please sign in to comment.