-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from jeremyf/updating-to-appease-the-hound
Working to appease the hound I'm exploring Hound interaction, I'm using the pull request model.
- Loading branch information
Showing
13 changed files
with
199 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
MethodLength: | ||
Max: 10 | ||
CountComments: false | ||
|
||
LineLength: | ||
Max: 80 | ||
CountComments: false | ||
|
||
ClassLength: | ||
Max: 100 | ||
CountComments: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,23 @@ | ||
module Orcid | ||
# The foundation for Orcid controllers. A few helpful accessors. | ||
class ApplicationController < Orcid.parent_controller.constantize | ||
private | ||
def redirecting_because_user_already_has_a_connected_orcid_profile | ||
if orcid_profile = Orcid.profile_for(current_user) | ||
flash[:notice] = I18n.t("orcid.requests.messages.previously_connected_profile", orcid_profile_id: orcid_profile.orcid_profile_id) | ||
|
||
def redirecting_because_user_has_connected_orcid_profile | ||
if orcid_profile | ||
flash[:notice] = I18n.t( | ||
'orcid.requests.messages.previously_connected_profile', | ||
orcid_profile_id: orcid_profile.orcid_profile_id | ||
) | ||
redirect_to main_app.root_path | ||
return true | ||
else | ||
return false | ||
end | ||
end | ||
|
||
def orcid_profile | ||
@orcid_profile ||= Orcid.profile_for(current_user) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.