Sha256: fcb87bdb44084db20471647aa81806e443b2828ed19827961b35628a7645436a
Contents?: true
Size: 568 Bytes
Versions: 8
Compression:
Stored size: 568 Bytes
Contents
module C80Push class Office < ActiveRecord::Base has_and_belongs_to_many :regions belongs_to :dealer default_scope -> { order(:ord => :asc) } validates :ord, :presence => true validates :title, :presence => true validates :addr, :presence => true validates :gps, :presence => true, :format => { with: /\A\d+\.\d+,\s*\d+\.\d+\z/ } validates :tel, :presence => true def gps_arr self.gps.split(',').map! { |c| c.to_f } end end end
Version data entries
8 entries across 8 versions & 1 rubygems