Sha256: a89a9e3f4d2a51151c0a938b4e0daec83c2e34164b13bb7f5d3198033798d174

Contents?: true

Size: 794 Bytes

Versions: 5

Compression:

Stored size: 794 Bytes

Contents

require 'has_vcards'
require 'rails'
require 'inherited_resources'
require 'simple_form'
require 'i18n_rails_helpers'

module HasVcards
  # The Engine
  #
  # Integrates the has_vcards gem with Rails. It adds the view and class helpers.
  #
  # We use an isolated_namespace, that means all the classes, views, helpers etc
  # are only available in the HasVcards:: namespace.
  class Engine < Rails::Engine
    isolate_namespace HasVcards

    config.generators do |g|
      g.stylesheets false

      g.test_framework :rspec
      g.fixture_replacement :factory_girl
    end

    initializer :after_initialize do
      ActionController::Base.helper HasVcards::ApplicationHelper
      SwissMatch::Address.send :include, Vcard::DirectoryAddress if defined?(SwissMatch::Address)
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
has_vcards-1.1.2 lib/has_vcards/engine.rb
has_vcards-1.1.1 lib/has_vcards/engine.rb
has_vcards-1.1.0 lib/has_vcards/engine.rb
has_vcards-1.0.0 lib/has_vcards/engine.rb
has_vcards-1.0.0.rc0 lib/has_vcards/engine.rb