Class: SerializerGenerator

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

Instance Method Summary collapse

Instance Method Details

#create_serializer_fileObject



10
11
12
# File 'lib/generators/serializer/serializer_generator.rb', line 10

def create_serializer_file
  template 'serializer.rb.tt', File.join('app', 'serializers', class_path, "#{file_name}_serializer.rb")
end