From 59a9f389839ea8bb129204a5afc09e246eb9093a Mon Sep 17 00:00:00 2001 From: "Carlos A. da Silva" Date: Tue, 20 Oct 2009 01:42:07 -0200 Subject: [PATCH] Fix requiring warden --- app/models/notifier.rb | 6 +++--- lib/devise.rb | 14 ++++++-------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/app/models/notifier.rb b/app/models/notifier.rb index 0e5bfbd6..5bf28e2a 100644 --- a/app/models/notifier.rb +++ b/app/models/notifier.rb @@ -32,9 +32,9 @@ class Notifier < ::ActionMailer::Base # devise: # notifier: # confirmation_instructions: '...' - # user: - # notifier: - # confirmation_instructions: '...' + # user: + # notifier: + # confirmation_instructions: '...' def translate(record, key) I18n.t(:"#{record.class.name.downcase}.#{key}", :scope => [:devise, :notifier], diff --git a/lib/devise.rb b/lib/devise.rb index 34afc441..2d6ab621 100644 --- a/lib/devise.rb +++ b/lib/devise.rb @@ -1,11 +1,9 @@ -#begin -# require 'warden' -#rescue -# gem 'hassox-warden' -# require 'warden' -#end - -require File.join(File.dirname(__FILE__), '..', 'warden', 'lib', 'warden') +begin + require 'warden' +rescue + gem 'hassox-warden' + require 'warden' +end module Devise ALL = [:authenticable, :confirmable, :recoverable, :rememberable, :validatable].freeze