Sha256: 2bbf035ab08e815ba9ca1e0cf2d14eb3bf1f731fa72843c37464a855b6ed7fc7

Contents?: true

Size: 876 Bytes

Versions: 4

Compression:

Stored size: 876 Bytes

Contents

module DeviseInvitable
  class Engine < ::Rails::Engine

    ActiveSupport.on_load(:action_controller) do
      include DeviseInvitable::Controllers::UrlHelpers
      include DeviseInvitable::Controllers::Helpers
    end
    ActiveSupport.on_load(:action_view)       { include DeviseInvitable::Controllers::UrlHelpers }

    # We use to_prepare instead of after_initialize here because Devise is a Rails engine; its
    # mailer is reloaded like the rest of the user's app.  Got to make sure that our mailer methods
    # are included each time Devise::Mailer is (re)loaded.
    config.to_prepare do
      require 'devise/mailer'
      Devise::Mailer.send :include, DeviseInvitable::Mailer
    end
    # extend mapping with after_initialize becuase is not reloaded
    config.after_initialize do
      Devise::Mapping.send :include, DeviseInvitable::Mapping
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
devise_invitable-1.1.8 lib/devise_invitable/rails.rb
devise_invitable-1.1.7 lib/devise_invitable/rails.rb
devise_invitable-1.1.6 lib/devise_invitable/rails.rb
devise_invitable-1.1.5 lib/devise_invitable/rails.rb