Class: Workarea::Admin::CreateReleaseUndosController
Instance Method Summary
collapse
#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
#create ⇒ Object
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'app/controllers/workarea/admin/create_release_undos_controller.rb', line 12
def create
@undo_release.attributes = params[:release]
if @undo_release.save
@release.changesets.each do |changeset|
changeset.build_undo(release: @undo_release.model).save!
end
flash[:success] = t('workarea.admin.create_release_undos.flash_messages.saved')
redirect_to review_release_undo_path(@release)
else
render :new, status: :unprocessable_entity
end
end
|
#new ⇒ Object
9
10
|
# File 'app/controllers/workarea/admin/create_release_undos_controller.rb', line 9
def new
end
|
#review ⇒ Object
27
28
|
# File 'app/controllers/workarea/admin/create_release_undos_controller.rb', line 27
def review
end
|