mobile-fu 1.2.0 → 1.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.
- checksums.yaml +4 -4
- data/lib/mobile-fu.rb +3 -3
- data/lib/mobile-fu/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2baf64bbd0b25b8b035e267fbf395ab0febf61aa
|
4
|
+
data.tar.gz: 6d69f8abef1d41d6c0137200b44b96908ee55659
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f4e53cbf1c3e422d31aa204519156206bae8105cf7e4f5e5ffb9ce4c6912176a99aa3dc00f99c6cc7237ec53b4c019b600edb45d57a393a072ff11e52c75e3f
|
7
|
+
data.tar.gz: 7e8907ac7d37ffbc368bf40b959a2c48e8607c94572059be14bf5a95587e7bcf8a258a85c942d7290fd84b829c0602c65dff5afe66329a7498569c7648a49290
|
data/lib/mobile-fu.rb
CHANGED
@@ -128,10 +128,10 @@ module ActionController
|
|
128
128
|
# 'Tablet' view.
|
129
129
|
|
130
130
|
def set_mobile_format
|
131
|
-
if request.format.html? &&
|
131
|
+
if request.format.html? && mobile_action? && is_mobile_device? && !request.xhr?
|
132
132
|
request.format = :mobile unless session[:mobile_view] == false
|
133
133
|
session[:mobile_view] = true if session[:mobile_view].nil?
|
134
|
-
elsif request.format.html? &&
|
134
|
+
elsif request.format.html? && mobile_action? && is_tablet_device? && !request.xhr?
|
135
135
|
request.format = :tablet unless session[:tablet_view] == false
|
136
136
|
session[:tablet_view] = true if session[:tablet_view].nil?
|
137
137
|
end
|
@@ -179,7 +179,7 @@ module ActionController
|
|
179
179
|
# See #has_mobile_fu_for
|
180
180
|
def mobile_action?
|
181
181
|
if self.class.instance_variable_get("@mobile_include_actions").nil? #Now we know we dont have any includes, maybe excludes?
|
182
|
-
return mobile_exempt?
|
182
|
+
return !mobile_exempt?
|
183
183
|
else
|
184
184
|
self.class.instance_variable_get("@mobile_include_actions").try(:include?, params[:action].to_sym)
|
185
185
|
end
|
data/lib/mobile-fu/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mobile-fu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brendan Lim
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-06-
|
12
|
+
date: 2013-06-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|