has_images 0.2 → 0.2.1
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.
- data/lib/digineo/image.rb +1 -1
- metadata +4 -3
data/lib/digineo/image.rb
CHANGED
|
@@ -20,7 +20,7 @@ class Digineo::Image < ActiveRecord::Base
|
|
|
20
20
|
named_scope :image_type, lambda { |*types|
|
|
21
21
|
{ :conditions => "image_type_id IN (" + types.collect do |type|
|
|
22
22
|
begin
|
|
23
|
-
Digineo::ImageType.find_by_name(type).id
|
|
23
|
+
type.is_a?(Integer) ? type : Digineo::ImageType.find_by_name(type).id
|
|
24
24
|
rescue
|
|
25
25
|
raise Digineo::ImageType::Exception, "Could not find ImageType with name #{type}"
|
|
26
26
|
end
|
metadata
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: has_images
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 21
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 2
|
|
9
|
-
|
|
9
|
+
- 1
|
|
10
|
+
version: 0.2.1
|
|
10
11
|
platform: ruby
|
|
11
12
|
authors:
|
|
12
13
|
- Dennis Meise
|
|
@@ -14,7 +15,7 @@ autorequire:
|
|
|
14
15
|
bindir: bin
|
|
15
16
|
cert_chain: []
|
|
16
17
|
|
|
17
|
-
date: 2010-08-
|
|
18
|
+
date: 2010-08-30 00:00:00 +02:00
|
|
18
19
|
default_executable:
|
|
19
20
|
dependencies:
|
|
20
21
|
- !ruby/object:Gem::Dependency
|