Commit a6b0ab8d by LI Daobing

update README

parent 4052d476
......@@ -40,6 +40,7 @@ class Image < ActiveRecord::Base
attr_accessible :file
has_attached_file :file, :path => ":class/:attachment/:id/:basename.:extension"
validates :file, :attachment_presence => true
validates_attachment_content_type :file, :content_type => /\Aimage\/.*\Z/
end
```
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment