resource_renderer 1.2.4 → 1.2.5

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: 56b7867aa377cf6828b781d3f90f3a75662a0415
4
- data.tar.gz: db0542936f6be5a4a7073c28d14f46d7f1316619
3
+ metadata.gz: bb5d68013f9b4f727e286c0ec864006ae701bc0e
4
+ data.tar.gz: 0e336f96a7c31aaa7ffb95c9dd3cd06f16c5f40c
5
5
  SHA512:
6
- metadata.gz: 3b121c1456cfb92d0350f3eefe7e8a0ec20388bb7a627d1259b7f2b2a7c81c7d84b6f84199bfca4a4a3938625456270293b7f510edc24c3b272e59f3376f23ac
7
- data.tar.gz: b33f81c231d906e7e8192fa343df40163eef035d21a87454bb1063ca39e43fc585c5436a6a0136480c47025c5cc2d5ae267e7767b6295a2a132bbe7e0133b070
6
+ metadata.gz: f3e3f2f87a9f9991462378d95c5111bd3ddaba6c10e4cfd4b51805293c370c31958f03eb2a745c07bfe626f033707cfc1e5d0a516e79d8d850a3f667ac7e2332
7
+ data.tar.gz: 334578e17d45e9fdaaeee478f815f7a021bf035af25fd7cd9fc4d0931c327a354a87aa14126b6bcc74573132b16279d81543d6db1a0a9700a9f15c0f2a56579c
@@ -22,10 +22,10 @@ class BootstrapMediaObjectResourceRenderer < ResourceRenderer::ResourceRenderer:
22
22
  media_body_content_html_options = options.delete(:media_body_content_html_options)
23
23
 
24
24
  locals = {
25
- title: title || @resource.send(title_method),
26
- body: body || @resource.send(body_method),
27
- image_src: image_url || @resource.send(image_method).send(image_url_method),
28
- link_url: link_url || helper.url_for(@resource),
25
+ title: title || @resource.send(title_method),
26
+ body: body || @resource.send(body_method),
27
+ image_src: image_url || @resource.send(image_method).send(:try, image_url_method),
28
+ link_url: link_url || helper.url_for(@resource),
29
29
  link_to_more_url: link_to_more_url,
30
30
  media_body_content_html_options: media_body_content_html_options
31
31
  }
@@ -1,7 +1,8 @@
1
1
  .media
2
2
  .media-left
3
3
  = link_to(link_url, class: 'col-lg-4') do
4
- %img.media-object.thumbnail.img-responsive{alt: title, src: image_src}
4
+ - if image_src
5
+ %img.media-object.thumbnail.img-responsive{alt: title, src: image_src}
5
6
  .media-body
6
7
  %h3.media-heading= title
7
8
  %div{ media_body_content_html_options }
@@ -1,3 +1,3 @@
1
1
  module ResourceRenderer
2
- VERSION = '1.2.4'
2
+ VERSION = '1.2.5'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resource_renderer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.4
4
+ version: 1.2.5
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: 2016-03-10 00:00:00.000000000 Z
11
+ date: 2016-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails