File tree 2 files changed +9
-3
lines changed
2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ def show
51
51
@team . viewed_by ( viewing_user || session_id ) unless is_admin?
52
52
@job = show_params [ :job_id ] . nil? ? @team . jobs . sample : Opportunity . with_public_id ( show_params [ :job_id ] )
53
53
@other_jobs = @team . jobs . reject { |job | job . id == @job . id } unless @job . nil?
54
+ @job_page = show_params [ :job_id ] . present?
54
55
return render ( :premium ) if show_premium_page?
55
56
end
56
57
format . json do
Original file line number Diff line number Diff line change 1
1
- if ENV['ENABLE_TWITTER_CARDS']
2
2
- meta twitter: {card: " summary" }
3
3
- meta twitter: {site: " @coderwall" }
4
- - meta twitter: {title: sanitize(@team.name)}
5
- - meta twitter: {url: teamname_path(@team.slug)}
6
- - meta twitter: {description: @team.about}
7
4
- meta twitter: {image: @team.avatar_url}
8
5
- meta twitter: {creator: {id: @team.twitter}}
6
+ - if @job_page
7
+ - meta twitter: {title: sanitize(@job.title)}
8
+ - meta twitter: {url: job_path(@team, @job.public_id)}
9
+ - meta twitter: {description: @job.description}
10
+ - else
11
+ - meta twitter: {title: sanitize(@team.name)}
12
+ - meta twitter: {url: teamname_path(@team.slug)}
13
+ - meta twitter: {description: @team.about}
9
14
10
15
-content_for :head do
11
16
=stylesheet_link_tag 'premium-teams'
You can’t perform that action at this time.
0 commit comments