Module: AssociateJsonb::WithStoreAttribute
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/associate_jsonb/with_store_attribute.rb
Defined Under Namespace
Modules: ClassMethods
Classes: InstanceMethodsOnActivation, StoreColumnAttributeTracker
Instance Method Summary
collapse
Instance Method Details
#[](k) ⇒ Object
140
141
142
143
144
145
146
|
# File 'lib/associate_jsonb/with_store_attribute.rb', line 140
def [](k)
if is_store_column_attribute?(k)
self.public_send(k)
else
super
end
end
|
#[]=(k, v) ⇒ Object
148
149
150
151
152
153
154
|
# File 'lib/associate_jsonb/with_store_attribute.rb', line 148
def []=(k, v)
if is_store_column_attribute?(k)
self.public_send(:"#{k}=", v)
else
super
end
end
|
#is_store_column_attribute?(name) ⇒ Boolean
136
137
138
|
# File 'lib/associate_jsonb/with_store_attribute.rb', line 136
def is_store_column_attribute?(name)
self.class.is_store_column_attribute?(name)
end
|