Skip to content

Instantly share code, notes, and snippets.

@floehopper
Created May 12, 2015 11:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save floehopper/6c1a53a813f7ce57ce2b to your computer and use it in GitHub Desktop.
Save floehopper/6c1a53a813f7ce57ce2b to your computer and use it in GitHub Desktop.
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