Sha256: 3a95e59e35292ecd66797e600b88c7dfc45370873923aa179cce9a0485bf3332
Contents?: true
Size: 526 Bytes
Versions: 4
Compression:
Stored size: 526 Bytes
Contents
module Locomotive module Public class SitemapsController < Public::BaseController before_filter :set_locale respond_to :xml def show @pages = current_site.pages.published.order_by(:depth.asc, :position.asc) respond_with @pages end protected def set_locale ::Mongoid::Fields::I18n.locale = request.env['locomotive.locale'] || params[:locale] || current_site.default_locale ::I18n.locale = ::Mongoid::Fields::I18n.locale end end end end
Version data entries
4 entries across 4 versions & 1 rubygems