Sha256: 44ddaec08bb17e8427a2c237710cb686c7193cda8ab124535e04a2e58b231ff8

Contents?: true

Size: 352 Bytes

Versions: 5

Compression:

Stored size: 352 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

          nil
        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/is_mobile_param.rb
schmobile-0.4.0 lib/rack/schmobile/filters/is_mobile_param.rb
schmobile-0.3.2 lib/rack/schmobile/filters/is_mobile_param.rb
schmobile-0.3.1 lib/rack/schmobile/filters/is_mobile_param.rb
schmobile-0.3.0 lib/rack/schmobile/filters/is_mobile_param.rb