Skip to content
Snippets Groups Projects
Commit 733b4ffb authored by Matheus Agio Nerone's avatar Matheus Agio Nerone
Browse files

image size on model

parent ed5273fc
No related branches found
No related tags found
No related merge requests found
class Carousel < ActiveRecord::Base
has_attached_file :image, styles: {
larger: "300x300>"
larger: "300x300>",
thumbnail: "100x100>"
}, default_url: "/images/:style/missing.png"
validates_attachment_content_type :image, content_type: /\Aimage\/.*\Z/
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment