Class: SeoFriendly::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- SeoFriendly::Generators::InstallGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/seo_friendly/install/install_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#copy_default_seo_source ⇒ Object
TODO : rename method.
- #copy_migrations ⇒ Object
Class Method Details
.next_migration_number(dir) ⇒ Object
17 18 19 |
# File 'lib/generators/seo_friendly/install/install_generator.rb', line 17 def self.next_migration_number(dir) Time.now.utc.strftime('%Y%m%d%H%M%S') end |
Instance Method Details
#copy_default_seo_source ⇒ Object
TODO : rename method
9 10 11 |
# File 'lib/generators/seo_friendly/install/install_generator.rb', line 9 def copy_default_seo_source template 'default_seo_source.rb', 'app/seo_sources/default_seo_source.rb' end |
#copy_migrations ⇒ Object
13 14 15 |
# File 'lib/generators/seo_friendly/install/install_generator.rb', line 13 def copy_migrations migration_template 'migrations/create_seo_params.rb', 'db/migrate/create_seo_params.rb' end |