Module: TemporalTables

Defined in:
lib/temporal_tables.rb,
lib/temporal_tables/version.rb,
lib/temporal_tables/whodunnit.rb,
lib/temporal_tables/arel_table.rb,
lib/temporal_tables/history_hook.rb,
lib/temporal_tables/temporal_class.rb,
lib/temporal_tables/temporal_adapter.rb,
lib/temporal_tables/relation_extensions.rb,
lib/temporal_tables/preloader_extensions.rb,
lib/temporal_tables/reflection_extensions.rb,
lib/temporal_tables/association_extensions.rb,
lib/temporal_tables/temporal_adapter_six_oh.rb,
lib/temporal_tables/connection_adapters/mysql_adapter.rb,
lib/temporal_tables/connection_adapters/postgresql_adapter.rb

Defined Under Namespace

Modules: AbstractReflectionExtensions, ArelTable, AssociationExtensions, ConnectionAdapters, HistoryHook, PreloaderExtensions, RelationExtensions, TemporalAdapter, TemporalAdapterSixOh, TemporalClass, Whodunnit Classes: Railtie

Constant Summary collapse

VERSION =
'1.0.3'

Class Method Summary collapse

Class Method Details

.add_updated_by_field(type = :string, &block) ⇒ Object



73
74
75
76
77
78
79
80
81
# File 'lib/temporal_tables.rb', line 73

def self.add_updated_by_field(type = :string, &block)
  if block_given?
    @add_updated_by_field = true
    @updated_by_type = type
    @updated_by_proc = block
  end

  @add_updated_by_field
end

.create_by_defaultObject



45
46
47
# File 'lib/temporal_tables.rb', line 45

def self.create_by_default
  @create_by_default
end

.create_by_default=(default) ⇒ Object



49
50
51
# File 'lib/temporal_tables.rb', line 49

def self.create_by_default=(default)
  @create_by_default = default
end

.skip_temporal_table_for(*tables) ⇒ Object



54
55
56
# File 'lib/temporal_tables.rb', line 54

def self.skip_temporal_table_for(*tables)
  @skipped_temporal_tables += tables
end

.skipped_temporal_tablesObject



58
59
60
# File 'lib/temporal_tables.rb', line 58

def self.skipped_temporal_tables
  @skipped_temporal_tables.dup
end

.updated_by_procObject



69
70
71
# File 'lib/temporal_tables.rb', line 69

def self.updated_by_proc
  @updated_by_proc
end

.updated_by_typeObject



65
66
67
# File 'lib/temporal_tables.rb', line 65

def self.updated_by_type
  @updated_by_type
end