Sha256: 76ea13e4019e2bd1cddf8eb92a98375a484bebc3e827740a674600125e6f5e8e

Contents?: true

Size: 391 Bytes

Versions: 4

Compression:

Stored size: 391 Bytes

Contents

module Rack
  module Schmobile
    module Filters
      module IsMobileParam
        def self.call(request)
          if request.params.key?(Rack::Schmobile::IS_MOBILE)
            request.session[Rack::Schmobile::IS_MOBILE] = (request.params[Rack::Schmobile::IS_MOBILE] == "true")
          end

          request.session[Rack::Schmobile::IS_MOBILE]
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
schmobile-0.1.3 lib/rack/schmobile/filters/is_mobile_param.rb
schmobile-0.1.2 lib/rack/schmobile/filters/is_mobile_param.rb
schmobile-0.1.1 lib/rack/schmobile/filters/is_mobile_param.rb
schmobile-0.1.0 lib/rack/schmobile/filters/is_mobile_param.rb