Sha256: 239910afbb3c0c93add1ac7cca22b683a46e76d28b9761a8ad62609074132aad

Contents?: true

Size: 500 Bytes

Versions: 6

Compression:

Stored size: 500 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

6 entries across 6 versions & 2 rubygems

Version Path
irwi-0.5.0 lib/generators/irwi_wiki_attachments/templates/models/wiki_page_attachment.rb
irwi_mod-0.0.2 lib/generators/irwi_wiki_attachments/templates/models/wiki_page_attachment.rb
irwi_mod-0.0.1 lib/generators/irwi_wiki_attachments/templates/models/wiki_page_attachment.rb
irwi-0.4.2 lib/generators/irwi_wiki_attachments/templates/models/wiki_page_attachment.rb
irwi-0.4.1 lib/generators/irwi_wiki_attachments/templates/models/wiki_page_attachment.rb
irwi-0.4.0 lib/generators/irwi_wiki_attachments/templates/models/wiki_page_attachment.rb