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

Version Path
my_admin-0.1.13 lib/generators/my_admin/install/install_generator.rb
my_admin-0.1.12 lib/generators/my_admin/install/install_generator.rb
my_admin-0.1.11 lib/generators/my_admin/install/install_generator.rb
my_admin-0.1.10 lib/generators/my_admin/install/install_generator.rb
my_admin-0.1.9 lib/generators/my_admin/install/install_generator.rb
my_admin-0.1.8 lib/generators/my_admin/install/install_generator.rb
my_admin-0.1.7 lib/generators/my_admin/install/install_generator.rb
my_admin-0.1.6 lib/generators/my_admin/install/install_generator.rb
my_admin-0.1.5 lib/generators/my_admin/install/install_generator.rb
my_admin-0.1.4 lib/generators/my_admin/install/install_generator.rb
my_admin-0.1.3 lib/generators/my_admin/install/install_generator.rb
my_admin-0.1.2 lib/generators/my_admin/install/install_generator.rb
my_admin-0.1.1 lib/generators/my_admin/install/install_generator.rb