Class: TagAuth::Generators::TagAuthenticableGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- TagAuth::Generators::TagAuthenticableGenerator
- Defined in:
- lib/generators/tag_auth/tag_authenticable_generator.rb
Instance Method Summary collapse
Instance Method Details
#create_controller ⇒ Object
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 |