Moving bike model to the bikes table

Leaving the bike_models table and bikes.bike_model_id column as a backup.
This commit is contained in:
Jason Denney
2013-09-02 17:26:07 -04:00
parent 3c4e5c21c2
commit 47f616b7b0
6 changed files with 17 additions and 13 deletions
+2 -2
View File
@@ -10,7 +10,7 @@ class Bikes < Netzke::Basepack::Grid
{ :name => :shop_id, :text => 'Shop ID'},
:serial_number,
{ :id => :bike_brand__brand, :name => :bike_brand__brand, :text => 'Brand'},
{ :id => :bike_model__model, :name => :bike_model__model, :text => 'Model',
{ :name => :model, :text => 'Model',
:scope => lambda { |rel|
if session[:selected_bike_brand_id]
rel.where(:bike_brand_id => session[:selected_bike_brand_id])
@@ -43,7 +43,7 @@ class Bikes < Netzke::Basepack::Grid
# :field_label MUST be defined in order for search to work
[
{ :name => :bike_brand__brand, :field_label => 'Brand' },
{ :name => :bike_model__model, :field_label => 'Model'},
{ :name => :model, :field_label => 'Model'},
{ :name => :shop_id, :field_label => 'Shop ID'},
{ :name => :serial_number, :field_label => 'Serial Number'},
{ :name => "color", :xtype => "xcolorcombo"},
@@ -6,7 +6,6 @@
//due to Netzke bug, :min_chars attribute doesn't work
var min_char_columns = [
"bike_brand__brand",
"bike_model__model",
"bike_style__style",
"bike_condition__condition",
"bike_purpose__purpose"]