Sha256: f0d8f624248ce5477fbf6828dbbbf7176f05e6e264e500809977fdf123162e43
Contents?: true
Size: 466 Bytes
Versions: 12
Compression:
Stored size: 466 Bytes
Contents
class LockerGenerator < Rails::Generators::NamedBase include Rails::Generators::Migration source_root File.expand_path('../templates', __FILE__) argument :name, :type => :string, :default => "Lock" def self.next_migration_number(path) Time.now.utc.strftime("%Y%m%d%H%M%S") end def create_locker_files migration_template "migration.rb", "db/migrate/create_#{plural_name}.rb" template "model.rb", "app/models/#{singular_name}.rb" end end
Version data entries
12 entries across 12 versions & 1 rubygems