Browse Source

Order bike brands and models alphabetically

denney-disable-on-select
Jason Denney 12 years ago
parent
commit
922af526c1
  1. 2
      app/models/bike_brand.rb
  2. 4
      app/models/bike_model.rb

2
app/models/bike_brand.rb

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

4
app/models/bike_model.rb

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

Loading…
Cancel
Save