Module: ActivityNotification::StoreController

Extended by:
ActiveSupport::Concern
Defined in:
lib/activity_notification/controllers/store_controller.rb

Overview

Module included in controllers to allow ActivityNotification access to controller instance

Instance Method Summary collapse

Instance Method Details

#store_controller_for_activity_notificationObject

Sets controller as around action to use controller instance in models or helpers



29
30
31
32
33
34
35
36
# File 'lib/activity_notification/controllers/store_controller.rb', line 29

def store_controller_for_activity_notification
  begin
    ActivityNotification.set_controller(self)
    yield
  ensure
    ActivityNotification.set_controller(nil)
  end
end