Sha256: 2886f864184b760bac8744c6e970cbda0b4622939d70bfbb68cea92cce309376

Contents?: true

Size: 309 Bytes

Versions: 5

Compression:

Stored size: 309 Bytes

Contents

require 'rack/schmobile/user_agents'

module Rack
  module Schmobile
    module Filters
      module MobileUserAgent
        def self.call(request)
          request.session[Rack::Schmobile::IS_MOBILE] = Rack::Schmobile::UserAgents.is_mobile_agent?(request.user_agent)
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
schmobile-0.4.1 lib/rack/schmobile/filters/mobile_user_agent.rb
schmobile-0.4.0 lib/rack/schmobile/filters/mobile_user_agent.rb
schmobile-0.3.2 lib/rack/schmobile/filters/mobile_user_agent.rb
schmobile-0.3.1 lib/rack/schmobile/filters/mobile_user_agent.rb
schmobile-0.3.0 lib/rack/schmobile/filters/mobile_user_agent.rb