attached 0.2.9 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +1 -1
- data/lib/attached.rb +6 -3
- data/lib/attached/version.rb +1 -1
- metadata +3 -3
data/README.rdoc
CHANGED
@@ -4,7 +4,7 @@ Attached is a Ruby on Rails file attachment tool that lets users upload to the c
|
|
4
4
|
|
5
5
|
== Requirements
|
6
6
|
|
7
|
-
The gem
|
7
|
+
The gem is tested with Ruby 1.9.2 and Rails 3.0.5 but may well work with other versions of Ruby and Rails.
|
8
8
|
|
9
9
|
== Installation
|
10
10
|
|
data/lib/attached.rb
CHANGED
@@ -149,10 +149,12 @@ module Attached
|
|
149
149
|
def validates_attached_extension(name, options = {})
|
150
150
|
|
151
151
|
message = options[:message]
|
152
|
-
message ||= "extension
|
152
|
+
message ||= "extension is not valid"
|
153
153
|
|
154
|
-
range = options[:in].map { |element|
|
154
|
+
range = options[:in].map { |element| ".#{element}" }
|
155
155
|
|
156
|
+
validates_inclusion_of :"#{name}_extension", :message => message,
|
157
|
+
:if => options[:if], :unless => options[:unless]
|
156
158
|
end
|
157
159
|
|
158
160
|
|
@@ -169,7 +171,8 @@ module Attached
|
|
169
171
|
|
170
172
|
def validates_attached_presence(name, options = {})
|
171
173
|
|
172
|
-
message = options[:message]
|
174
|
+
message = options[:message]
|
175
|
+
message ||= "must be attached"
|
173
176
|
|
174
177
|
validates_presence_of :"#{name}_identifier", :message => message,
|
175
178
|
:if => options[:if], :unless => options[:unless]
|
data/lib/attached/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: attached
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.
|
5
|
+
version: 0.3.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Kevin Sylvestre
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-03-
|
13
|
+
date: 2011-03-03 00:00:00 -05:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -90,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
90
90
|
requirements: []
|
91
91
|
|
92
92
|
rubyforge_project:
|
93
|
-
rubygems_version: 1.
|
93
|
+
rubygems_version: 1.6.0
|
94
94
|
signing_key:
|
95
95
|
specification_version: 3
|
96
96
|
summary: An attachment library designed with cloud processors in mind
|