lib/action_view/component/base.rb in actionview-component-1.3.4 vs lib/action_view/component/base.rb in actionview-component-1.3.5

- old
+ new

@@ -78,10 +78,14 @@ else super end end + def controller + @controller ||= view_context.controller + end + class << self def inherited(child) child.include Rails.application.routes.url_helpers unless child < Rails.application.routes.url_helpers super @@ -153,13 +157,9 @@ "text/html" end end private - - def controller - @controller ||= view_context.controller - end def request @request ||= controller.request end