Skip to content

Commit

Permalink
Don't hard-depend on devise/schema
Browse files Browse the repository at this point in the history
  • Loading branch information
Nat Budin committed Sep 25, 2012
1 parent 35d3833 commit ad82147
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions lib/devise_openid_authenticatable/schema.rb
@@ -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

0 comments on commit ad82147

Please sign in to comment.