2009-10-07 20:46:40 -04:00
|
|
|
module Devise
|
|
|
|
module Controllers
|
|
|
|
module Authenticable
|
|
|
|
|
2009-10-10 07:37:22 -04:00
|
|
|
# def self.included(base)
|
|
|
|
# base.class_eval do
|
2009-10-09 20:11:58 -04:00
|
|
|
# helper_method :session_path, :session_url,
|
|
|
|
# :new_session_path, :new_session_url,
|
|
|
|
# :password_path, :password_url,
|
|
|
|
# :new_password_path, :new_password_url,
|
|
|
|
# :confirmation_path, :confirmation_url,
|
|
|
|
# :new_confirmation_path, :new_confirmation_url
|
2009-10-10 07:37:22 -04:00
|
|
|
# end
|
|
|
|
# end
|
2009-10-09 20:11:58 -04:00
|
|
|
|
|
|
|
protected
|
|
|
|
|
|
|
|
# Helper for use in before_filters where no authentication is required:
|
|
|
|
# Example:
|
|
|
|
# before_filter :require_no_authentication, :only => :new
|
|
|
|
#
|
|
|
|
def require_no_authentication
|
|
|
|
redirect_to root_path if authenticated?
|
|
|
|
end
|
2009-10-07 20:46:40 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|