effective_datatables 1.2.1 → 1.2.2

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: a42cb00a5e666c63e32719f2a374815565081d6f
4
- data.tar.gz: 7240887e0bf62acfbf1b8c9ea84384e8cdb62dc1
3
+ metadata.gz: 32d85c8ad7664954cac2285e04ffc503a5c6385e
4
+ data.tar.gz: 5fd451f1b6a10e08de8fc6820721d21b4279f19c
5
5
  SHA512:
6
- metadata.gz: d21b2e00f36bb5ba1a8c10261b546898ac87e6e22aa180ac217d79fb3d6d147ac8982b31a62a3164a181bee2ee117ad83493fb069346124f5ba001c539e0bf1a
7
- data.tar.gz: 660ba3f0de0836cdb7099176885930e1eab311fed4d57f7191de2251ae1f2b8c60d70c910fdb1295724145e63ba29836adfc4b9b57ed948a9e5dc4142e78b9aa
6
+ metadata.gz: ad105c7e0855fe642b4f74e0cd89860762e629713f119d614398acff973d509f4b19904770c8ed95fc7227641d7d74f99d5ff14380d20611d9e1902159119bd3
7
+ data.tar.gz: a735ea5474c5e3b04b0f63df4976259fd8907e589e08bfa6084f26726ac1f58ca1b40840f69b3508dfc5457d3544b8b1326cc2dd996ed5c69fdfea5074c04c7e
@@ -71,7 +71,10 @@ module EffectiveDatatablesHelper
71
71
  end
72
72
 
73
73
  def datatables_admin_path?
74
- (attributes[:admin_path] || request.referer.chomp('/').end_with?('/admin')) rescue false
74
+ @datatables_admin_path ||= (
75
+ referer = request.referer.to_s.downcase.chomp('/') + '/'
76
+ (attributes[:admin_path] || referer.include?('/admin/')) rescue false
77
+ )
75
78
  end
76
79
 
77
80
  # TODO: Improve on this
@@ -1,3 +1,3 @@
1
1
  module EffectiveDatatables
2
- VERSION = '1.2.1'.freeze
2
+ VERSION = '1.2.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_datatables
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-09 00:00:00.000000000 Z
11
+ date: 2015-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails