Sha256: 4a6810ec6e39a2bab2967629bab03077cb8e36fb095d7edee14f663c6444535c
Contents?: true
Size: 1.34 KB
Versions: 1
Compression:
Stored size: 1.34 KB
Contents
module OpenConferenceWare # == Schema Information # # Table name: rooms # # id :integer not null, primary key # name :string(255) not null # capacity :integer # size :string(255) # seating_configuration :string(255) # description :text # event_id :integer # created_at :datetime # updated_at :datetime # image_file_name :string(255) # image_content_type :string(255) # image_file_size :integer # image_updated_at :datetime # class Room < OpenConferenceWare::Base # Associations belongs_to :event has_many :proposals, dependent: :nullify has_many :schedule_items, dependent: :nullify # Validations validates_presence_of :name, :event validates_numericality_of :capacity, unless: lambda{|obj| obj.capacity.blank? } # Image Attachment has_attached_file :image, path: ":rails_root/public/system/:attachment/:id/:style/:filename", url: "/system/:attachment/:id/:style/:filename", styles: { large: "650>", medium: "350>", small: "150>" } validates_attachment_content_type :image, :content_type => /\Aimage\/.*\Z/, :unless => Proc.new{|r| r.image_content_type.blank? } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
open_conference_ware-1.0.0.pre4 | app/models/open_conference_ware/room.rb |