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

- old
+ new

@@ -17,10 +17,13 @@ # register it as an alias to the HTML mime-type Mime::Type.register_alias "text/html", format # setup the format calculation ActionController::Base.class_eval do before_filter do |controller| - controller.request.format = controller.determine_format + if controller.mobile_request? + controller.request.format = controller.determine_format + controller.params["mobile"] = MobileEnhancements.configuration.mobile_path_prefix + end end end end end \ No newline at end of file