| Module | SmerfFormsHelper |
| In: |
app/helpers/smerf_forms_helper.rb
|
This module contains all the helper methods used by the smerf form views.
This method creates a formatted error message that is then displayed on the smerf form page to inform the user of any errors.
CSS identifier: smerfFormError
This method creates a formatted notice message that is then displayed on the smerf form. The notice message is retrieved from the flash[:notice].
CSS identifier: smerfFormNotice
This method retrieves and formats the group description of the group passed in as a parameter.
CSS identifier: smerfGroup
This method retrieves and formats the group name of the group passed in as a parameter.
CSS identifier: smerfGroup
This method formats the question, and any answers and subquestions defined for it. The method takes a question object(SmerfQuestion) and a level indicator as parameters. The level indicator tells us if a question is a subquestion or not (level > 1).
The question type is checked to see how is should be formatted, currently the following formats are supported:
CSS identifiers:
smerfQuestionHeader smerfQuestion smerfSubquestion smerfQuestionError smerfInstruction