Class: FriendlyIdGenerator
- Inherits:
- 
      Rails::Generators::Base
      
        - Object
- Rails::Generators::Base
- FriendlyIdGenerator
 
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/friendly_id_generator.rb
Class Method Summary (collapse)
- 
  
    
      + (Object) next_migration_number(dirname) 
    
    
  
  
  
  
  
  
  
  
  
    Taken from ActiveRecord's migration generator. 
Instance Method Summary (collapse)
Class Method Details
+ (Object) next_migration_number(dirname)
Taken from ActiveRecord's migration generator
| 17 18 19 20 21 22 23 | # File 'lib/generators/friendly_id_generator.rb', line 17 def self.next_migration_number(dirname) #:nodoc: if ActiveRecord::Base. Time.now.utc.strftime("%Y%m%d%H%M%S") else "%.3d" % (current_migration_number(dirname) + 1) end end | 
Instance Method Details
- (Object) copy_files(*args)
| 12 13 14 | # File 'lib/generators/friendly_id_generator.rb', line 12 def copy_files(*args) migration_template 'create_slugs.rb', "db/migrate/create_slugs.rb" unless ["skip-migration"] end |