class Object

Public Class Methods

inherited_with_paper_trail(subclass) click to toggle source
# File lib/generators/et_history/templates/paper_trail.rb, line 3
def inherited_with_paper_trail subclass
  # remember to skip it on SchemaMigration which has its own version method
  skipped_models = ["ActiveRecord::SchemaMigration", "PaperTrail::Version"]
  inherited_without_paper_trail subclass
  unless skipped_models.include?(subclass.to_s)
    subclass.send(:has_paper_trail)
  end
end