petehamilton / citier

CITIER (Class Inheritance & Table Inheritance Embeddings for Rails) is a solution for simple Multiple Class Inheritance in Rails.
88 stars 24 forks source link

How to suppress the citier logging #48

Open axsuul opened 12 years ago

axsuul commented 12 years ago

How do I suppress this output (in the server log and before starting up rails console)?

citier -> tablename (view) ->
citier -> Non Root Class
citier -> table_name ->
citier -> tablename (view) ->
lankz commented 9 years ago

Here's a copy-paste of an old hack to do this:

# NOTE: this is somewhat hacky, but the first thing citier does is set the value
#       of the +CITIER_DEBUGGING+ constant to +true+ if the rails environment is
#       development. use an environment variable to re-enable
Object.send(:remove_const, :CITIER_DEBUGGING)
CITIER_DEBUGGING = !!(ENV.fetch('CITIER_DEBUGGING', false))