mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
Aim for Rails 3.0.0.beta1 compatibility. A few issues are still pending with Warden.
This commit is contained in:
parent
1a740774e3
commit
829c85631b
5 changed files with 19 additions and 4 deletions
3
Gemfile
3
Gemfile
|
@ -1,6 +1,7 @@
|
|||
source "http://gemcutter.org"
|
||||
|
||||
gem "rails", "3.0.0.beta"
|
||||
# Need to install Rails from source
|
||||
gem "rails", "3.0.0.beta1"
|
||||
gem "warden", "0.9.4"
|
||||
gem "sqlite3-ruby", :require => "sqlite3"
|
||||
gem "webrat", "0.7"
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
require 'active_support/core_ext/numeric/time'
|
||||
|
||||
module Devise
|
||||
autoload :FailureApp, 'devise/failure_app'
|
||||
autoload :Schema, 'devise/schema'
|
||||
|
|
|
@ -56,7 +56,7 @@ module Devise
|
|||
# yet, but we still need to store the uri based on scope, so different scopes
|
||||
# would never use the same uri to redirect.
|
||||
def store_location!(scope)
|
||||
session[:"#{scope}.return_to"] = request.request_uri if request && request.get?
|
||||
session[:"#{scope}.return_to"] = request.fullpath if request && request.get?
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -5,8 +5,16 @@ module Devise
|
|||
class Engine < ::Rails::Engine
|
||||
engine_name :devise
|
||||
|
||||
config.middleware.use Warden::Manager do |config|
|
||||
Devise.configure_warden(config)
|
||||
initializer "devise.add_middleware" do |app|
|
||||
app.config.middleware.use Warden::Manager do |config|
|
||||
Devise.configure_warden(config)
|
||||
end
|
||||
end
|
||||
|
||||
initializer "devise.add_url_helpers" do |app|
|
||||
if app.routes.respond_to?(:url_helpers)
|
||||
Devise::FailureApp.send :include, app.routes.url_helpers
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -23,6 +23,10 @@ class MockController < ApplicationController
|
|||
"http"
|
||||
end
|
||||
|
||||
def script_name
|
||||
""
|
||||
end
|
||||
|
||||
def symbolized_path_parameters
|
||||
{}
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue