Skip to content
This repository has been archived by the owner on Jul 6, 2020. It is now read-only.

Commit

Permalink
Remove useless stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
aflatter committed Jul 6, 2010
1 parent 88db32b commit 8ff1c5f
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions oauth2-rails/lib/oauth2/rails/adapters/active_record.rb
Expand Up @@ -12,28 +12,4 @@ module ActiveRecord < Base

end

end

@adapter = Class.new(OAuth2::Rails::Adapter) do
%w{client user}.each do |model|
adapter = OAuth2::Rails.models[model][:adapter].to_s.camelize
klass = OAuth2::Rails.models[model][:klass].to_s.camelize.constantize
include "OAuth2::Rails::Adapters::#{adapter}::#{model}".camelize.constantize

self.send "#{model}_klass=".to_sym, klass
end
end

OAuth2::Rails.setup do |config|

# Override the default adapter. By default, it is set to your current ORM.
config.adapter = :active_record

# Override
config.models[:client] = :client

# Namespaced model and adapter names
config.models[:client] = :'my/client'
config.adapter = :'my/active_record'

end

0 comments on commit 8ff1c5f

Please sign in to comment.