Class: Workarea::Admin::CreateReleasesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/workarea/admin/create_releases_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



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

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

  if @release.save
    flash[:success] =
      t('workarea.admin.create_releases.flash_messages.created')
    redirect_to plan_create_release_path(@release)
  else
    render :setup, status: :unprocessable_entity
  end
end

#editObject



24
25
26
# File 'app/controllers/workarea/admin/create_releases_controller.rb', line 24

def edit
  render :setup
end

#indexObject



8
9
10
# File 'app/controllers/workarea/admin/create_releases_controller.rb', line 8

def index
  render :setup
end

#planObject



28
29
30
31
32
33
34
35
36
# File 'app/controllers/workarea/admin/create_releases_controller.rb', line 28

def plan
  self.current_release = @release

  search = Search::AdminReleasables.new(params)
  @search = SearchViewModel.new(
    search,
    view_model_options.merge(show_type: true)
  )
end