Class: TagAuth::Generators::TagAuthenticableGenerator

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

Instance Method Summary collapse

Instance Method Details

#create_controllerObject



14
15
16
17
18
19
20
21
# File 'lib/generators/tag_auth/tag_authenticable_generator.rb', line 14

def create_controller
  @model = scope.camelize.singularize
  @instance = scope.downcase.singularize
  @scope = scope.blank? ? 'Users' : scope.camelize

  template 'tag_authenticable.rb.erb',
           'config/initializers/tag_authenticable.rb'
end