Sha256: 8a0387cedc871af85278488a026b016b10d7efbae8c9aeb2fa5147c323bb058e
Contents?: true
Size: 681 Bytes
Versions: 13
Compression:
Stored size: 681 Bytes
Contents
module MyAdmin module Generators class InstallGenerator < Rails::Generators::Base include Rails::Generators::Migration source_root File.expand_path('../templates', __FILE__) def self.next_migration_number(dirname) #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 generate_install directory = File.expand_path('../templates', __FILE__) template "config/initializers/my_admin.rb", "config/initializers/my_admin.rb" end end end end
Version data entries
13 entries across 13 versions & 1 rubygems