app/models/homepage_feature.rb in community_engine-2.3.1 vs app/models/homepage_feature.rb in community_engine-2.3.2
- old
+ new
@@ -1,10 +1,10 @@
class HomepageFeature < ActiveRecord::Base
has_attached_file :image, configatron.feature.paperclip_options.to_hash
- validates_attachment_presence :image
- validates_attachment_content_type :image, :content_type => configatron.feature.validation_options.content_type
- validates_attachment_size :image, :less_than => configatron.feature.validation_options.max_size.to_i.megabytes
-
+ validates_attachment_presence :image, :message => :photo_presence_error.l
+ validates_attachment_content_type :image, :content_type => configatron.feature.validation_options.content_type, :message => :photo_content_type_error.l
+ validates_attachment_size :image, :less_than => configatron.feature.validation_options.max_size.to_i.megabytes, :message => :photo_size_limit_error.l(:count => configatron.feature.validation_options.max_size)
+
attr_accessible :url, :title, :description, :image
validates_presence_of :url
def self.find_features