Module: ActiveRecordSegment
- Defined in:
- lib/active_record_segment.rb,
lib/active_record_segment/version.rb,
lib/active_record_segment/segmentable.rb,
lib/active_record_segment/controller_context.rb,
lib/generators/active_record_segment/install_generator.rb
Defined Under Namespace
Modules: Generators, Segmentable
Classes: Configuration, ControllerContext
Constant Summary
collapse
- DEFAULT_IGNORED_ATTRIBUTES =
%w(updated_at created_at deleted_at)
- VERSION =
"0.1.1"
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.configuration ⇒ Object
Returns the value of attribute configuration.
38
39
40
|
# File 'lib/active_record_segment.rb', line 38
def configuration
@configuration
end
|
Class Method Details
40
41
42
|
# File 'lib/active_record_segment.rb', line 40
def configure
yield(configuration)
end
|
.purge_store! ⇒ Object
56
57
58
|
# File 'lib/active_record_segment.rb', line 56
def purge_store!
Thread.current[:active_record_segment_store] = {}
end
|
.reset ⇒ Object
44
45
46
|
# File 'lib/active_record_segment.rb', line 44
def reset
@configuration = Configuration.new
end
|
.store ⇒ Object
52
53
54
|
# File 'lib/active_record_segment.rb', line 52
def store
Thread.current[:active_record_segment_store] ||= {}
end
|