Class: Rails::NaranyaId::Railtie

Inherits:
Railtie
  • Object
show all
Defined in:
lib/naranya_id/railtie.rb

Overview

Hooks NaranyaId into Rails 3 and higher.

Since:

  • 2.0.0

Instance Method Summary collapse

Instance Method Details

#handle_configuration_error(e) ⇒ Object

Rails runs all initializers first before getting into any generator code, so we have no way in the intitializer to know if we are generating a mongoid.yml. So instead of failing, we catch all the errors and print them out.

Since:

  • 3.0.0



128
129
130
131
# File 'lib/naranya_id/railtie.rb', line 128

def handle_configuration_error(e)
  puts "There is a configuration error with the current naranya_id.yml."
  puts e.message
end