Class: Orcid::ProfileRequestsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/orcid/profile_requests_controller.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#profile_requestObject (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

#createObject



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

#newObject



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

#showObject



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