mirror of https://github.com/fspc/BikeShed-1.git
Jason Denney
12 years ago
2 changed files with 12 additions and 2 deletions
@ -1,10 +1,16 @@ |
|||||
class BikeModel < ActiveRecord::Base |
class BikeModel < ActiveRecord::Base |
||||
attr_accessible :name |
attr_accessible :model |
||||
|
|
||||
has_many :bikes |
has_many :bikes |
||||
belongs_to :bike_brand |
belongs_to :bike_brand |
||||
|
|
||||
|
self.per_page = 15 |
||||
|
|
||||
def brand |
def brand |
||||
self.bike_brand |
self.bike_brand |
||||
end |
end |
||||
|
|
||||
|
def to_s |
||||
|
self.model |
||||
|
end |
||||
end |
end |
||||
|
Loading…
Reference in new issue