class WorldLocationNewsController < ApplicationController
  around_action :switch_locale
  enable_request_formats show: :atom

  def show
    path = world_location_news_path(params[:name])
    @world_location_news = WorldLocationNews.find!(path)

    respond_to do |format|
      format.html do
        setup_content_item_and_navigation_helpers(@world_location_news)
      end

      format.atom do
        results = FeedContent.new(filter_world_locations: params[:name]).results(10)
        items = results.map { |result| FeedEntryPresenter.new(result) }

        render "feeds/feed", locals: { items: items, root_url: Plek.new.website_root + path, title: "#{@world_location_news.title} - Activity on GOV.UK" }
      end
    end
  end
end

class WorldLocationNewsController < ApplicationController
  around_action :switch_locale
  enable_request_formats show: :atom

  def show
    path = request.path.gsub(".atom", "")
    @world_location_news = WorldLocationNews.find!(path)

    respond_to do |format|
      format.html do
        setup_content_item_and_navigation_helpers(@world_location_news)
      end

      format.atom do
        results = FeedContent.new(filter_world_locations: params[:name]).results(10)
        items = results.map { |result| FeedEntryPresenter.new(result) }

        render "feeds/feed", locals: { items: items, root_url: Plek.new.website_root + path, title: "#{@world_location_news.title} - Activity on GOV.UK" }
      end
    end
  end
end

Use request path for World Location News
Use request path for World Location News

We are currently using a path that doesn't contain the locale when
requesting World Location News from the content store.

This means we can't currently show anything other than English content.

Changing to `request.path` means we will include the locale when
retrieving the content.

This is consistent with the usage on organisation pages.
