Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix view context

Closes #313
  • Loading branch information...
commit c5b027d3470bbcf051f3e38afbc54d56f10af3a9 1 parent cef5e62
@haines haines authored
Showing with 3 additions and 6 deletions.
  1. +3 −1 lib/draper/system.rb
  2. +0 −5 lib/draper/view_context.rb
View
4 lib/draper/system.rb
@@ -12,7 +12,9 @@ def self.setup_action_controller(component)
end
def self.setup_action_mailer(component)
- include Draper::ViewContext
+ component.class_eval do
+ include Draper::ViewContext
+ end
end
end
end
View
5 lib/draper/view_context.rb
@@ -26,11 +26,6 @@ def view_context
def self.build_view_context
current_controller.view_context.tap do |context|
- context.instance_eval do
- def url_options
- ActionMailer::Base.default_url_options
- end
- end unless context.request
if defined?(ActionController::TestRequest)
context.controller.request ||= ActionController::TestRequest.new
context.request ||= context.controller.request
Please sign in to comment.
Something went wrong with that request. Please try again.