Sha256: ee528ceed54a6f289c1c7ef23b7d3178ae0116440681216780eea4ffde86eba3

Contents?: true

Size: 390 Bytes

Versions: 4

Compression:

Stored size: 390 Bytes

Contents

require 'contacts'
require 'rails'

module Contacts
  class Railtie < Rails::Railtie
    initializer "setup configuration" do
      config_file = Rails.root.join("config", "contacts.yml")
      if config_file.file?
        configuration = YAML.load(ERB.new(config_file.read).result)[Rails.env]
        Contacts.configure(configuration) if configuration.present?
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
erc-contacts-0.4.0 lib/contacts/railtie.rb
erc-contacts-0.3.0 lib/contacts/railtie.rb
kulesa-contacts-0.2.7 lib/contacts/railtie.rb
kulesa-contacts-0.2.6 lib/contacts/railtie.rb