diff --git a/app/controllers/outfits_controller.rb b/app/controllers/outfits_controller.rb index 1a42cc5c..3b11f44f 100644 --- a/app/controllers/outfits_controller.rb +++ b/app/controllers/outfits_controller.rb @@ -69,10 +69,8 @@ class OutfitsController < ApplicationController @species_count = Species.count - unless localized_fragment_exist?('outfits#new latest_contribution') - @latest_contribution = Contribution.recent.first - Contribution.preload_contributeds_and_parents([@latest_contribution].compact) - end + @latest_contribution = Contribution.recent.first + Contribution.preload_contributeds_and_parents([@latest_contribution].compact) @neopets_usernames = user_signed_in? ? current_user.neopets_usernames : [] diff --git a/app/models/contribution_observer.rb b/app/models/contribution_observer.rb index 2c232cdc..88d7fa06 100644 --- a/app/models/contribution_observer.rb +++ b/app/models/contribution_observer.rb @@ -2,8 +2,6 @@ class ContributionObserver < ActiveRecord::Observer include FragmentExpiration def after_create(contribution) - expire_fragment_in_all_locales('outfits#new latest_contribution') - if contribution.contributed_type == 'SwfAsset' item = contribution.contributed.item expire_fragment_in_all_locales("items/#{item.id} contributors") diff --git a/app/views/outfits/new.html.haml b/app/views/outfits/new.html.haml index d086efb6..4cc0acc8 100644 --- a/app/views/outfits/new.html.haml +++ b/app/views/outfits/new.html.haml @@ -92,12 +92,11 @@ required: true = submit_tag t('.modeling_hub.load_pet.submit') -- localized_cache 'outfits#new latest_contribution' do - - if @latest_contribution # will be nil for a fresh copy of the site ;P - #latest-contribution - = link_to t('.latest_contribution.header'), contributions_path, :id => 'recent-contributions-link' - = latest_contribution_description(@latest_contribution) - %abbr#latest-contribution-created-at{:title => @latest_contribution.created_at.getutc.iso8601} +- if @latest_contribution # will be nil for a fresh copy of the site ;P + #latest-contribution + = link_to t('.latest_contribution.header'), contributions_path, :id => 'recent-contributions-link' + = latest_contribution_description(@latest_contribution) + %abbr#latest-contribution-created-at{:title => @latest_contribution.created_at.getutc.iso8601} #whats-new - if @newest_unmodeled_items.present?