Sha256: 5667cc9ae60f7875a64386604c0917a84e950f447f1415b2258d2f109083ca2c

Contents?: true

Size: 883 Bytes

Versions: 5

Compression:

Stored size: 883 Bytes

Contents

class Bookstore < ActiveRecord::Base
  attr_accessible :name, :zip_code, :address, :note, :telephone_number,
    :fax_number, :url
  default_scope :order => "bookstores.position"
  has_many :items

  acts_as_list
  validates_presence_of :name
  validates :url, :url => true, :allow_blank => true, :length => {:maximum => 255}

  paginates_per 10

  if defined?(EnjuPurchaseRequest)
    has_many :order_lists
  end
end

# == Schema Information
#
# Table name: bookstores
#
#  id               :integer         not null, primary key
#  name             :text            not null
#  zip_code         :string(255)
#  address          :text
#  note             :text
#  telephone_number :string(255)
#  fax_number       :string(255)
#  url              :string(255)
#  position         :integer
#  deleted_at       :datetime
#  created_at       :datetime
#  updated_at       :datetime
#

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
enju_library-0.1.0.pre5 app/models/bookstore.rb
enju_library-0.1.0.pre4 app/models/bookstore.rb
enju_library-0.1.0.pre3 app/models/bookstore.rb
enju_library-0.1.0.pre2 app/models/bookstore.rb
enju_library-0.1.0.pre app/models/bookstore.rb