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:
parent
db9982dcd2
commit
922af526c1
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user