Module: SurveyorControllerCustomMethods

Included in:
SurveyorController
Defined in:
lib/generators/surveyor/templates/app/controllers/surveyor_controller.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



3
4
5
6
7
# File 'lib/generators/surveyor/templates/app/controllers/surveyor_controller.rb', line 3

def self.included(base)
  # base.send :before_filter, :require_user   # AuthLogic
  # base.send :before_filter, :login_required  # Restful Authentication
  # base.send :layout, 'surveyor_custom'
end

Instance Method Details

#createObject



14
15
16
# File 'lib/generators/surveyor/templates/app/controllers/surveyor_controller.rb', line 14

def create
  super
end

#editObject



20
21
22
# File 'lib/generators/surveyor/templates/app/controllers/surveyor_controller.rb', line 20

def edit
  super
end

#newObject

Actions



10
11
12
13
# File 'lib/generators/surveyor/templates/app/controllers/surveyor_controller.rb', line 10

def new
  super
  # @title = "You can take these surveys"
end

#showObject



17
18
19
# File 'lib/generators/surveyor/templates/app/controllers/surveyor_controller.rb', line 17

def show
  super
end

#surveyor_finishObject

surveyor.available_surveys_path



32
33
34
35
# File 'lib/generators/surveyor/templates/app/controllers/surveyor_controller.rb', line 32

def surveyor_finish
  # the update action redirects to this method if given params[:finish]
  super # surveyor.available_surveys_path
end

#surveyor_indexObject

Paths



28
29
30
31
# File 'lib/generators/surveyor/templates/app/controllers/surveyor_controller.rb', line 28

def surveyor_index
  # most of the above actions redirect to this method
  super # surveyor.available_surveys_path
end

#updateObject



23
24
25
# File 'lib/generators/surveyor/templates/app/controllers/surveyor_controller.rb', line 23

def update
  super
end