Class: Orcid::ProfileConnectionsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Orcid::ProfileConnectionsController
- Defined in:
- app/controllers/orcid/profile_connections_controller.rb
Overview
Responsible for negotiating a user request Profile Creation.
chatty method names. The method names are fine, but the knowledge of Orcid::ProfileStatus is encapsulated in that class.
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
23 24 25 26 27 28 |
# File 'app/controllers/orcid/profile_connections_controller.rb', line 23 def create return false if redirecting_because_user_has_connected_orcid_profile assign_attributes(new_profile_connection) create_profile_connection(new_profile_connection) respond_with(orcid, new_profile_connection) end |
#index ⇒ Object
11 12 13 14 15 |
# File 'app/controllers/orcid/profile_connections_controller.rb', line 11 def index redirecting_because_user_does_not_have_a_connected_orcid_profile || redirecting_because_user_must_verify_their_connected_profile || redirecting_because_user_has_verified_their_connected_profile end |
#new ⇒ Object
17 18 19 20 21 |
# File 'app/controllers/orcid/profile_connections_controller.rb', line 17 def new return false if redirecting_because_user_has_connected_orcid_profile assign_attributes(new_profile_connection) respond_with(orcid, new_profile_connection) end |