Sha256: 5d2d3974eb16f23649229698de649e586cb66b68766f2b4b247f19ac15286dd5
Contents?: true
Size: 549 Bytes
Versions: 18
Compression:
Stored size: 549 Bytes
Contents
require 'generators/sequel' module Sequel module Generators class ModelGenerator < Base argument :attributes, :type => :array, :default => [], :banner => "field:type field:type" check_class_collision class_option :timestamps, :type => :boolean class_option :parent, :type => :string, :desc => "The parent class for the generated model" def create_model_file template 'model.rb', File.join('app/models', class_path, "#{file_name}.rb") end hook_for :test_framework end end end
Version data entries
18 entries across 18 versions & 4 rubygems