mobile-fu 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/mobile-fu.rb CHANGED
@@ -74,6 +74,7 @@ module ActionController
74
74
  # request is either :mobile or not.
75
75
 
76
76
  def in_mobile_view?
77
+ return false unless request.format
77
78
  request.format.to_sym == :mobile
78
79
  end
79
80
 
@@ -9,7 +9,7 @@ module MobileFu
9
9
  sources.each do |source|
10
10
  mobilized_sources << source
11
11
 
12
- device_names = is_mobile_device? ? ['mobile', mobile_device.downcase] : []
12
+ device_names = respond_to?(:is_mobile_device?) && is_mobile_device? ? ['mobile', mobile_device.downcase] : []
13
13
 
14
14
  device_names.compact.each do |device_name|
15
15
  possible_source = "#{source.to_s.gsub '.css', ''}_#{device_name}.css"
@@ -1,3 +1,3 @@
1
1
  module MobileFu
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 0
9
- version: 0.2.0
8
+ - 1
9
+ version: 0.2.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Brendan Lim
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-05-16 00:00:00 +01:00
18
+ date: 2011-07-30 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency