Sha256: 28c1c8009687900c02e8b94faa94f5e6ec27ecc069a5f66718a2533733de3c04
Contents?: true
Size: 685 Bytes
Versions: 8
Compression:
Stored size: 685 Bytes
Contents
module Pseudocephalopod module Generators class SlugsGenerator < Rails::Generators::Base include Rails::Generators::Migration def self.source_root @_ps_source_root ||= File.expand_path("templates", File.dirname(__FILE__)) end def self.next_migration_number(dirname) #:nodoc: if ActiveRecord::Base.timestamped_migrations Time.now.utc.strftime("%Y%m%d%H%M%S") else "%.3d" % (current_migration_number(dirname) + 1) end end def create_migration_file migration_template "migration.erb", "db/migrate/create_pseudocephalopod_slugs.rb" end end end end
Version data entries
8 entries across 8 versions & 1 rubygems