Class: Workarea::Admin::CreateSegmentsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/workarea/admin/create_segments_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#current_user, #find_sort, #wrap_in_view_model, wrap_in_view_model

Methods included from Publishing

#allow_publishing!, #allow_publishing?, #set_publishing_options

Methods included from Visiting

#most_visited

Instance Method Details

#createObject



14
15
16
17
18
19
20
21
22
23
# File 'app/controllers/workarea/admin/create_segments_controller.rb', line 14

def create
  @segment.attributes = params[:segment]

  if @segment.save
    flash[:success] = t('workarea.admin.create_segments.flash_messages.saved')
    redirect_to rules_create_segment_path(@segment)
  else
    render :setup, status: :unprocessable_entity
  end
end

#editObject



25
26
27
# File 'app/controllers/workarea/admin/create_segments_controller.rb', line 25

def edit
  render :setup
end

#edit_ruleObject



36
37
38
# File 'app/controllers/workarea/admin/create_segments_controller.rb', line 36

def edit_rule
  render :rules
end

#indexObject



10
11
12
# File 'app/controllers/workarea/admin/create_segments_controller.rb', line 10

def index
  render :setup
end

#new_ruleObject



32
33
34
# File 'app/controllers/workarea/admin/create_segments_controller.rb', line 32

def new_rule
  render :rules
end

#reviewObject



40
41
# File 'app/controllers/workarea/admin/create_segments_controller.rb', line 40

def review
end

#rulesObject



29
30
# File 'app/controllers/workarea/admin/create_segments_controller.rb', line 29

def rules
end