Sha256: 8da78c332e0f839b9cab9d5a089301d6b78e96cc593dcd64f5bb05857b4bdd4c

Contents?: true

Size: 258 Bytes

Versions: 2

Compression:

Stored size: 258 Bytes

Contents

require 'schmobile/user_agents'

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
schmobile-2.0.0 lib/schmobile/filters/mobile_user_agent.rb
schmobile-1.0.0 lib/schmobile/filters/mobile_user_agent.rb