Skip to content

Commit 0aadf79

Browse files
committed
Faster precompile
1 parent 9c88436 commit 0aadf79

File tree

16 files changed

+78
-30
lines changed

16 files changed

+78
-30
lines changed

Gemfile.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,7 @@ DEPENDENCIES
764764
mongoid_taggable
765765
multi_json
766766
never_wastes
767+
newrelic_rpm
767768
nokogiri
768769
octokit
769770
oj

app/assets/stylesheets/screen.css.scss

Lines changed: 0 additions & 5 deletions
This file was deleted.

app/helpers/teams_helper.rb

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,4 +166,32 @@ def change_resume_path
166166
def exact_team_exists?(teams, team)
167167
teams.map { |team| Team.slugify(team.name) }.include? team.slug
168168
end
169+
170+
def team_connections_url(team)
171+
content_tag(:ul, class: 'connections cf') do
172+
content_tag(:li, team_website_link(team)) +
173+
content_tag(:li, team_github_link(team)) +
174+
content_tag(:li, team_facebook_link(team)) +
175+
content_tag(:li, team_twitter_link(team))
176+
end
177+
end
178+
179+
180+
def team_website_link(team)
181+
link_to('', url_for(team.website), :class => 'url record-exit', :target => '_blank', 'data-target-type' => 'company-website', :alt => team.name) if team.website.present?
182+
end
183+
184+
def team_github_link(team)
185+
link_to('', "https://github.com/#{team.github}", :class => 'github record-exit', :target => '_blank', 'data-target-type' => 'company-github', :alt => 'On GitHub') if team.github.present?
186+
end
187+
188+
def team_facebook_link(team)
189+
link_to('', "https://www.facebook.com/#{team.facebook}", :class => 'facebook record-exit', :target => '_blank', 'data-target-type' => 'company-facebook', :alt => 'On Facebook') if team.facebook.present?
190+
end
191+
192+
def team_twitter_link(team)
193+
link_to('', "https://twitter.com/#{team.twitter}", :class => 'twitter record-exit', :target => '_blank', 'data-target-type' => 'company-twitter', :alt => 'On Twitter') if team.twitter.present?
194+
end
195+
196+
169197
end

app/views/follows/index.html.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
network
33

44
-content_for :javascript do
5-
=javascript_include_tag 'connections.js'
5+
=javascript_include_tag 'connections'
66
-#-if is_viewing_followers?
77
-# %script="logUsage('viewed', 'followers');"
88
-#-else

app/views/teams/premium.html.haml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,7 @@
7777
%h1=@team.name
7878
=follow_team_link(@team)
7979

80-
%ul.connections.cf
81-
-unless @team.website.blank?
82-
%li=link_to('', @team.website, :class => 'url record-exit', :target => :new, 'data-target-type' => 'company-website', :alt => @team.website.to_s.gsub('http://', ''))
83-
-unless @team.twitter.blank?
84-
%li=link_to('', "https://twitter.com/#{@team.twitter}", :class => 'twitter record-exit', :target => :new, 'data-target-type' => 'company-twitter', :alt => 'On Twitter')
85-
-unless @team.facebook.blank?
86-
%li=link_to('', "https://www.facebook.com/#{@team.facebook}", :class => 'facebook record-exit', :target => :new, 'data-target-type' => 'company-facebook', :alt => 'On Facebook')
87-
-unless @team.github.blank?
88-
%li=link_to('', "https://github.com/#{@team.github}", :class => 'github record-exit', :target => :new, 'data-target-type' => 'company-github', :alt => 'On GitHub')
80+
= team_connections_urls(@team)
8981

9082
-if @team.has_open_positions?
9183
.join-us-banner

0 commit comments

Comments
 (0)