Module: Crispy::DeviceHelpers

Defined in:
lib/crispy-mobile/helpers.rb

Instance Method Summary collapse

Instance Method Details

#deviceObject



5
6
7
8
9
10
11
# File 'lib/crispy-mobile/helpers.rb', line 5

def device
  if request.env['WURFL'].nil?
    @device ||= DesktopDevice.new
  else
    @device ||= Device.new(request.env['WURFL'])
  end
end