on a fresh copy of the site, hide the latest contribution section
This commit is contained in:
parent
0d6caceb24
commit
b639453f61
2 changed files with 6 additions and 5 deletions
|
@ -73,7 +73,7 @@ class OutfitsController < ApplicationController
|
||||||
|
|
||||||
unless localized_fragment_exist?('outfits#new latest_contribution')
|
unless localized_fragment_exist?('outfits#new latest_contribution')
|
||||||
@latest_contribution = Contribution.recent.first
|
@latest_contribution = Contribution.recent.first
|
||||||
Contribution.preload_contributeds_and_parents([@latest_contribution])
|
Contribution.preload_contributeds_and_parents([@latest_contribution].compact)
|
||||||
end
|
end
|
||||||
|
|
||||||
@neopets_usernames = user_signed_in? ? current_user.neopets_usernames : []
|
@neopets_usernames = user_signed_in? ? current_user.neopets_usernames : []
|
||||||
|
|
|
@ -93,6 +93,7 @@
|
||||||
= submit_tag t('.modeling_hub.load_pet.submit')
|
= submit_tag t('.modeling_hub.load_pet.submit')
|
||||||
|
|
||||||
- localized_cache 'outfits#new latest_contribution' do
|
- localized_cache 'outfits#new latest_contribution' do
|
||||||
|
- if @latest_contribution # will be nil for a fresh copy of the site ;P
|
||||||
#latest-contribution
|
#latest-contribution
|
||||||
= link_to t('.latest_contribution.header'), contributions_path, :id => 'recent-contributions-link'
|
= link_to t('.latest_contribution.header'), contributions_path, :id => 'recent-contributions-link'
|
||||||
= latest_contribution_description(@latest_contribution)
|
= latest_contribution_description(@latest_contribution)
|
||||||
|
|
Loading…
Reference in a new issue