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
225 226 227 228 229 |
# File 'lib/granite/form/model/associations/nested_attributes.rb', line 225 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
231 232 233 234 235 236 237 |
# File 'lib/granite/form/model/associations/nested_attributes.rb', line 231 def nested_attributes_methods_module @nested_attributes_methods_module ||= begin mod = const_set(:NestedAttributesMethods, Module.new) include(mod) mod end end |