mirror of
https://github.com/fspc/BikeShed-1.git
synced 2026-09-16 08:31:36 -04:00
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:
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user