1
0
mirror of https://github.com/fspc/BikeShed-1.git synced 2025-04-04 05:33:22 -04:00

Order bike brands and models alphabetically

This commit is contained in:
Jason Denney 2012-12-29 16:22:46 -05:00
parent db9982dcd2
commit 922af526c1
2 changed files with 5 additions and 1 deletions

View File

@ -4,6 +4,8 @@ class BikeBrand < ActiveRecord::Base
has_many :bikes
has_many :bike_models
default_scope order('brand ASC')
self.per_page = 15
def models

View File

@ -1,9 +1,11 @@
class BikeModel < ActiveRecord::Base
attr_accessible :model
attr_accessible :model, :bike_brand_id
has_many :bikes
belongs_to :bike_brand
default_scope order('model ASC')
self.per_page = 15
def brand