Sha256: a19af2620cb37ea6a9af26c090f9390ad176f948f576a41bd829f335c7557b06

Contents?: true

Size: 327 Bytes

Versions: 2

Compression:

Stored size: 327 Bytes

Contents

class Comment < ActiveRecord::Base
  has_attached_file :attachment
  has_attached_file :other_attachment
  validates :subject, :body, :presence => true
  validates_attachment :attachment, content_type: { content_type: /\Aimage\/.*\Z/ }
  validates_attachment :other_attachment, content_type: { content_type: 'text/plain' }
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
remotipart-1.4.4 spec/dummy_app/app/models/comment.rb
remotipart-1.4.3 spec/dummy_app/app/models/comment.rb