Sha256: 5a07e3b6832540860858fab1b3daed71f95dba9d0d85d41f0077bbb1032bd568
Contents?: true
Size: 665 Bytes
Versions: 6
Compression:
Stored size: 665 Bytes
Contents
module RailsAdminSettings class Engine < ::Rails::Engine initializer 'RailsAdminSettings Install after_filter' do |app| require File.dirname(__FILE__) + '/../../app/models/rails_admin_settings/setting.rb' if defined?(ActionController) and defined?(ActionController::Base) ActionController::Base.class_eval do after_filter { Settings.unload! } end end RailsAdminSettings::Setting.where(:ns.exists => false).update_all(ns: 'main') Settings.apply_defaults!(Rails.root.join("config/settings.#{Rails.env.to_s}.yml")) Settings.apply_defaults!(Rails.root.join('config/settings.yml')) end end end
Version data entries
6 entries across 6 versions & 1 rubygems