refinerycms-image_rotators 0.4.0 → 0.5.0

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.
@@ -5,8 +5,6 @@ class ImageRotatorImage < ActiveRecord::Base
5
5
  belongs_to :image_rotator
6
6
  belongs_to :image
7
7
 
8
- validates :url, :presence => true
9
-
10
8
  acts_as_indexed :fields => [:url]
11
9
  acts_as_list
12
10
 
@@ -29,7 +29,11 @@
29
29
  <pre style="overflow-x: auto;"><code>
30
30
  &lt;div class="image-rotator" style="height:<%= @image_rotator.height %>;width:<%= @image_rotator.width %>;"&gt;
31
31
  <% @image_rotator.images.each do |image| %>
32
- &lt;a href="<%= image.url %>"&gt;&lt;img src="<%= image.image.url %>" alt="<%= image.image.title %>" title="<%= image.caption %>" /&gt;&lt;/a&gt;
32
+ <% if image.url.present? %>
33
+ &lt;a href="<%= image.url %>"&gt;&lt;img src="<%= image.image.url %>" alt="<%= image.image.title %>" title="<%= image.caption %>" /&gt;&lt;/a&gt;
34
+ <% else %>
35
+ &lt;img src="<%= image.image.url %>" alt="<%= image.image.title %>" title="<%= image.caption %>" /&gt;
36
+ <% end %>
33
37
  <% end %>
34
38
  &lt;/div&gt;
35
39
  </code></pre>
@@ -1,7 +1,7 @@
1
1
  module Refinery
2
2
  module ImageRotators
3
3
  def self.version
4
- %{0.4.0}
4
+ %{0.5.0}
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: refinerycms-image_rotators
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
5
- prerelease: false
4
+ hash: 11
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
- - 4
8
+ - 5
9
9
  - 0
10
- version: 0.4.0
10
+ version: 0.5.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jacob Swanner
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-05-23 00:00:00 -04:00
18
+ date: 2011-06-29 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -105,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
105
  requirements: []
106
106
 
107
107
  rubyforge_project:
108
- rubygems_version: 1.3.7
108
+ rubygems_version: 1.6.2
109
109
  signing_key:
110
110
  specification_version: 3
111
111
  summary: Ruby on Rails image rotator engine for RefineryCMS.