Class: RailsBaseApiScaffold::Generators::SerializerGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Includes:
Rails::Generators::ResourceHelpers, GeneratorHelpers
Defined in:
lib/generators/rails_base_api_scaffold/serializer_generator.rb

Overview

Custom scaffolding generator

Instance Attribute Summary

Attributes included from GeneratorHelpers

#attributes, #options

Instance Method Summary collapse

Instance Method Details

#copy_templatesObject



14
15
16
# File 'lib/generators/rails_base_api_scaffold/serializer_generator.rb', line 14

def copy_templates
  template "serializer.rb", File.join("app/serializers", "#{file_name}_serializer.rb")
end