rao-component 0.0.30.pre → 0.0.31.pre

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d7fd50ce6ded0719c73a4c9ce937d95011157949ee1c59eb1e79c00540035c1f
4
- data.tar.gz: ffb29e0ed619a10b511f4e94f1576fcb2c489056352d6485a809b8d998397416
3
+ metadata.gz: caad610313379eb38617058eeff64798129faab7a46174e215fff9a9c3244525
4
+ data.tar.gz: 6e92de2e04764252e33109bdaca1d478e5560165b761a869c78a1c4e109f42d1
5
5
  SHA512:
6
- metadata.gz: dbf3863352bc04b9be9e5858abde1a818c374a6c94a482e0017d4c1ac34d592154b98baac0ce3f6111fdfef00a54bfb8432f9a4db2e8dca4f4ab20f873cec549
7
- data.tar.gz: 545fa7d838a18984af803a43693911afc42e0b6e16d8545c7f758ad41f4075d743a0fff74e44baef34aaf6792bb7b7f6159fb47fd1d93889d34f226bad573353
6
+ metadata.gz: 58e53e2f2ce4f9a539c51a1d2688c67d918bd7f46e563ea2bd024b2c59465384989ca7c76580c566450b2477f1b520e4cefbea17904de8fcb9e4ea8f4cbc173b
7
+ data.tar.gz: 40b3fae6f9640e64155345007c664e9b5e21c7b8578ff605fa69ade1132a5f5f2b78e547c64b39b4fa36e105e425788fd1bb4dae50c98fe9f97d1edaf8d42480
@@ -1,6 +1,12 @@
1
- - if resource.send(name).present? && resource.send(name).respond_to?(:variant)
2
- - begin
3
- - image_html = options[:image_html] || { src: main_app.url_for(resource.send(name).variant(options[:variant_options])) }
4
- - rescue ActiveStorage::InvariableError => e
5
- - image_html = { src: main_app.url_for(resource.send(name)) }
6
- %img{ image_html }
1
+ :ruby
2
+ image_html = if options[:image_html].present?
3
+ options[:image_html]
4
+ elsif resource.send(name).try(:variable?)
5
+ { src: main_app.url_for(resource.send(name).variant(options[:variant_options])) }
6
+ elsif resource.send(name).try(:previewable?)
7
+ { src: main_app.url_for(resource.send(name).preview(options[:variant_options])) }
8
+ else
9
+ nil
10
+ end
11
+ - if image_html.present?
12
+ %img{ image_html }
@@ -0,0 +1,6 @@
1
+ - if resource.send(name).present? && resource.send(name).respond_to?(:variant)
2
+ - begin
3
+ - image_html = options[:image_html] || { src: main_app.url_for(resource.send(name).variant(options[:variant_options])) }
4
+ - rescue ActiveStorage::InvariableError => e
5
+ - image_html = { src: main_app.url_for(resource.send(name)) }
6
+ %img{ image_html }
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.30.pre
4
+ version: 0.0.31.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: 2019-07-07 00:00:00.000000000 Z
11
+ date: 2019-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -204,6 +204,7 @@ files:
204
204
  - app/views/rao/component/table/body_cells/_default.html.haml
205
205
  - app/views/rao/component/table/body_cells/_email.html.haml
206
206
  - app/views/rao/component/table/body_cells/_thumbnail.html.haml
207
+ - app/views/rao/component/table/body_cells/_thumbnail.html.haml~
207
208
  - app/views/rao/component/table/body_cells/_timestamp.html.haml
208
209
  - app/views/rao/component/table/header_cells/_batch_actions.html.haml
209
210
  - config/initializers/assets.rb
@@ -235,7 +236,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
235
236
  - !ruby/object:Gem::Version
236
237
  version: 1.3.1
237
238
  requirements: []
238
- rubygems_version: 3.0.3
239
+ rubygems_version: 3.0.4
239
240
  signing_key:
240
241
  specification_version: 4
241
242
  summary: View Components for Ruby on Rails.