aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource/lib/active_resource/railtie.rb
blob: 27c88415f675acb5f07f01753cd3c1de19f85aa4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
require "active_resource"
require "rails"

module ActiveResource
  class Railtie < Rails::Railtie
    railtie_name :active_resource

    require "active_resource/railties/log_subscriber"
    log_subscriber ActiveResource::Railties::LogSubscriber.new

    initializer "active_resource.set_configs" do |app|
      app.config.active_resource.each do |k,v|
        ActiveResource::Base.send "#{k}=", v
      end
    end
  end
end