Module: Granite::Form::Model::Associations::NestedAttributes::NestedAttributesMethodsExtension
- Defined in:
- lib/granite/form/model/associations/nested_attributes.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.ensure_extended!(klass) ⇒ Object
198 199 200 201 |
# File 'lib/granite/form/model/associations/nested_attributes.rb', line 198 def self.ensure_extended!(klass) return if klass.singleton_class.ancestors.include?(self) klass.extend(self) end |
Instance Method Details
#nested_attributes_methods_module ⇒ Object
203 204 205 206 207 208 209 |
# File 'lib/granite/form/model/associations/nested_attributes.rb', line 203 def nested_attributes_methods_module @nested_attributes_methods_module ||= begin mod = const_set(:NestedAttributesMethods, Module.new) include(mod) mod end end |