Module: DatashiftJourney::FormMixin

Extended by:
ActiveSupport::Concern
Includes:
ActionView::Helpers::FormOptionsHelper
Included in:
Collector::BaseCollectorForm
Defined in:
app/forms/datashift_journey/concerns/form_mixin.rb

Overview

Collection of tools to support the Forms

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#journey_planObject (readonly)

Returns the value of attribute journey_plan.



13
14
15
# File 'app/forms/datashift_journey/concerns/form_mixin.rb', line 13

def journey_plan
  @journey_plan
end

#redirection_urlObject

Returns the value of attribute redirection_url.



14
15
16
# File 'app/forms/datashift_journey/concerns/form_mixin.rb', line 14

def redirection_url
  @redirection_url
end

Instance Method Details

#redirect?Boolean

Returns:

  • (Boolean)


21
22
23
24
# File 'app/forms/datashift_journey/concerns/form_mixin.rb', line 21

def redirect?
  Rails.logger.debug "Checking for REDIRECTION - [#{redirection_url}]"
  !redirection_url.nil?
end

#validate(params) ⇒ Object



16
17
18
19
# File 'app/forms/datashift_journey/concerns/form_mixin.rb', line 16

def validate(params)
  Rails.logger.debug "VALIDATING #{model.inspect} - Params - #{form_params(params)}"
  super form_params(params)
end