activeadmin_addons 0.2.3 → 0.2.4

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: 3b6d60932ba4d315e4e86f0db92c02efd35456b1
4
- data.tar.gz: c8f883f18e9df52fcadc74597c8b00d6768e4f84
3
+ metadata.gz: 43c025e3917547c8e9030cef5d73ef14b63ffb6b
4
+ data.tar.gz: 958058fd05611b978f6296a834e1d388a3e0e0cb
5
5
  SHA512:
6
- metadata.gz: 4fab27945a8b388f6ba26d819c48cc8acc3bf5a591d856f08e689bcc6c2ecea32b49e174a1f29ab26bc9166615eeae51d7703d0de31e51bd7c90fc82a4c51c6b
7
- data.tar.gz: 680e0bb46f8cad7c7ab04adc889acf92d583832e72fd6d19da376ff7abe764ac0c2cbbbd279b6ab52b023fa7db83417ccd4a8ab229138b1571e2f31d4a0e135a
6
+ metadata.gz: f0e0e1d548d4b82b09f899ecc9d3b8b338af3c4385e74451e41778a9e1a2fe8be29ce4cb64663788fa0fbfdc4c53c390e5f564dfb66770c4ccff49f94ede1cb0
7
+ data.tar.gz: 7fa116c927e078ed81202279d34aebb63d2eb9fad7604e0a70c02ba49273d0fdedfecc9783ee509d7930859e384ab9020ee3515602469ed6341cc0f748b7f96e
@@ -26,12 +26,22 @@ module ActiveAdminAddons
26
26
  @options ||= has_opts? ? args.last : {}
27
27
  end
28
28
 
29
+ # attachment_column :foto
30
+ # attachment_column :foto, style: :hola
31
+ # attachment_column "Mi Foto", :foto
32
+ # attachment_column "Mi Foto", :foto, {}
33
+ # attachment_column :foto do
34
+ # end
29
35
  def attribute
30
- @attribute ||= has_opts? ? args[0] : args[1]
36
+ @attribute ||= has_label? ? args[1] : args[0]
37
+ end
38
+
39
+ def has_label?
40
+ has_opts? ? args.length == 3 : args.length == 2
31
41
  end
32
42
 
33
43
  def has_opts?
34
- args[1] && args[1].is_a?(Hash)
44
+ @has_opts ||= args.last.is_a?(Hash)
35
45
  end
36
46
 
37
47
  end
@@ -1,3 +1,3 @@
1
1
  module ActiveadminAddons
2
- VERSION = "0.2.3"
2
+ VERSION = "0.2.4"
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.3
4
+ version: 0.2.4
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-15 00:00:00.000000000 Z
11
+ date: 2015-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails