Module: Formalism::ModelForms::FindOrCreate::ClassMethods

Defined in:
lib/formalism/model_forms/find_or_create.rb

Overview

Module for class methods

Instance Method Summary collapse

Instance Method Details

#inherited(child_form) ⇒ Object



11
12
13
14
15
16
17
18
# File 'lib/formalism/model_forms/find_or_create.rb', line 11

def inherited(child_form)
	super

	child_form_path = File.dirname caller_locations(1..1).first.path
	%w[find create].each { |form_type| require "#{child_form_path}/#{form_type}" }

	child_form.define_nested_forms
end