admino 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: e06d7c035647ac161360ae08222d2b06b1abca0b
4
- data.tar.gz: f223ee1b778e59436a7a61ae13b34e59710ea612
3
+ metadata.gz: fe0d128c8350787165c4d23c7e9615df3475b4a9
4
+ data.tar.gz: 7e5bf3ecf69f2f45152ac342d8effbbdff5bb41f
5
5
  SHA512:
6
- metadata.gz: 50f41c99c286533749958ead22766d0a06458eb20d0a17e1b74101c6376ea3e631515bb5cd91a00b99e287e64c2f5f7ce9d70b523c79e250ac2e1db1bd500c65
7
- data.tar.gz: 007a6a7a9e3dc548e6bdcbab58ff960f5eb9c74013443e4d57b5c92d09eced051bd8b4684850715031e5539f1f40b3be2be62e274ff025d43d23ecd9d03f8951
6
+ metadata.gz: 2ed53f3c1ad99454097045f3662f92db7766cdaf24cba9f78165fb3a784ec58c9a733f2d4ec62cbeb5303f7c5672c94fc30f7a70fa36c7ced3d99e1748246ded
7
+ data.tar.gz: ae0e7e38ac6fa22b2e1ed394b2ccc2fd2ac198b204a5ec7362033716bf671408eb5d828e703a9bc26306fdda224f4b7901ab7cce2c135d8faad504a010325e54
@@ -1,3 +1,7 @@
1
+ # v0.0.10
2
+
3
+ * Fix bug in action generation of html attributes
4
+
1
5
  # v0.0.9
2
6
 
3
7
  * Allow `include_empty_scope` option in filter groups
@@ -93,7 +93,7 @@ module Admino
93
93
 
94
94
  def complete_action_html_options(action_name, final_html_options)
95
95
  if action_name
96
- default_options = column_html_options(action_name)
96
+ default_options = action_html_options(action_name)
97
97
  html_options = Showcase::Helpers::HtmlOptions.new(default_options)
98
98
 
99
99
  action_html_options_method = "#{action_name}_action_html_options"
@@ -1,4 +1,4 @@
1
1
  module Admino
2
- VERSION = "0.0.9"
2
+ VERSION = "0.0.10"
3
3
  end
4
4
 
@@ -53,6 +53,21 @@ module Admino
53
53
  it 'uses it to build attributes' do
54
54
  should have_tag(:td, with: { class: 'title' })
55
55
  end
56
+
57
+ context 'with a class that implements a <action_name>_html_options' do
58
+ let(:row) { row_subclass.new(resource, view) }
59
+ let(:row_subclass) do
60
+ Class.new(ResourceRow) do
61
+ def column_html_options(action_name)
62
+ { class: 'attribute' }
63
+ end
64
+ end
65
+ end
66
+
67
+ it 'renders them as attributes' do
68
+ should have_tag(:td, with: { class: 'attribute title' })
69
+ end
70
+ end
56
71
  end
57
72
  end
58
73
 
@@ -178,14 +193,18 @@ module Admino
178
193
  let(:row) { row_subclass.new(resource, view) }
179
194
  let(:row_subclass) do
180
195
  Class.new(ResourceRow) do
181
- def show_action_html_options
196
+ def action_html_options(action_name)
182
197
  { class: 'button' }
183
198
  end
199
+
200
+ def show_action_html_options
201
+ { class: 'show-button' }
202
+ end
184
203
  end
185
204
  end
186
205
 
187
206
  it 'renders them as attributes' do
188
- should have_tag(:a, with: { class: 'foo button' })
207
+ should have_tag(:a, with: { class: 'foo show-button button' })
189
208
  end
190
209
  end
191
210
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: admino
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
  - Stefano Verna