Sha256: 4a90f1b50ecb5f74277b8f5a0a3250dcd813c34ea3a9409b0330a731c3f22c73
Contents?: true
Size: 521 Bytes
Versions: 103
Compression:
Stored size: 521 Bytes
Contents
module AttributesHelper def current_attributes_object @_current_attribute_settings&.dig(:object) end def current_attributes_strategy @_current_attribute_settings&.dig(:strategy) end def with_attribute_settings(object: current_attributes_object, strategy: current_attributes_strategy) old_attribute_settings = @_current_attribute_settings @_current_attribute_settings = {object: object, strategy: strategy} yield ensure @_current_attribute_settings = old_attribute_settings end end
Version data entries
103 entries across 103 versions & 2 rubygems