rao-component 0.0.6.pre → 0.0.7.pre

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: d27e2fe896c2dd5df22035ec1787eb526a1273b7
4
- data.tar.gz: 3fbbe8312358b6df554c94fb39445281dd83eb7b
3
+ metadata.gz: 178e9c2b8757f133512f731f40299d913edb0efb
4
+ data.tar.gz: 0ce7392c3abcef9fde28bf08d5a8fe70b0e3125d
5
5
  SHA512:
6
- metadata.gz: b5e93996c6f8581e4ef3b73fa6a2bd5cc35327bf0b443fd17be33662c0e672121a447d8c1f596196d837ed66d4d7214e4a40398e9f85176d37de3d67266514b5
7
- data.tar.gz: addab310f12794c1eb10581afab14b8ef19fbbe68a218618ce9c3503ee68db142ed40281ea19ccaf2c55ad7df7a7e8179a9f7395737c77329320254d0e9f070a
6
+ metadata.gz: d27ab1addbce54d414c8afa6b02a60356526064c5e37e7fda2a853836f39e752da93c91fd8869c430f4b3dabf4645635ffdee1a3aed330039e17c75323e58120
7
+ data.tar.gz: 3382f5e8f2e177c2f911531dcd3558ff822f6c8429db857bcc5993b5b1891481c5fd516b3c0678879eb5d3b798b47e969d86c4ded9fbf297cbac46f3e96ea142
@@ -1,15 +1,21 @@
1
+ :ruby
2
+ tr_prefix = if resource.respond_to?(:to_key)
3
+ dom_id(resource)
4
+ else
5
+ "#{resource.class.name.underscore.gsub('/', '-')}-#{resource.object_id}"
6
+ end
1
7
  %table{ class: table_css_classes }
2
8
  - rows.each do |name, options|
3
- %tr
9
+ %tr{ class: "attribute-#{name}", id: "#{tr_prefix}-#{name}"}
4
10
  - if resource_class.respond_to? :human_attribute_name
5
- %th
11
+ %th{ class: 'attribute-name' }
6
12
  = resource_class.human_attribute_name(name)
7
13
  - else
8
- %th
14
+ %th{ class: 'attribute-name' }
9
15
  = name
10
16
  - if options[:block].present?
11
- %td
17
+ %td{ class: 'attribute-value' }
12
18
  = options[:block].call(resource)
13
19
  - else
14
- %td
20
+ %td{ class: 'attribute-value' }
15
21
  = render partial: "rao/component/table/body_cells/#{options[:render_as]}", locals: { resource: resource, name: name, options: options }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rao-component
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6.pre
4
+ version: 0.0.7.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roberto Vasquez Angel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-25 00:00:00.000000000 Z
11
+ date: 2019-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails