Sha256: ece14a87cd98640830a30c308b6c4ac2736d78b0f6a4e41d980d48eaae1d9693

Contents?: true

Size: 960 Bytes

Versions: 11

Compression:

Stored size: 960 Bytes

Contents

# Copyright (c) 2008-2013 Michael Dvorkin and contributors.
#
# Fat Free CRM is freely distributable under the terms of MIT license.
# See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php
#------------------------------------------------------------------------------
# Override engine views so that plugin views have higher priority.
Rails::Engine.initializers.detect{|i| i.name == :add_view_paths }.
  instance_variable_set("@block", Proc.new {
    views = paths["app/views"].to_a
    unless views.empty?
      ActiveSupport.on_load(:action_controller){ append_view_path(views) }
      ActiveSupport.on_load(:action_mailer){ append_view_path(views) }
    end
  }
)

# Override I18n load paths so that plugin locales have higher priority.
Rails::Engine.initializers.detect{|i| i.name == :add_locales }.
  instance_variable_set("@block", Proc.new {
    config.i18n.railties_load_path.concat( paths["config/locales"].to_a ).reverse!
  }
)

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
fat_free_crm-0.13.6 lib/fat_free_crm/gem_ext/rails/engine.rb
fat_free_crm-0.13.5 lib/fat_free_crm/gem_ext/rails/engine.rb
fat_free_crm-0.13.4 lib/fat_free_crm/gem_ext/rails/engine.rb
fat_free_crm-0.13.3 lib/fat_free_crm/gem_ext/rails/engine.rb
fat_free_crm-0.13.2 lib/fat_free_crm/gem_ext/rails/engine.rb
fat_free_crm-0.12.3 lib/fat_free_crm/gem_ext/rails/engine.rb
fat_free_crm-0.12.2 lib/fat_free_crm/gem_ext/rails/engine.rb
fat_free_crm-0.13.1 lib/fat_free_crm/gem_ext/rails/engine.rb
fat_free_crm-0.12.1 lib/fat_free_crm/gem_ext/rails/engine.rb
fat_free_crm-0.13.0 lib/fat_free_crm/gem_ext/rails/engine.rb
fat_free_crm-0.12.0 lib/fat_free_crm/gem_ext/rails/engine.rb