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
# File 'app/controllers/workarea/admin/create_segments_controller.rb', line 25

def edit
end

#edit_ruleObject



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

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



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

def new_rule
  render :rules
end

#reviewObject



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

def review
end

#rulesObject



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

def rules
end