Sha256: 97309fcd581ae5a653c76c1756d53336a67f5bdb731f91261b9a8939b16a8c31
Contents?: true
Size: 593 Bytes
Versions: 9
Compression:
Stored size: 593 Bytes
Contents
require 'rails/generators/active_record/model/model_generator' require 'generators/active_record/orm_helpers' class ActiveRecord::JobModelGenerator < ActiveRecord::Generators::ModelGenerator include ActiveRecord::OrmHelpers source_root File.expand_path('../templates', __FILE__) # overrides original ModelGenerator#create_model_file to make a job_model instead of a model # since we are inheriting from ModelGenerator, we get the tests and all the other good stuff def create_model_file template 'job_model.rb', File.join('app/models', class_path, "#{file_name}.rb") end end
Version data entries
9 entries across 9 versions & 1 rubygems