From b11d04a3978c65da283993286f5a4c977cd066dc Mon Sep 17 00:00:00 2001 From: Jason Denney Date: Tue, 1 Jan 2013 21:06:41 -0500 Subject: [PATCH] Removing puts and console.logs --- app/components/bike_logs.rb | 2 +- app/components/bike_models.rb | 2 +- app/components/bikes.rb | 6 ----- app/components/bikes_border.rb | 2 -- app/components/brands_and_models_border.rb | 3 --- app/components/user_logs.rb | 5 ++--- app/components/user_profile_border.rb | 22 ------------------- app/components/user_profiles.rb | 2 +- app/components/users_and_profiles_border.rb | 3 --- .../bike_actions_controller.rb | 1 - .../transaction_actions_controller.rb | 1 - .../user_actions_controller.rb | 1 - 12 files changed, 5 insertions(+), 45 deletions(-) diff --git a/app/components/bike_logs.rb b/app/components/bike_logs.rb index 3e2de06..9564af4 100644 --- a/app/components/bike_logs.rb +++ b/app/components/bike_logs.rb @@ -7,7 +7,7 @@ class BikeLogs < Netzke::Basepack::Grid c.model = "ActsAsLoggable::Log" c.title = "Bike History" c.data_store = {auto_load: false} - c.scope = lambda { |rel| puts session.inspect; rel.where(:loggable_type => 'Bike',:loggable_id => session[:selected_bike_id]);} + c.scope = lambda { |rel| rel.where(:loggable_type => 'Bike',:loggable_id => session[:selected_bike_id]);} c.strong_default_attrs = { :loggable_type => 'Bike', :loggable_id => session[:selected_bike_id], diff --git a/app/components/bike_models.rb b/app/components/bike_models.rb index bb9a45e..55198c3 100644 --- a/app/components/bike_models.rb +++ b/app/components/bike_models.rb @@ -5,7 +5,7 @@ class BikeModels < Netzke::Basepack::Grid c.model = "BikeModel" c.title = "Models" c.data_store = {auto_load: false} - c.scope = lambda { |rel| puts session.inspect; rel.where(:bike_brand_id => session[:selected_bike_brand_id]);} + c.scope = lambda { |rel| rel.where(:bike_brand_id => session[:selected_bike_brand_id]);} c.strong_default_attrs = { :bike_brand_id => session[:selected_bike_brand_id] } diff --git a/app/components/bikes.rb b/app/components/bikes.rb index 27a5514..6f50825 100644 --- a/app/components/bikes.rb +++ b/app/components/bikes.rb @@ -45,11 +45,8 @@ class Bikes < Netzke::Basepack::Grid // setting the 'rowclick' event var view = this.getView(); view.on('itemclick', function(view, record){ - console.log(view); - console.log(record); // The beauty of using Ext.Direct: calling 3 endpoints in a row, which results in a single call to the server! this.selectBikeBrand({bike_brand_id: record.get('bike_brand__brand')}); - console.log(record.get('bike_brand__brand')); }, this); } JS @@ -58,8 +55,5 @@ class Bikes < Netzke::Basepack::Grid endpoint :select_bike_brand do |params, this| # store selected boss id in the session for this component's instance session[:selected_bike_brand_id] = params[:bike_brand_id] - puts "BikeID-----------------------------" - puts params[:bike_brand_id] - puts session.inspect end end diff --git a/app/components/bikes_border.rb b/app/components/bikes_border.rb index 5bfdc8d..3883d92 100644 --- a/app/components/bikes_border.rb +++ b/app/components/bikes_border.rb @@ -37,7 +37,5 @@ class BikesBorder < Netzke::Base endpoint :select_bike do |params, this| # store selected boss id in the session for this component's instance session[:selected_bike_id] = params[:bike_id] - puts "BikeID-----------------------------" - puts session.inspect end end diff --git a/app/components/brands_and_models_border.rb b/app/components/brands_and_models_border.rb index 8dab538..9c1b8af 100644 --- a/app/components/brands_and_models_border.rb +++ b/app/components/brands_and_models_border.rb @@ -36,9 +36,6 @@ class BrandsAndModelsBorder < Netzke::Base endpoint :select_bike_brand do |params, this| # store selected boss id in the session for this component's instance session[:selected_bike_brand_id] = params[:bike_brand_id] - puts "BikeBrandID-----------------------------" - #puts params[:bike_brand_id] - puts session.inspect end end diff --git a/app/components/user_logs.rb b/app/components/user_logs.rb index 876bb60..a580967 100644 --- a/app/components/user_logs.rb +++ b/app/components/user_logs.rb @@ -21,7 +21,7 @@ class UserLogs < Netzke::Basepack::Grid user_log_data_store = {auto_load: true } #admins and staff else - user_log_scope = lambda { |rel| puts session.inspect; rel.where(:loggable_type => 'User',:loggable_id => session[:selected_user_id]);} + user_log_scope = lambda { |rel| rel.where(:loggable_type => 'User',:loggable_id => session[:selected_user_id]);} user_log_strong_default_attrs.merge!( { :loggable_id => session[:selected_user_id] } ) user_log_data_store = {auto_load: true } end @@ -30,9 +30,8 @@ class UserLogs < Netzke::Basepack::Grid c.title = "User History" c.data_store = user_log_data_store c.scope = user_log_scope - puts "user_log_strong_default_attrs" - puts user_log_strong_default_attrs.inspect c.strong_default_attrs = user_log_strong_default_attrs + c.columns = [ { :name => :start_date, :format => "g:ia - D, M j - Y", :width => 165, :default_value => Time.now.to_formatted_s(:db) }, { :name => :end_date, :hidden => true, :default_value => Time.now.to_formatted_s(:db) }, diff --git a/app/components/user_profile_border.rb b/app/components/user_profile_border.rb index 49189b7..c064de7 100644 --- a/app/components/user_profile_border.rb +++ b/app/components/user_profile_border.rb @@ -24,8 +24,6 @@ class UserProfileBorder < Netzke::Base function(){ // calling superclass's initComponent this.callParent(); - console.log("init component"); - console.log(this); this.getComponent('user_stats').updateStats(); var store = this.getComponent('user_logs').getStore() @@ -33,26 +31,6 @@ class UserProfileBorder < Netzke::Base console.log("Bitches"); this.getComponent('user_stats').updateStats(); }, this); - /** - this.getComponent('user_logs').getStore().load({ - callback : function(records, operation, success) { - console.log(self); - console.log(this); - console.log("records"); - console.log(records); - console.log("operation"); - console.log(operation); - console.log("success"); - console.log(success); - - self.getComponent('user_stats').updateStats(); - } - });*/ - - // var view = this.getComponent('user_logs').getView(); - // view.on('itemclick', function(view, record){ - // this.getComponent('user_stats').updateStats(); - // }, this); } JS end diff --git a/app/components/user_profiles.rb b/app/components/user_profiles.rb index 8c7f6a9..eea0545 100644 --- a/app/components/user_profiles.rb +++ b/app/components/user_profiles.rb @@ -6,7 +6,7 @@ class UserProfiles < Netzke::Basepack::Grid user_profiles_scope = lambda { |rel| rel.where(:user_id => controller.current_user.id);} user_profiles_data_store = { auto_load: true } else - user_profiles_scope = lambda { |rel| puts session.inspect; rel.where(:user_id => session[:selected_user_id]);} + user_profiles_scope = lambda { |rel| rel.where(:user_id => session[:selected_user_id]);} user_profiles_data_store = { auto_load: false} end diff --git a/app/components/users_and_profiles_border.rb b/app/components/users_and_profiles_border.rb index f5bb36d..71e9b51 100644 --- a/app/components/users_and_profiles_border.rb +++ b/app/components/users_and_profiles_border.rb @@ -41,9 +41,6 @@ class UsersAndProfilesBorder < Netzke::Base endpoint :select_user do |params, this| # store selected boss id in the session for this component's instance session[:selected_user_id] = params[:user_id] - puts "UserID-----------------------------" - puts params[:user_id] - puts session.inspect end end diff --git a/app/controllers/acts_as_loggable/bike_actions_controller.rb b/app/controllers/acts_as_loggable/bike_actions_controller.rb index 4d57e0c..5551c23 100644 --- a/app/controllers/acts_as_loggable/bike_actions_controller.rb +++ b/app/controllers/acts_as_loggable/bike_actions_controller.rb @@ -21,7 +21,6 @@ class ActsAsLoggable::BikeActionsController < AuthenticatedController end def update - puts bike_action.inspect if bike_action.save redirect_to acts_as_loggable_bike_actions_url else diff --git a/app/controllers/acts_as_loggable/transaction_actions_controller.rb b/app/controllers/acts_as_loggable/transaction_actions_controller.rb index a5cb0d0..390a929 100644 --- a/app/controllers/acts_as_loggable/transaction_actions_controller.rb +++ b/app/controllers/acts_as_loggable/transaction_actions_controller.rb @@ -21,7 +21,6 @@ class ActsAsLoggable::TransactionActionsController < AuthenticatedController end def update - puts transaction_action.inspect if transaction_action.save redirect_to acts_as_loggable_transaction_actions_url else diff --git a/app/controllers/acts_as_loggable/user_actions_controller.rb b/app/controllers/acts_as_loggable/user_actions_controller.rb index 8e77f7d..4a5ca31 100644 --- a/app/controllers/acts_as_loggable/user_actions_controller.rb +++ b/app/controllers/acts_as_loggable/user_actions_controller.rb @@ -21,7 +21,6 @@ class ActsAsLoggable::UserActionsController < AuthenticatedController end def update - puts user_action.inspect if user_action.save redirect_to acts_as_loggable_user_actions_url else