Class: WheelsModelGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Includes:
Rails::Generators::Migration
Defined in:
lib/generators/wheels_model/wheels_model_generator.rb

Instance Method Summary collapse

Instance Method Details

#install_fileObject



6
7
8
9
10
11
12
# File 'lib/generators/wheels_model/wheels_model_generator.rb', line 6

def install_file
  if class_name == "All"
    directory "app/models", "app/models"
  else
    file "app/models/#{class_name.underscore}.rb", "app/models/#{class_name.underscore}.rb"
  end
end