diff --git a/app/components/bikes.rb b/app/components/bikes.rb index 3555c4d..5de3e05 100644 --- a/app/components/bikes.rb +++ b/app/components/bikes.rb @@ -2,6 +2,7 @@ class Bikes < Netzke::Basepack::Grid def configure(c) super c.model = "Bike" + c.data_store.sorters = [{ :property => :shop_id, :direction => :ASC}] # columns with :id set, have :min_chars set in init_component # See: http://stackoverflow.com/questions/17738962/netzke-grid-filtering diff --git a/app/components/user_role_joins.rb b/app/components/user_role_joins.rb index 760819e..623aed3 100644 --- a/app/components/user_role_joins.rb +++ b/app/components/user_role_joins.rb @@ -4,6 +4,7 @@ class UserRoleJoins < Netzke::Basepack::Grid c.model = "UserRoleJoin" c.header = false c.title = "User Roles" + c.data_store.sorters = [{ :property => :user__username, :direction => :ASC}] c.columns = [ { :name => :user__username, :text => "Username", :read_only => true}, { :name => :name, :getter => lambda{ |rec| diff --git a/app/components/users.rb b/app/components/users.rb index 0109b4d..34086d5 100644 --- a/app/components/users.rb +++ b/app/components/users.rb @@ -13,6 +13,7 @@ class Users < Netzke::Basepack::Grid c.header = false c.model = "User" + c.data_store.sorters = [{ :property => :username, :direction => :ASC}] c.columns = [ { :name => :username, :read_only => true }, :first_name,