Class: Mongoid::Generators::OauthProviderGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/mongoid/oauth_provider_generator.rb

Instance Method Summary collapse

Instance Method Details

#check_class_collisionsObject



6
7
8
# File 'lib/generators/mongoid/oauth_provider_generator.rb', line 6

def check_class_collisions
  class_collisions '', %w(ClientApplication OauthNonce RequestToken AccessToken OauthToken)
end

#copy_modelsObject



10
11
12
13
14
15
16
17
18
# File 'lib/generators/mongoid/oauth_provider_generator.rb', line 10

def copy_models
  template 'client_application.rb', File.join('app/models', 'client_application.rb')
  template 'oauth_token.rb',        File.join('app/models', 'oauth_token.rb')
  template 'request_token.rb',      File.join('app/models', 'request_token.rb')
  template 'access_token.rb',       File.join('app/models', 'access_token.rb')
  template 'oauth2_token.rb',       File.join('app/models', 'oauth2_token.rb')
  template 'oauth2_verifier.rb',    File.join('app/models', 'oauth2_verifier.rb')
  template 'oauth_nonce.rb',        File.join('app/models', 'oauth_nonce.rb')
end