Created
July 13, 2016 18:56
-
-
Save Frank004/ec61953d3080b56e2b4db55427aad5a8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Article < ActiveRecord::Base | |
has_attached_file :cover, styles: { medium: "1280x720", thumb: "800x600" } | |
validates_attachment_content_type :cover, content_type: /\Aimage\/.*\Z/ | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment