Module: GBDev::CallbackLogger::ClassMethods
- Defined in:
- lib/callback_logger.rb
Instance Attribute Summary collapse
-
#aacl_model ⇒ Object
Returns the value of attribute aacl_model.
-
#callback_logger_text_attr ⇒ Object
Returns the value of attribute callback_logger_text_attr.
Instance Method Summary collapse
Instance Attribute Details
#aacl_model ⇒ Object
Returns the value of attribute aacl_model.
11 12 13 |
# File 'lib/callback_logger.rb', line 11 def aacl_model @aacl_model end |
#callback_logger_text_attr ⇒ Object
Returns the value of attribute callback_logger_text_attr.
11 12 13 |
# File 'lib/callback_logger.rb', line 11 def callback_logger_text_attr @callback_logger_text_attr end |
Instance Method Details
#log_callbacks(new_options = {}) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/callback_logger.rb', line 13 def log_callbacks( = {}) = {:aacl_model => 'AppLog'} .merge!() mod = [:aacl_model].titleize.gsub(' ','') mod = ActiveSupport::Inflector.camelize(mod).constantize self.aacl_model = mod self.callback_logger_text_attr = [:text].to_sym if .has_key?(:text) extend GBDev::CallbackLogger::SingletonMethods include GBDev::CallbackLogger::InstanceMethods class_eval do after_create :log_create after_update :log_update after_destroy :log_destroy end # class_eval end |