paperclip_i18n 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,8 +1,7 @@
|
|
1
1
|
class UploadFileValidator < ActiveModel::EachValidator
|
2
2
|
DEFAULT_OPTIONS = { :content_type => nil,
|
3
3
|
:less_then => nil,
|
4
|
-
:presence => true
|
5
|
-
:skip_on_versioning => false }
|
4
|
+
:presence => true }
|
6
5
|
|
7
6
|
def initialize(options)
|
8
7
|
super(options)
|
@@ -10,7 +9,6 @@ class UploadFileValidator < ActiveModel::EachValidator
|
|
10
9
|
end
|
11
10
|
|
12
11
|
def validate_each(record, attribute, value)
|
13
|
-
return if options[:skip_on_versioning] && !record.record_timestamps # due to the versioning, which is copied through jbackend
|
14
12
|
less_then = options[:less_then]
|
15
13
|
content_type = options[:content_type]
|
16
14
|
return unless options[:presence]
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paperclip_i18n
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Rene Gross
|
@@ -16,8 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-
|
20
|
-
default_executable:
|
19
|
+
date: 2011-04-08 00:00:00 Z
|
21
20
|
dependencies:
|
22
21
|
- !ruby/object:Gem::Dependency
|
23
22
|
name: paperclip
|
@@ -61,7 +60,6 @@ files:
|
|
61
60
|
- lib/paperclip_i18n/upload_file_validator.rb
|
62
61
|
- lib/paperclip_i18n/version.rb
|
63
62
|
- paperclip_i18n.gemspec
|
64
|
-
has_rdoc: true
|
65
63
|
homepage: ""
|
66
64
|
licenses: []
|
67
65
|
|
@@ -91,7 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
91
89
|
requirements: []
|
92
90
|
|
93
91
|
rubyforge_project: paperclip_i18n
|
94
|
-
rubygems_version: 1.
|
92
|
+
rubygems_version: 1.7.2
|
95
93
|
signing_key:
|
96
94
|
specification_version: 3
|
97
95
|
summary: Adding I18n image upload support to paperclip plugin
|