Class: Disclaimer::SegmentsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/disclaimer/segments_controller.rb

Instance Method Summary collapse

Methods inherited from ActionController::Base

disclaimer, #disclaimer_exists?, #disclaimer_has_been_accepted, #host_app_root_path, #redirect_to_disclaimer, #store_disclaimer_return_location

Instance Method Details

#createObject



18
19
20
21
# File 'app/controllers/disclaimer/segments_controller.rb', line 18

def create
  new
  update
end

#deleteObject



32
33
# File 'app/controllers/disclaimer/segments_controller.rb', line 32

def delete
end

#destroyObject



35
36
37
38
# File 'app/controllers/disclaimer/segments_controller.rb', line 35

def destroy
  @segment.destroy
  redirect_to :controller => 'disclaimer/segments', :action => 'index'
end

#editObject



23
24
25
# File 'app/controllers/disclaimer/segments_controller.rb', line 23

def edit
  render :new
end

#indexObject



7
8
9
# File 'app/controllers/disclaimer/segments_controller.rb', line 7

def index
  @segments = Segment.all
end

#newObject



14
15
16
# File 'app/controllers/disclaimer/segments_controller.rb', line 14

def new
  @segment = Segment.new
end

#showObject



11
12
# File 'app/controllers/disclaimer/segments_controller.rb', line 11

def show
end

#updateObject



27
28
29
30
# File 'app/controllers/disclaimer/segments_controller.rb', line 27

def update
  @segment.update_attributes(params[:segment])
  redirect_to segment_path(@segment)      
end