Sha256: f583640574e53448b3b62a59f63d95fe441f4d0d787fcb158332639f54235448

Contents?: true

Size: 628 Bytes

Versions: 4

Compression:

Stored size: 628 Bytes

Contents

require "pageflow/engine"
require "pageflow/global_config_api"

module Pageflow
  extend GlobalConfigApi

  def self.routes(router)
    router.instance_eval do
      namespace :admin do
        resources :users do
          resources :memberships
        end

        resources :entries do
          resources :memberships
        end
      end

      mount Pageflow::Engine, at: '/'
    end
  end

  def self.active_admin_settings(config)
    config.before_filter do
      I18n.locale = current_user.try(:locale) || http_accept_language.compatible_language_from(I18n.available_locales) || I18n.default_locale
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
pageflow-0.10.0 lib/pageflow.rb
pageflow-0.9.2 lib/pageflow.rb
pageflow-0.9.1 lib/pageflow.rb
pageflow-0.9.0 lib/pageflow.rb