mirror of https://github.com/fspc/BikeShed-1.git
Jason Denney
11 years ago
12 changed files with 50 additions and 43 deletions
@ -0,0 +1,9 @@ |
|||||
|
class BikePurpose < ActiveRecord::Base |
||||
|
attr_accessible :purpose |
||||
|
|
||||
|
belongs_to :bike |
||||
|
|
||||
|
def to_s |
||||
|
self.purpose |
||||
|
end |
||||
|
end |
@ -1,9 +0,0 @@ |
|||||
class BikeStatus < ActiveRecord::Base |
|
||||
attr_accessible :status |
|
||||
|
|
||||
belongs_to :bike |
|
||||
|
|
||||
def to_s |
|
||||
self.status |
|
||||
end |
|
||||
end |
|
@ -0,0 +1,7 @@ |
|||||
|
class BikeStatusToPurpose < ActiveRecord::Migration |
||||
|
def change |
||||
|
rename_column :bikes, :bike_status_id, :bike_purpose_id |
||||
|
rename_column :bike_statuses, :status, :purpose |
||||
|
rename_table :bike_statuses, :bike_purposes |
||||
|
end |
||||
|
end |
@ -0,0 +1,18 @@ |
|||||
|
undetermined: |
||||
|
id: 1 |
||||
|
purpose: UNDETERMINED |
||||
|
scrap: |
||||
|
id: 2 |
||||
|
purpose: SCRAP |
||||
|
parts: |
||||
|
id: 3 |
||||
|
purpose: PARTS |
||||
|
storage: |
||||
|
id: 4 |
||||
|
purpose: STORAGE |
||||
|
buildbike: |
||||
|
id: 5 |
||||
|
purpose: BUILDBIKE |
||||
|
sale: |
||||
|
id: 6 |
||||
|
purpose: SALE |
@ -1,18 +0,0 @@ |
|||||
undetermined: |
|
||||
id: 1 |
|
||||
status: UNDETERMINED |
|
||||
scrap: |
|
||||
id: 2 |
|
||||
status: SCRAP |
|
||||
parts: |
|
||||
id: 3 |
|
||||
status: PARTS |
|
||||
storage: |
|
||||
id: 4 |
|
||||
status: STORAGE |
|
||||
buildbike: |
|
||||
id: 5 |
|
||||
status: BUILDBIKE |
|
||||
sale: |
|
||||
id: 6 |
|
||||
status: SALE |
|
Loading…
Reference in new issue