Created
April 8, 2013 19:58
-
-
Save garybernhardt/5339969 to your computer and use it in GitHub Desktop.
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
diff --git a/app/views/devise/shared/_links.erb b/app/views/devise/shared/_links.erb | |
dissimilarity index 99% | |
index 414904b..0b0b21d 100644 | |
--- a/app/views/devise/shared/_links.erb | |
+++ b/app/views/devise/shared/_links.erb | |
@@ -1,19 +1,15 @@ | |
-<%- if controller_name != 'sessions' %> | |
- <%= link_to "Sign in", new_session_path(resource_name) %><br /> | |
-<% end -%> | |
- | |
-<%- if devise_mapping.registerable? && controller_name != 'registrations' %> | |
- <%= link_to "Sign up", new_registration_path(resource_name) %><br /> | |
-<% end -%> | |
- | |
-<%- if devise_mapping.recoverable? && controller_name != 'passwords' %> | |
- <%= link_to "Forgot your password?", new_password_path(resource_name) %><br /> | |
-<% end -%> | |
- | |
-<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %> | |
- <%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %><br /> | |
-<% end -%> | |
- | |
-<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %> | |
- <%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %><br /> | |
-<% end -%> | |
+<%= | |
+ sign_in = link_to "Sign in", new_user_session_path | |
+ sign_up = link_to "Sign up", new_user_registration_path | |
+ forgot_password = link_to "Forgot password?", new_user_password_path | |
+ missing_email = link_to "Missing confirmation email?", new_user_confirmation_path | |
+ | |
+ actions = [ | |
+ (sign_in if controller_name != 'sessions'), | |
+ (sign_up if controller_name != 'registration'), | |
+ (forgot_password if controller_name != 'passwords'), | |
+ (missing_email if controller_name != 'confirmations'), | |
+ ].compact | |
+ | |
+ raw(actions.join(" — ")) | |
+%> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment