Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Photo < ApplicationRecord
- belongs_to :room
- has_attached_file :image, styles: { medium: "300x300>", thumb: "100x100>" }
- validates_attachment_content_type :image, content_type: /\Aimage\/.*\z/
- end
Add Comment
Please, Sign In to add comment