Sha256: cd99cff4278b66c6d3421223ce5fe95ba023cc8edff00aa1bf0377aadf77a886
Contents?: true
Size: 510 Bytes
Versions: 16
Compression:
Stored size: 510 Bytes
Contents
require 'generators/rom' module ROM module Generators class MapperGenerator < Base def create_mapper_file template( 'mapper.rb.erb', File.join('app', 'mappers', "#{file_name.singularize}_mapper.rb") ) end private def model_name class_name.singularize end def relation class_name.pluralize.underscore end def register_as model_name.singularize.underscore.downcase end end end end
Version data entries
16 entries across 16 versions & 1 rubygems