From d7fd735ee07527e0986ee6f52429c9fa7f023565 Mon Sep 17 00:00:00 2001 From: cmrd Senya Date: Thu, 21 Jul 2016 12:12:31 +0000 Subject: [PATCH] Fix mobile getting_started use wrong person object --- app/helpers/invitation_codes_helper.rb | 4 ++-- app/views/people/_add_contact.haml | 6 +++--- features/mobile/invitations.feature | 2 ++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app/helpers/invitation_codes_helper.rb b/app/helpers/invitation_codes_helper.rb index 7d069864a..991cb826c 100644 --- a/app/helpers/invitation_codes_helper.rb +++ b/app/helpers/invitation_codes_helper.rb @@ -12,8 +12,8 @@ module InvitationCodesHelper def invited_by_message inviter = current_user.invited_by if inviter.present? - contact = current_user.contact_for(inviter.person) || Contact.new - render :partial => 'people/add_contact', :locals => {:inviter => inviter.person, :contact => contact} + @person = inviter.person + render partial: "people/add_contact" end end end diff --git a/app/views/people/_add_contact.haml b/app/views/people/_add_contact.haml index 34e1e33a9..6c03fcec1 100644 --- a/app/views/people/_add_contact.haml +++ b/app/views/people/_add_contact.haml @@ -2,8 +2,8 @@ = t('.invited_by') .media .pull-right - = render partial: "aspect_memberships/aspect_membership_dropdown", locals: {person: inviter} + = render partial: "aspect_memberships/aspect_membership_dropdown" .media-left - = person_image_link(inviter, size: :thumb_small, class: "media-object") + = person_image_link(@person, size: :thumb_small, class: "media-object") .media-body - = person_link(inviter) + = person_link(@person) diff --git a/features/mobile/invitations.feature b/features/mobile/invitations.feature index 375154461..97b34643f 100644 --- a/features/mobile/invitations.feature +++ b/features/mobile/invitations.feature @@ -12,3 +12,5 @@ Feature: Invitations And I press "Create account" Then I should see the "welcome to diaspora" message And I should be able to friend "alice@alice.alice" + When I select "Family" from "user_aspects" within "#hello-there" + Then the aspect dropdown within "#hello-there" should be labeled "Family"