mirror of
https://github.com/fspc/BikeShed-1.git
synced 2025-02-28 16:53:23 -05:00
19 lines
241 B
Ruby
19 lines
241 B
Ruby
class BikeBrand < ActiveRecord::Base
|
|
attr_accessible :brand
|
|
|
|
has_many :bikes
|
|
has_many :bike_models
|
|
|
|
default_scope order('brand ASC')
|
|
|
|
self.per_page = 15
|
|
|
|
def models
|
|
self.bike_models
|
|
end
|
|
|
|
def to_s
|
|
self.brand
|
|
end
|
|
end
|