Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Nat Budin
committed
Sep 25, 2012
1 parent
35d3833
commit ad82147
Showing
1 changed file
with
13 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,15 @@ | ||
Devise::Schema.class_eval do | ||
def openid_authenticatable | ||
if respond_to?(:apply_devise_schema) | ||
apply_devise_schema :identity_url, String | ||
else | ||
apply_schema :identity_url, String | ||
require 'devise/version' | ||
|
||
# Devise 2.1 removes schema stuff | ||
if Devise::VERSION < "2.1" | ||
require 'devise/schema' | ||
Devise::Schema.class_eval do | ||
def openid_authenticatable | ||
if respond_to?(:apply_devise_schema) | ||
apply_devise_schema :identity_url, String | ||
else | ||
apply_schema :identity_url, String | ||
end | ||
end | ||
end | ||
end | ||
end |