Sha256: 426e90b3f690f6e03a3571b35536e1dd89935c0c618164c7a893ac27616f3602

Contents?: true

Size: 1.08 KB

Versions: 18

Compression:

Stored size: 1.08 KB

Contents

== SurveyorController

The SurveyorController class just includes actions from Surveyor::SurveyorControllerMethods module. You may include your own module, and overwrite the methods or add to them using "super". A template for this customization is in your app/controllers/surveyor\_controller.rb. SurveyorController is "unloadable", so changes in development (and any environment that does not cache classes) will be reflected immediately without restarting the app.

== Models

Surveyor's models can all be customized:

- answer
- dependency_condition
- dependency
- question_group
- question
- response_set
- response
- survey_section
- survey
- validation_condition
- validation

For example, create app/models/survey.rb with the following contents:

    class Survey < ActiveRecord::Base
      include Surveyor::Models::SurveyMethods
      def title
        "Custom #{super}"
      end
    end

== SurveyorHelper

== Views

Surveyor's views can be overwritten by simply creating views in app/views/surveyor

== Layout

Create a custom SurveyorController as above, and specify your custom layout in it.

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
surveyor-0.21.0 lib/generators/surveyor/templates/surveys/EXTENDING_SURVEYOR.md
surveyor-0.20.0 generators/extend_surveyor/templates/EXTENDING_SURVEYOR
surveyor-0.19.7 generators/extend_surveyor/templates/EXTENDING_SURVEYOR
surveyor-0.19.6 generators/extend_surveyor/templates/EXTENDING_SURVEYOR
surveyor-0.19.5 generators/extend_surveyor/templates/EXTENDING_SURVEYOR
surveyor-0.19.4 generators/extend_surveyor/templates/EXTENDING_SURVEYOR
surveyor-0.19.3 generators/extend_surveyor/templates/EXTENDING_SURVEYOR
surveyor-0.19.2 generators/extend_surveyor/templates/EXTENDING_SURVEYOR
surveyor-0.19.1 generators/extend_surveyor/templates/EXTENDING_SURVEYOR
surveyor-0.19.0 generators/extend_surveyor/templates/EXTENDING_SURVEYOR
surveyor-0.18.2 generators/extend_surveyor/templates/EXTENDING_SURVEYOR
surveyor-0.18.1 generators/extend_surveyor/templates/EXTENDING_SURVEYOR
surveyor-0.18.0 generators/extend_surveyor/templates/EXTENDING_SURVEYOR
surveyor-0.17.0 generators/extend_surveyor/templates/EXTENDING_SURVEYOR
surveyor-0.16.1 generators/extend_surveyor/templates/EXTENDING_SURVEYOR
surveyor-0.16.0 generators/extend_surveyor/templates/EXTENDING_SURVEYOR
surveyor-0.15.0 generators/extend_surveyor/templates/EXTENDING_SURVEYOR
surveyor-0.14.5 generators/extend_surveyor/templates/EXTENDING_SURVEYOR