Sha256: d5fd46794d193ab3ef4406453cf1992add1697825d2bef5e2062fe3c4c40f805
Contents?: true
Size: 537 Bytes
Versions: 3
Compression:
Stored size: 537 Bytes
Contents
require 'rails/generators/migration' require 'rails/generators/active_record' class MakeVoteableGenerator < Rails::Generators::Base include Rails::Generators::Migration desc "Generates a migration for the Vote model" def self.source_root @source_root ||= File.dirname(__FILE__) + '/templates' end def self.next_migration_number(path) ActiveRecord::Generators::Base.next_migration_number(path) end def generate_migration migration_template 'migration.rb', 'db/migrate/create_make_voteable_tables' end end
Version data entries
3 entries across 3 versions & 1 rubygems