Sha256: 3fbbbad40f546a609190b541d1ca35363c95fe4ae891bf2feaf26a400070ab80

Contents?: true

Size: 453 Bytes

Versions: 22

Compression:

Stored size: 453 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 do
      ApiResource::Associations.activate_active_record if defined?(ActiveRecord)
    end
    
  end
  
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
api_resource-0.3.11 lib/api_resource/railtie.rb
api_resource-0.3.10 lib/api_resource/railtie.rb
api_resource-0.3.8 lib/api_resource/railtie.rb
api_resource-0.3.7 lib/api_resource/railtie.rb
api_resource-0.3.6 lib/api_resource/railtie.rb
api_resource-0.3.5 lib/api_resource/railtie.rb
api_resource-0.3.4 lib/api_resource/railtie.rb
api_resource-0.3.3 lib/api_resource/railtie.rb
api_resource-0.3.2 lib/api_resource/railtie.rb
api_resource-0.3.1 lib/api_resource/railtie.rb
api_resource-0.3.0 lib/api_resource/railtie.rb
api_resource-0.2.11 lib/api_resource/railtie.rb
api_resource-0.2.10 lib/api_resource/railtie.rb
api_resource-0.2.9 lib/api_resource/railtie.rb
api_resource-0.2.8 lib/api_resource/railtie.rb
api_resource-0.2.7 lib/api_resource/railtie.rb
api_resource-0.2.6 lib/api_resource/railtie.rb
api_resource-0.2.5 lib/api_resource/railtie.rb
api_resource-0.2.4 lib/api_resource/railtie.rb
api_resource-0.2.3 lib/api_resource/railtie.rb