projects
/
rails.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Add 'canEmbed' layer option
[rails.git]
/
app
/
validators
/
image_validator.rb
1
class ImageValidator < ActiveModel::EachValidator
2
def validate_each(record, attribute, value)
3
record.errors.add(attribute, " must be an image") unless value.image?
4
end
5
end