Class: ActionViewHelper
- Inherits:
-
Object
- Object
- ActionViewHelper
- Defined in:
- lib/services/action_view_helper.rb
Instance Attribute Summary collapse
-
#action_view ⇒ Object
readonly
Returns the value of attribute action_view.
Instance Method Summary collapse
-
#initialize ⇒ ActionViewHelper
constructor
A new instance of ActionViewHelper.
Constructor Details
#initialize ⇒ ActionViewHelper
Returns a new instance of ActionViewHelper.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/services/action_view_helper.rb', line 5 def initialize notifly_path = File.(File.dirname(File.dirname(__FILE__))) + '../../app/views/notifly' ActionController::Base.prepend_view_path(notifly_path) @action_view = ActionView::Base.new(ActionController::Base.view_paths) @action_view.extend ApplicationHelper @action_view.class_eval do include Notifly::Engine.routes.url_helpers def protect_against_forgery? false end end end |
Instance Attribute Details
#action_view ⇒ Object (readonly)
Returns the value of attribute action_view.
2 3 4 |
# File 'lib/services/action_view_helper.rb', line 2 def action_view @action_view end |