app/models/post_attachment.rb in radiant-forum-extension-2.1.6 vs app/models/post_attachment.rb in radiant-forum-extension-3.0.0.rc3
- old
+ new
@@ -38,10 +38,10 @@
:whiny_thumbnails => false,
:url => "/:class/:id/:basename:no_original_style.:extension",
:path => ":rails_root/:class/:id/:basename:no_original_style.:extension" # attachments can only be accessed through the PostAttachments controller, in case file security is required
attr_protected :file_file_name, :file_content_type, :file_file_size
- validates_attachment_presence :file, :message => t('error.no_file')
+ validates_attachment_presence :file, :message => t('forum_extension.error.no_file')
validates_attachment_content_type :file, :content_type => Radiant::Config["forum.attachment.content_types"].split(', ') if Radiant::Config.table_exists? && !Radiant::Config["forum.attachment.content_types"].blank?
validates_attachment_size :file, :less_than => Radiant::Config["forum.attachment.max_size"].to_i.megabytes if Radiant::Config.table_exists? && Radiant::Config["forum.attachment.max_size"]
named_scope :images, :conditions => ["file_content_type IN (#{image_content_types.map{'?'}.join(',')})", *image_content_types]
named_scope :non_images, :conditions => ["file_content_type NOT IN (#{image_content_types.map{'?'}.join(',')})", *image_content_types]