Sha256: 56b8f397f48bb9f31057731e8c78aaf87af80cd1fecd50c5f2553ca86c69e516
Contents?: true
Size: 499 Bytes
Versions: 5
Compression:
Stored size: 499 Bytes
Contents
require 'paperclip' class WikiPageAttachment < ActiveRecord::Base acts_as_wiki_page_attachment do has_attached_file :wiki_page_attachment, :styles => { :medium => "300x300>", :thumb => "100x100>" } validates_attachment_presence :wiki_page_attachment, :message => " is missing." validates_attachment_content_type :wiki_page_attachment, :content_type => ['image/jpeg','image/jpg','image/png','image/x-png','image/gif','image/pjpeg'], :message => ' must be a JPEG, PNG or GIF.' end end
Version data entries
5 entries across 5 versions & 1 rubygems