Class: Orcid::ProfileRequestsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Orcid::ProfileRequestsController
- Defined in:
- app/controllers/orcid/profile_requests_controller.rb
Instance Attribute Summary collapse
-
#profile_request ⇒ Object
readonly
Returns the value of attribute profile_request.
Instance Method Summary collapse
Instance Attribute Details
#profile_request ⇒ Object (readonly)
Returns the value of attribute profile_request.
6 7 8 |
# File 'app/controllers/orcid/profile_requests_controller.rb', line 6 def profile_request @profile_request end |
Instance Method Details
#create ⇒ Object
22 23 24 25 26 27 28 |
# File 'app/controllers/orcid/profile_requests_controller.rb', line 22 def create return false if redirecting_because_user_already_has_a_connected_orcid_profile return false if redirecting_because_user_has_existing_profile_request assign_attributes(new_profile_request) create_profile_request(new_profile_request) respond_with(new_profile_request) end |
#new ⇒ Object
15 16 17 18 19 20 |
# File 'app/controllers/orcid/profile_requests_controller.rb', line 15 def new return false if redirecting_because_user_already_has_a_connected_orcid_profile return false if redirecting_because_user_has_existing_profile_request assign_attributes(new_profile_request) respond_with(new_profile_request) end |
#show ⇒ Object
9 10 11 12 13 |
# File 'app/controllers/orcid/profile_requests_controller.rb', line 9 def show return false if redirecting_because_user_already_has_a_connected_orcid_profile return false if redirecting_because_no_profile_request_was_found respond_with(existing_profile_request) end |