Class: Workarea::Admin::ReleaseSessionsController
- Inherits:
-
ApplicationController
- Object
- Workarea::ApplicationController
- ApplicationController
- Workarea::Admin::ReleaseSessionsController
- Defined in:
- app/controllers/workarea/admin/release_sessions_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
Instance Method Details
#create ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'app/controllers/workarea/admin/release_sessions_controller.rb', line 5 def create release = Release.find(params[:release_id]) rescue nil self.current_release = release if request.xhr? render json: { release: release } elsif params[:return_to].present? redirect_to URI.parse(params[:return_to]).request_uri elsif params[:release_id].present? redirect_back fallback_location: url_for(release) else redirect_back fallback_location: releases_path end end |
#touch ⇒ Object
20 21 22 |
# File 'app/controllers/workarea/admin/release_sessions_controller.rb', line 20 def touch current_release_session.touch end |