mirror of
https://github.com/fspc/BikeShed-1.git
synced 2025-02-28 08:43:23 -05:00
BikeCsvImporter: make Bike#bike_model_id field accessible and specify it as a foreign key explicitly
This commit is contained in:
parent
c171598354
commit
95dbe162f7
@ -1,13 +1,14 @@
|
|||||||
class Bike < ActiveRecord::Base
|
class Bike < ActiveRecord::Base
|
||||||
acts_as_loggable
|
acts_as_loggable
|
||||||
attr_accessible :shop_id, :serial_number, :bike_brand_id, :model, :color, :bike_style_id, :seat_tube_height,
|
attr_accessible :shop_id, :serial_number, :bike_brand_id, :bike_model_id, :model, :color, :bike_style_id,
|
||||||
:top_tube_length, :bike_wheel_size_id, :value, :bike_condition_id, :bike_purpose_id, :photo
|
:seat_tube_height, :top_tube_length, :bike_wheel_size_id, :value, :bike_condition_id, :bike_purpose_id, :photo
|
||||||
|
|
||||||
has_many :transactions
|
has_many :transactions
|
||||||
|
|
||||||
has_one :owner, :class_name => 'User'
|
has_one :owner, :class_name => 'User'
|
||||||
has_one :task_list, :as => :item, :dependent => :destroy
|
has_one :task_list, :as => :item, :dependent => :destroy
|
||||||
belongs_to :bike_brand
|
belongs_to :bike_brand
|
||||||
|
belongs_to :bike_model
|
||||||
belongs_to :bike_style
|
belongs_to :bike_style
|
||||||
belongs_to :bike_condition
|
belongs_to :bike_condition
|
||||||
belongs_to :bike_purpose
|
belongs_to :bike_purpose
|
||||||
|
Loading…
x
Reference in New Issue
Block a user