Sha256: f05b48aeedf7ba127744a5767b3ef539eebecad3f272f2f532a0c2c4afa2ced3
Contents?: true
Size: 770 Bytes
Versions: 1
Compression:
Stored size: 770 Bytes
Contents
require "mobile_enhancements/route_helpers" require "mobile_enhancements/helper_delegation" require "rails/railtie" module MobileEnhancements class Railtie < Rails::Railtie config.to_prepare do # setup our route helpers ActionDispatch::Routing::Mapper.send(:include, MobileEnhancements::RouteHelpers) # setup the path helpers ActionController::Base.send(:include, MobileEnhancements::HelperDelegation) # setup the layout calculation ActionController::Base.layout :determine_layout # if we have a custom mobile format if format = MobileEnhancements.configuration.mobile_format # register it as an alias to the HTML mime-type Mime::Type.register_alias "text/html", format end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mobile-enhancements-0.0.1 | lib/mobile_enhancements/railtie.rb |