# adding vulgatify method to all active record classes class ActiveRecord::Base def self.vulgatify(options = {}) include VulgataMethods include VulgataCallbacks self.vlg_priority = options[:priority] || Vulgata.configuration.deafult_priority self.vlg_strategy = options[:strategy] || Vulgata.configuration.deafult_strategy self.vlg_after_translated = options[:after_translated] self.vlg_after_approved = options[:after_approved] self.vlg_preprocess_setter = options[:preproccess_setter] self.vlg_preprocess_getter = options[:preproccess_getter] self.vlg_context_path = options[:context_path] self.vlg_context_path_param = options[:context_path_param] Vulgata::Helpers.add_translating_class self end end