Class: HasFriends::Generators::Install
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- HasFriends::Generators::Install
- Includes:
- Rails::Generators::Migration, Thor::Actions
- Defined in:
- lib/has_friends/generators/install.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.next_migration_number(path) ⇒ Object
16 17 18 |
# File 'lib/has_friends/generators/install.rb', line 16 def self.next_migration_number(path) Time.new.utc.strftime("%Y%m%d%H%M%S") end |
.source_root ⇒ Object
12 13 14 |
# File 'lib/has_friends/generators/install.rb', line 12 def self.source_root @source_root ||= File.dirname(__FILE__) + "/templates" end |
Instance Method Details
#create_migration_file ⇒ Object
20 21 22 |
# File 'lib/has_friends/generators/install.rb', line 20 def create_migration_file migration_template 'create_friendships.rb', File.join('db','migrate', 'create_friendships.rb') end |