activeadmin_addons 0.2.2 → 0.2.3

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: 642e1d8cf2a3405355d4ff9c633121f219d69041
4
- data.tar.gz: 136a74147270d9fab01136edc717d8f7a358d143
3
+ metadata.gz: 3b6d60932ba4d315e4e86f0db92c02efd35456b1
4
+ data.tar.gz: c8f883f18e9df52fcadc74597c8b00d6768e4f84
5
5
  SHA512:
6
- metadata.gz: b00492b0c016a1ff8191f227913ba2d1ed5ea3137614d1f673e37147456b420cdb85fb65386926961474e3f4b1876b3bbdcb6ac021bac5170a78d22b6f236dd0
7
- data.tar.gz: ddd0f770ceeb567dfe2f942e23d7ec06160415bb61c743fd73f66d65456a6d239467e36e0099252d286dc247c49ae00294217a41338a5b4ac4292a66b47d370b
6
+ metadata.gz: 4fab27945a8b388f6ba26d819c48cc8acc3bf5a591d856f08e689bcc6c2ecea32b49e174a1f29ab26bc9166615eeae51d7703d0de31e51bd7c90fc82a4c51c6b
7
+ data.tar.gz: 680e0bb46f8cad7c7ab04adc889acf92d583832e72fd6d19da376ff7abe764ac0c2cbbbd279b6ab52b023fa7db83417ccd4a8ab229138b1571e2f31d4a0e135a
@@ -23,11 +23,15 @@ module ActiveAdminAddons
23
23
  end
24
24
 
25
25
  def options
26
- @options ||= args.last.is_a?(Hash) ? args.last : {}
26
+ @options ||= has_opts? ? args.last : {}
27
27
  end
28
28
 
29
29
  def attribute
30
- @attribute ||= args[1] || args[0]
30
+ @attribute ||= has_opts? ? args[0] : args[1]
31
+ end
32
+
33
+ def has_opts?
34
+ args[1] && args[1].is_a?(Hash)
31
35
  end
32
36
 
33
37
  end
@@ -1,3 +1,3 @@
1
1
  module ActiveadminAddons
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeadmin_addons
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Platanus
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-01 00:00:00.000000000 Z
11
+ date: 2015-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails