Skip to content

Commit 4805075

Browse files
committed
change view now that user is always signed in
- also replace another current_user.team reference
1 parent 8f310c2 commit 4805075

File tree

2 files changed

+5
-15
lines changed

2 files changed

+5
-15
lines changed

app/helpers/teams_helper.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,8 @@ def message_to_create_ehanced_team
106106
end
107107
end
108108

109-
def no_account_no_team?
110-
!signed_in?
111-
end
112-
113109
def member_no_team?
114-
signed_in? && current_user.team.nil?
110+
current_user.membership.nil?
115111
end
116112

117113
def add_job_path(team)

app/views/teams/upgrade.html.haml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,28 +25,22 @@
2525
%section.title#learnmore
2626
%h1 A simple & engaging way to turn your organizations’ best qualities into an engineer magnet
2727

28-
-if no_account_no_team?
29-
%section.feature.cf
30-
.intro
31-
%h2 Signin to create your team
32-
.signup-buttons
33-
=render 'sessions/signup'
34-
-elsif member_no_team?
28+
- if member_no_team?
3529
%section.feature.cf
3630
.intro
3731
=render 'form'
3832
.results
3933
%section.feature.payment.cf.hide
40-
-elsif @team.can_post_job?
34+
- elsif @team.can_post_job?
4135
%section.feature.cf
4236
.intro
4337
= form_tag new_team_opportunity_path(@team), :method => :get do
4438
#post-a-job
4539
.save
4640
%input.button{:type => "submit", :value => "Post A Job"}
47-
-else
41+
- else
4842
%section.feature.payment.cf
49-
=render :partial => "payment", :locals => {:account => @team.account || current_user.team.build_account, :plan => @team.account.try(:current_plan)}
43+
= render partial: "payment", locals: { account: @team.account || current_user.membership.team.build_account, plan: @team.account.try(:current_plan) }
5044

5145

5246

0 commit comments

Comments
 (0)