Skip to content

Commit

Permalink
adding changes for observers
Browse files Browse the repository at this point in the history
  • Loading branch information
Dansbeerlist committed Oct 31, 2013
1 parent e1b56ac commit 4c9b847
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
3 changes: 3 additions & 0 deletions config/observer_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"observers":[":cacher",":stream_item_cache",":conversation_observer"]
}
11 changes: 9 additions & 2 deletions config/shared_boot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,16 @@

# Activate observers that should always be running

#Empowered: added converstation observer
#Empowered: adding converstation observer (if file exists)
#config.active_record.observers = [:cacher, :stream_item_cache]
config.active_record.observers = [:cacher, :stream_item_cache, :conversation_observer]

if File.exist? ('observer_config.json')
duh = JSON.parse(File.open('observer_config.json'))
config.active_record.observers = duh.observers
else
config.active_record.observers = [:cacher, :stream_item_cache]
end


config.autoload_paths += %W(#{Rails.root}/app/middleware
#{Rails.root}/app/observers
Expand Down

0 comments on commit 4c9b847

Please sign in to comment.