Module: Formalism::ModelForms::Find
- Includes:
- Base, Memery
- Defined in:
- lib/formalism/model_forms/find.rb
Overview
Base form for model finding
Instance Attribute Summary
Attributes included from Base
Instance Method Summary collapse
Instance Method Details
#before_retry ⇒ Object
22 23 24 25 26 27 28 29 30 |
# File 'lib/formalism/model_forms/find.rb', line 22 def before_retry return if @initialized_with_instance super return unless instance_variable_defined? :@instance remove_instance_variable :@instance end |
#initialize(params_or_instance = {}) ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/formalism/model_forms/find.rb', line 12 def initialize(params_or_instance = {}) if params_or_instance.is_a?(Hash) super(params_or_instance) else @initialized_with_instance = true self.instance = params_or_instance super() end end |