Guest User

Untitled

a guest
Feb 21st, 2018
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.12 KB | None | 0 0
  1. diff --git a/app/models/kid.rb b/app/models/kid.rb
  2. index 0ad1f19..0b36aeb 100644
  3. --- a/app/models/kid.rb
  4. +++ b/app/models/kid.rb
  5. @@ -1182,6 +1182,7 @@ class Kid < ActiveRecord::Base
  6. def initialize_paid_status
  7. # send paid event to client
  8. favor(WebpageCategory.find_by_name("Homework Helper"))
  9. + logger.info("DEBUG: #{connection.inspect}")
  10. connection.with_master do
  11. send_command( { :token => 'paid', :obj => { :kid => to_kz_hash } } )
  12. end
  13. diff --git a/config/environment.rb b/config/environment.rb
  14. index aa3e67f..185f32d 100644
  15. --- a/config/environment.rb
  16. +++ b/config/environment.rb
  17. @@ -38,6 +38,12 @@ Rails::Initializer.run do |config|
  18. config.action_controller.session_store = :active_record_store
  19.  
  20. config.action_controller.fragment_cache_store = :mem_cache_store, %w[localhost]
  21. +
  22. + # Masochism for replication
  23. + #
  24. + config.after_initialize do
  25. + ActiveReload::ConnectionProxy.setup!
  26. + end unless RAILS_ENV == "test"
  27. end
  28.  
  29. # We temporarily want to fallback to old sessions table to smooth the transition
  30. diff --git a/config/environments/production.rb b/config/environments/production.rb
  31. index e2449f9..c0c9094 100644
  32. --- a/config/environments/production.rb
  33. +++ b/config/environments/production.rb
  34. @@ -21,11 +21,5 @@ config.action_controller.perform_caching = true
  35. config.action_controller.session :session_domain => ".kidzui.com"
  36. ActionController::Base.session_options[:session_domain] = '.kidzui.com'
  37.  
  38. -# Masochism for replication
  39. -#
  40. -config.after_initialize do
  41. - ActiveReload::ConnectionProxy.setup!
  42. -end
  43. -
  44. SUPPORT_EMAILS = ['support@kidzui.com']
  45. EDITORIAL_EMAILS = ['shannon@kidzui.com', 'jessica@kidzui.com']
  46. \ No newline at end of file
  47. diff --git a/config/environments/qa.rb b/config/environments/qa.rb
  48. index e65f234..bfd2103 100644
  49. --- a/config/environments/qa.rb
  50. +++ b/config/environments/qa.rb
  51. @@ -25,9 +25,3 @@ ActionController::Base.session_options[:session_domain] = '.kidzui.com'
  52. #
  53. SUPPORT_EMAILS = ['noreply@kidzui.com']
  54. EDITORIAL_EMAILS = ['noreply@kidzui.com']
  55. -
  56. -# Masochism for replication
  57. -#
  58. -config.after_initialize do
  59. - ActiveReload::ConnectionProxy.setup!
  60. -end
Add Comment
Please, Sign In to add comment