class SmartSms::InstallGenerator
Public Class Methods
next_migration_number(dirname)
click to toggle source
# File lib/generators/smart_sms/install_generator.rb, line 22 def self.next_migration_number(dirname) ::ActiveRecord::Generators::Base.next_migration_number(dirname) end
Public Instance Methods
create_migration_file()
click to toggle source
# File lib/generators/smart_sms/install_generator.rb, line 16 def create_migration_file return unless SmartSMS.config.store_sms_in_local add_smart_sms_migration('create_smart_sms_messages') add_smart_sms_migration('add_uid_to_smart_sms_messages') end
Protected Instance Methods
add_smart_sms_migration(template)
click to toggle source
# File lib/generators/smart_sms/install_generator.rb, line 28 def add_smart_sms_migration(template) migration_dir = File.expand_path('db/migrate') unless self.class.migration_exists?(migration_dir, template) migration_template "#{template}.rb", "db/migrate/#{template}.rb" end end