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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f412a2c8e26f6b70b66d01ea704b7e4f2df09370
4
- data.tar.gz: 795094348375ae19cb8d30cb4e55b7cdd594f906
3
+ metadata.gz: 88d79a8e16305070763ddc38dbf01dd81f96d7c9
4
+ data.tar.gz: 0fc371a4cf626b37f0dddb366dae6ae349c49a60
5
5
  SHA512:
6
- metadata.gz: 14dedcdb9f481d1a4f3f2369c530791ff06cdbc0bf3eafd347e9c326d13fa71e0b91974e416b7dd22f9e56a42bf61ebdb5e8acd47c7d8b9dcbe940cc4b7e5a65
7
- data.tar.gz: 614ff9869f6ec802ee0448fde1328217cf21d7fde984a7a8b658a872ce44c39c94f57169740a6782b77beabdf34aabe2314c77e94e2cf7d4a856234afa8f002d
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
 
@@ -1,3 +1,3 @@
1
1
  module LightMobile
2
- VERSION = "0.0.9"
2
+ VERSION = "0.0.10"
3
3
  end
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.9
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-06-17 00:00:00.000000000 Z
11
+ date: 2015-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails