1
0
mirror of https://github.com/fspc/BikeShed-1.git synced 2025-02-28 16:53:23 -05:00
BikeShed-1/app/models/bike_model.rb

19 lines
256 B
Ruby
Raw Normal View History

2012-12-08 15:00:43 -05:00
class BikeModel < ActiveRecord::Base
attr_accessible :model, :bike_brand_id
2012-12-08 15:00:43 -05:00
has_many :bikes
belongs_to :bike_brand
default_scope order('model ASC')
2012-12-08 16:56:16 -05:00
self.per_page = 15
2012-12-08 15:00:43 -05:00
def brand
self.bike_brand
end
2012-12-08 16:56:16 -05:00
def to_s
self.model
end
2012-12-08 15:00:43 -05:00
end