Class: VoicecomSmsGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- VoicecomSmsGenerator
- Extended by:
- ActiveRecord::Generators::Migration
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/voicecom_sms_generator.rb
Constant Summary collapse
- TEMPLATES_PATH =
File.('../templates', __FILE__)
Instance Method Summary collapse
-
#copy_files(*args) ⇒ Object
source_root File.expand_path(VoicecomSms::Engine.root, __FILE__).
Instance Method Details
#copy_files(*args) ⇒ Object
source_root File.expand_path(VoicecomSms::Engine.root, __FILE__)
12 13 14 15 16 17 18 |
# File 'lib/generators/voicecom_sms_generator.rb', line 12 def copy_files(*args) Dir["#{TEMPLATES_PATH}/migrations/*"].each do |template_file| migration_template template_file, "db/migrate/#{File.basename(template_file)}" end copy_file "#{TEMPLATES_PATH}/initializers/voicecom_sms.rb", 'config/initializers/voicecom_sms.rb' end |