Class: RequestWizardsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- RequestWizardsController
- Defined in:
- app/controllers/request_wizards_controller.rb
Direct Known Subclasses
NewProjectWizard::AdditionalInformationGrantsAndFundingController, NewProjectWizard::AdditionalInformationProjectPermissionsController, NewProjectWizard::AdditionalInformationRelatedResourcesController, NewProjectWizard::ProjectInformationCategoriesController, NewProjectWizard::ProjectInformationController, NewProjectWizard::ProjectInformationDatesController, NewProjectWizard::ProjectTypeController, NewProjectWizard::ReviewAndSubmitController, NewProjectWizard::RolesAndPeopleController, NewProjectWizard::StorageAndAccessController
Instance Attribute Summary collapse
-
#request_model ⇒ Object
readonly
Returns the value of attribute request_model.
Instance Method Summary collapse
-
#save ⇒ Object
PUT /request_wizards/1/save.
-
#show ⇒ Object
GET /request_wizards/1.
Methods inherited from ApplicationController
#add_breadcrumb, #after_sign_in_path_for, #breadcrumbs, #new_session_path, #require_admin_user
Instance Attribute Details
#request_model ⇒ Object (readonly)
Returns the value of attribute request_model.
11 12 13 |
# File 'app/controllers/request_wizards_controller.rb', line 11 def request_model @request_model end |
Instance Method Details
#save ⇒ Object
PUT /request_wizards/1/save
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'app/controllers/request_wizards_controller.rb', line 26 def save # save and render dashboard save_request case params[:commit] when "Back" render_back when "Next" render_next else if params[:commit].start_with?("http") # Go directly to the step the user clicked on redirect_to params[:commit] else redirect_to "#{requests_path}/#{@request_model.id}" end end end |
#show ⇒ Object
GET /request_wizards/1
14 15 16 17 18 19 20 21 22 23 |
# File 'app/controllers/request_wizards_controller.rb', line 14 def show if current_user.superuser || current_user.sysadmin || current_user.trainer # create a request in the first step render_current else = "You do not have access to this page." flash[:notice] = redirect_to dashboard_path end end |