light_mobile 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/light_mobile/dynamic_renderer.rb +6 -0
- data/lib/light_mobile/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: 88d79a8e16305070763ddc38dbf01dd81f96d7c9
|
4
|
+
data.tar.gz: 0fc371a4cf626b37f0dddb366dae6ae349c49a60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae33bdce7513ac73725bbec6857ff6cae77c4836b95e1841340d472d3d038deece368453d636f1d3332556e1caa60a03cbe9ef596940d4d0973f2d3466069208
|
7
|
+
data.tar.gz: 464743bec1cc0c681b30620a8df9b80709527f85fadb6b99940811b9d65450c7bffb5c01b8b1e3039ff2d017974ee6bc643c90c76b546154e16fd3aa3a879ea8
|
@@ -2,6 +2,12 @@ module LightMobile::DynamicRenderer
|
|
2
2
|
# In order to only render mobile views if they exist.
|
3
3
|
def render(*args, &blk)
|
4
4
|
if request.user_agent && view_context.agent_mobile? && (session[:light_mobile_version].to_s == "mobile" || !session[:light_mobile_version].present?)
|
5
|
+
render_mobile = true
|
6
|
+
elsif params[:mobile].to_s == '1'
|
7
|
+
render_mobile = true
|
8
|
+
end
|
9
|
+
|
10
|
+
if render_mobile
|
5
11
|
name = args[0]
|
6
12
|
name = action_name.to_sym if !name.is_a?(Symbol) && !name.is_a?(String)
|
7
13
|
|
data/lib/light_mobile/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: light_mobile
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kasper Johansen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|