forked from OpenNeo/impress
Migrate away from item translations in misc pages
This commit is contained in:
parent
b7bc0ecd70
commit
04af1ee319
3 changed files with 4 additions and 7 deletions
|
@ -51,8 +51,8 @@ class OutfitsController < ApplicationController
|
|||
@species = Species.alphabetical
|
||||
|
||||
newest_items = Item.newest.
|
||||
select(:id, :name, :updated_at, :thumbnail_url, :rarity_index, :is_manually_nc).
|
||||
includes(:translations).limit(18)
|
||||
select(:id, :name, :updated_at, :thumbnail_url, :rarity_index, :is_manually_nc)
|
||||
.limit(18)
|
||||
@newest_modeled_items, @newest_unmodeled_items =
|
||||
newest_items.partition(&:predicted_fully_modeled?)
|
||||
|
||||
|
|
|
@ -9,10 +9,7 @@ class PetsController < ApplicationController
|
|||
# return modeling_disabled unless user_signed_in? && current_user.admin?
|
||||
|
||||
raise Pet::PetNotFound unless params[:name]
|
||||
@pet = Pet.load(
|
||||
params[:name],
|
||||
:item_scope => Item.includes(:translations),
|
||||
)
|
||||
@pet = Pet.load(params[:name])
|
||||
points = contribute(current_user, @pet)
|
||||
|
||||
respond_to do |format|
|
||||
|
|
|
@ -3,7 +3,7 @@ class SitemapController < ApplicationController
|
|||
|
||||
def index
|
||||
respond_to do |format|
|
||||
format.xml { @items = Item.includes(:translations).sitemap }
|
||||
format.xml { @items = Item.sitemap }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue