Sha256: 45500cf948ac185ed8212dce9d3f735cc0d34717327ad36555e054b7d0b528d9

Contents?: true

Size: 524 Bytes

Versions: 34

Compression:

Stored size: 524 Bytes

Contents

require 'api_resource'
require 'rails'

module ApiResource
  
  class Railtie < ::Rails::Railtie
    
    config.api_resource = ActiveSupport::OrderedOptions.new
    
    initializer "api_resource.set_configs" do |app|
      app.config.api_resource.each do |k,v|
        ApiResource::Base.send "#{k}=", v
      end
    end
    
    initializer "api_resource.activate_associations" do
      ActiveSupport.on_load(:active_record) do
        ApiResource::Associations.activate_active_record 
      end
    end
    
  end
  
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
api_resource-0.6.25 lib/api_resource/railtie.rb
api_resource-0.6.24 lib/api_resource/railtie.rb
api_resource-0.6.23 lib/api_resource/railtie.rb
api_resource-0.6.22 lib/api_resource/railtie.rb
api_resource-0.6.21 lib/api_resource/railtie.rb
api_resource-0.6.20 lib/api_resource/railtie.rb
api_resource-0.6.19 lib/api_resource/railtie.rb
api_resource-0.6.18 lib/api_resource/railtie.rb
api_resource-0.6.17 lib/api_resource/railtie.rb
api_resource-0.6.16 lib/api_resource/railtie.rb
api_resource-0.6.15 lib/api_resource/railtie.rb
api_resource-0.6.14 lib/api_resource/railtie.rb
api_resource-0.6.13 lib/api_resource/railtie.rb
api_resource-0.6.12 lib/api_resource/railtie.rb
api_resource-0.6.11 lib/api_resource/railtie.rb
api_resource-0.6.9 lib/api_resource/railtie.rb
api_resource-0.6.10 lib/api_resource/railtie.rb
api_resource-0.6.8 lib/api_resource/railtie.rb
api_resource-0.6.7 lib/api_resource/railtie.rb
api_resource-0.6.6 lib/api_resource/railtie.rb