Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Mentoring tweaks

- don't show the user in their own matches
- fix already-signed-in user flow
- disable test route
  • Loading branch information...
commit 5edeff2bbcaa0be60a2c268fd389fd69e25a5bd3 1 parent f148310
@reidab authored
View
2  app/controllers/mentoring_controller.rb
@@ -47,6 +47,7 @@ def matches
mentor_rankings = Hash.new(0)
current_person.mentee_topic_models.each do |topic|
topic.mentors.each do |mentor|
+ next if mentor == current_person
mentor_rankings[mentor] += 1
end
end
@@ -55,6 +56,7 @@ def matches
mentee_rankings = Hash.new(0)
current_person.mentor_topic_models.each do |topic|
topic.mentees.each do |mentee|
+ next if mentee == current_person
mentee_rankings[mentee] += 1
end
end
View
3  app/stylesheets/desktop.sass
@@ -234,6 +234,9 @@ body
+alpha
.user_welcome
+grid(7,16)
+ .signed_in_user
+ img.avatar
+ margin-right: 1em
div#creepy-baby-sloth
View
2  app/views/mentoring/profile_welcome.html.haml
@@ -19,6 +19,8 @@
%p
If this isn't you, you can
= link_to t('sign_out'), mentoring_sign_out_path
+ %p
+ = link_to "Continue", mentoring_profile_edit_path
- elsif @matched_user.present?
.matched-user
%h3 Welcome back!
View
2  config/routes.rb
@@ -5,7 +5,7 @@
get '/s(/:query)' => 'site#search', :as => :short_search
get '/opensearch(.:format)' => 'site#opensearch', :as => :opensearch
- get '/mentoring/test/' => 'mentoring#test'
+ # get '/mentoring/test/' => 'mentoring#test'
post '/mentoring/search' => 'mentoring#search', :as => :mentoring_search
post '/mentoring/profile' => 'mentoring#profile', :as => :mentoring_profile
get '/mentoring/profile/welcome' => 'mentoring#profile_welcome', :as => :mentoring_profile_welcome
Please sign in to comment.
Something went wrong with that request. Please try again.