lib/mobile_enhancements/helper_delegation.rb in mobile-enhancements-0.0.2 vs lib/mobile_enhancements/helper_delegation.rb in mobile-enhancements-0.0.3

- old
+ new

@@ -1,17 +1,20 @@ require "forwardable" require "mobile_enhancements" require "mobile_enhancements/request_helper" +require "mobile_enhancements/url_helper" module MobileEnhancements module HelperDelegation def self.included(base) base.extend Forwardable base.def_delegators :mobile_enhancement_helpers, *RequestHelper.delegated_methods # make the methods available as view helpers if available if base.respond_to?(:helper_method) base.helper_method *RequestHelper.delegated_methods end + # include the UrlHelper + base.send(:include, UrlHelper) end private def mobile_enhancement_helpers @mobile_enhancement_helpers ||= RequestHelper.new(request, MobileEnhancements.configuration) \ No newline at end of file