Sha256: 04ed5df5efb7a6d541f5dcbc5c12d3aead9f8ddab5ab0f22c4ed0d1ab3d1b448
Contents?: true
Size: 542 Bytes
Versions: 6
Compression:
Stored size: 542 Bytes
Contents
require_relative '../base' module AwsRecord module Generators class ModelGenerator < Base def initialize(args, *options) self.class.source_root File.expand_path('../templates', __FILE__) super end def create_model template "model.erb", File.join("app/models", class_path, "#{file_name}.rb") end def create_table_config template "table_config.erb", File.join("db/table_config", class_path, "#{file_name}_config.rb") if options["table_config"] end end end end
Version data entries
6 entries across 6 versions & 1 rubygems