Sha256: 8e09f3d87bb08a77c166f6c0e53ef742fcde491375590d36c18c95148b2326f6
Contents?: true
Size: 635 Bytes
Versions: 8
Compression:
Stored size: 635 Bytes
Contents
module C80Push class Dealer < ActiveRecord::Base has_and_belongs_to_many :regions has_and_belongs_to_many :presets has_many :offices, :dependent => :destroy accepts_nested_attributes_for :offices, :reject_if => lambda { |attributes| !attributes.present? }, :allow_destroy => true validates :title, :uniqueness => true, :presence => true validates :ord, :presence => true default_scope -> { order(:ord => :asc) } end end
Version data entries
8 entries across 8 versions & 1 rubygems