Instantly share code, notes, and snippets.

Embed
What would you like to do?
Smart Answer - Rendering Date Questions

Smart Answer Flows

Question

show.html.erb
  _content.html.erb
    _current_question.html.erb
      ::QuestionPresenter#partial_template_name
        _date_question.html.erb
          ::DateQuestionPresenter (undefined)
            ::QuestionPresenter (undefined)
              ::NodePresenter#method_missing
                SmartAnswer::Question::Date#defaulted_day?
                SmartAnswer::Question::Date#defaulted_month?
                SmartAnswer::Question::Date#defaulted_year?
          CurrentQuestionHelper#default_for_date
          CurrentQuestionHelper#prefill_value_for (if previous_response param set)
            ::DateQuestionPresenter#to_response
              ::QuestionPresenter (undefined)
                ::NodePresenter#to_response
                  SmartAnswer::Question::Date#to_response
          ::DateQuestionPresenter (undefined)
            ::QuestionPresenter (undefined)
              ::NodePresenter#method_missing
                SmartAnswer::Question::Date#default
          ::DateQuestionPresenter#start_date
          ::DateQuestionPresenter#end_date

Previous Question

show.html.erb
  _content.html.erb
    _previous_answers.html.erb
      _collapsed_question.html.erb
        ::DateQuestionPresenter#response_label

Smartdown Flows

Question

show.html.erb
  _content.html.erb
    _current_question.html.erb
      SmartdownAdapter::QuestionPresenter#partial_template_name
        _date_question.html.erb
          SmartdownAdapter::DateQuestionPresenter#defaulted_day?
          SmartdownAdapter::DateQuestionPresenter#defaulted_month?
          SmartdownAdapter::DateQuestionPresenter#defaulted_year?
          CurrentQuestionHelper#default_for_date
          CurrentQuestionHelper#prefill_value_for (if previous_response param set)
            SmartdownAdapter::DateQuestionPresenter#to_response
          SmartdownAdapter::DateQuestionPresenter#default
          SmartdownAdapter::DateQuestionPresenter#start_date
          SmartdownAdapter::DateQuestionPresenter#end_date

Previous Question

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment