Class: NoFlyList::Generators::ModelsGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- NoFlyList::Generators::ModelsGenerator
- Defined in:
- lib/generators/no_fly_list/models_generator.rb
Instance Method Summary collapse
Instance Method Details
#create_model_files ⇒ Object
13 14 15 16 17 18 |
# File 'lib/generators/no_fly_list/models_generator.rb', line 13 def create_model_files return unless validate_model # Ensure it's an ActiveRecord model template 'tagging_model.rb.erb', File.join('app/models', class_path, "#{file_name.underscore}/tagging.rb") template 'tag_model.rb.erb', File.join('app/models', class_path, "#{file_name.underscore}_tag.rb") end |