Location Component

This commit is contained in:
Gopesh Tulsyan 2014-06-02 20:48:56 +05:30
parent 069cc0eb4c
commit b1c171cd97
12 changed files with 119 additions and 19 deletions

View file

@ -1,7 +1,13 @@
class Venue < ActiveRecord::Base
attr_accessible :name, :description, :website, :address, :photo
has_many :conferences
before_create :generate_guid
has_attached_file :photo,
styles: { thumb: '100x100>', large: '300x300>' }
validates_attachment_content_type :photo,
content_type: [/jpg/, /jpeg/, /png/, /gif/],
size: { in: 0..500.kilobytes }
private
def generate_guid