Module: Recorder

Defined in:
lib/recorder.rb,
lib/recorder/tape.rb,
lib/recorder/version.rb,
lib/recorder/observer.rb,
lib/recorder/changeset.rb,
lib/recorder/draper/decorator_concern.rb,
lib/recorder/rails/controller_concern.rb,
lib/generators/recorder/install_generator.rb

Defined Under Namespace

Modules: Draper, Observer, Rails, VERSION Classes: Changeset, InstallGenerator, Revision, Tape

Class Method Summary collapse

Class Method Details

.active_record_protected_attributes?Boolean

Returns a boolean indicating whether “protected attibutes” should be configured, e.g. attr_accessible.



24
25
26
# File 'lib/recorder.rb', line 24

def active_record_protected_attributes?
  @active_record_protected_attributes ||= !!defined?(ProtectedAttributes)
end

.info=(hash) ⇒ Object

Sets Recorder information from the controller.



12
13
14
# File 'lib/recorder.rb', line 12

def info=(hash)
  self.store.merge!(hash)
end

.meta=(hash) ⇒ Object

Sets Recorder meta information.



18
19
20
# File 'lib/recorder.rb', line 18

def meta=(hash)
  self.store[:meta] = hash
end

.storeObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Thread-safe hash to hold Recorder’s data.



30
31
32
# File 'lib/recorder.rb', line 30

def store
  RequestStore.store[:recorder] ||= { }
end

.versionObject



34
35
36
# File 'lib/recorder.rb', line 34

def version
  VERSION::STRING
end