Class: Lesli::Generators::ModelGenerator

Inherits:
BaseGenerator
  • Object
show all
Defined in:
lib/generators/lesli/model/model_generator.rb

Overview

Generates a Lesli-style model inside the current engine.

Example:

rails generate lesli:model tickets

Result:

app/models/lesli_support/ticket.rb

Instance Method Summary collapse

Instance Method Details

#create_model_fileObject

Creates the model file from the template.



21
22
23
# File 'lib/generators/lesli/model/model_generator.rb', line 21

def create_model_file
    template "model.rb.tt", model_file_path
end