class DatashiftJourney::Configuration
Attributes
In development, you can add a state jumper toolbar, for jumping straight to any state
The start page link for journey page Back links
@param [String<#call>] @return [String<#call>]
The module(s) under which to find Forms Form factory will look for a Form class related to a state called
"#{mod}::#{journey_plan.state}Form"
@param [String<#call>] module name under which Forms reside @return [String<#call>]
When no Form is required for a specific HTML page, you an specify that a NullForm is to be used by adding that state to this list
@param [Array<#call>] List of states that require only a NullForm @return [Array<#call>]
The location of the View partials, for rendering
default is empty, for views stored directly in app/views
Add required details of states to jump to (see StateJumperEntry) to this ARRAY
So that any data required for previous states can be created, it supports passing in a Factory that creates that data for you by value. Use nil if no data required
The factory should return an instance of your DatashiftJourney.journey_plan_class
@param [ StateJumperEntry.new(:state_name, “State Name”, :state_factory), .… ]
Always use a NullForm when no designated Form for a page @param [Boolean<#call>] @return [Boolean<#call>]
Public Class Methods
@return [DatashiftJourney::Configuration] current configuration
# File lib/datashift_journey/configuration.rb, line 80 def self.call @configuration ||= DatashiftJourney::Configuration.new end
Modify current DatashiftJourney
configuration “`
DatashiftJourney::Configuration.configure do |config| config.html_only = false end
“`
# File lib/datashift_journey/configuration.rb, line 99 def self.configure yield call end
# File lib/datashift_journey/configuration.rb, line 62 def initialize @forms_module_name = '' @partial_location = '' @use_null_form_when_no_form = false @null_form_list = [] @layout = 'application' @add_state_jumper_toolbar = false @state_jumper_states = [] end
# File lib/datashift_journey/configuration.rb, line 84 def self.reset @configuration = DatashiftJourney::Configuration.new end
Public Instance Methods
# File lib/datashift_journey/configuration.rb, line 75 def backto_start_url @backto_start_url ||= Rails.application.routes.url_helpers.root_path end