Sha256: 0298bebb778c97ab76af79ea4b7f02ea9b8abf4cbf9ee3ee654d155aa72ab133
Contents?: true
Size: 554 Bytes
Versions: 6
Compression:
Stored size: 554 Bytes
Contents
module Headmin class BlocksGenerator < Rails::Generators::Base include Rails::Generators::Migration source_root File.expand_path('../../templates', __FILE__) def blocks template 'models/block.rb', 'app/models/block.rb' migration_template 'migrations/create_blocks.rb', 'db/migrate/create_blocks.rb' end private def self.next_migration_number(dirname) next_migration_number = current_migration_number(dirname) + 1 ActiveRecord::Migration.next_migration_number(next_migration_number) end end end
Version data entries
6 entries across 6 versions & 1 rubygems