Class: TheAuditGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/the_audit/the_audit_generator.rb

Instance Method Summary collapse

Instance Method Details

#generate_controllersObject

> rails g the_comments NAME



6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/generators/the_audit/the_audit_generator.rb', line 6

def generate_controllers
  case gen_name
    when 'model'
      cp_model
    when 'controller'
      cp_controller
    when 'install'
      cp_model
      cp_controller
    else
      puts 'TheAudit Generator - wrong Name'
      puts 'Try to use [ install | controller | model ]'
  end
end