Sha256: cae0dd46cf9fd3a2d0856e1b72f3be137921e1d50452daaf636bbacfd000b7a6

Contents?: true

Size: 669 Bytes

Versions: 7

Compression:

Stored size: 669 Bytes

Contents

#class AvatarsForRails::InstallGenerator < Rails::Generators::Base #:nodoc:
class AvatarsForRails::InstallGenerator < Rails::Generators::NamedBase #:nodoc:
  include Rails::Generators::Migration
  
  source_root File.expand_path('../templates', __FILE__)
  
  require 'rails/generators/active_record'
  
  def create_initializer_file
    template 'initializer.rb', 'config/initializers/avatars_for_rails.rb'
  end
  
  def self.next_migration_number(dirname)
    ActiveRecord::Generators::Base.next_migration_number(dirname)
  end
  
  def create_migration_file
    migration_template 'migration.rb', 'db/migrate/create_avatars_for_rails_' + file_name + '.rb'
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
avatars_for_rails-0.1.6 lib/generators/avatars_for_rails/install_generator.rb
avatars_for_rails-0.1.5 lib/generators/avatars_for_rails/install_generator.rb
avatars_for_rails-0.1.4 lib/generators/avatars_for_rails/install_generator.rb
avatars_for_rails-0.1.3 lib/generators/avatars_for_rails/install_generator.rb
avatars_for_rails-0.1.2 lib/generators/avatars_for_rails/install_generator.rb
avatars_for_rails-0.1.1 lib/generators/avatars_for_rails/install_generator.rb
avatars_for_rails-0.1.0 lib/generators/avatars_for_rails/install_generator.rb