Class SmsOnRailsGenerator
In: generators/sms_on_rails/sms_on_rails_generator.rb
Parent: Rails::Generator::NamedBase

Methods

Constants

SERVICE_PROVIDERS = [:clickatell, :email_gateway]

Public Instance methods

Protected Instance methods

add sms on rails dependencies such as the clickatell gem and static record cache

options specific to sms on rails generator

add the require ‘sms_on_rails/all_models.rb from environment.rb‘

copy up the public folder

create admin views by copying to main app/views

recursively copy files from templates/* to app/*

create admin views by copying to main app/controller

create admin views by copying to main app/helper

Pre Rails engine support: copy to app directly

generate the specified migration template

generate the 3 sms on rails migrations by creating them in the main app dir

If app/models/phone_number.rb exists, add include the Sms functionality and define app/models/sms_on_rails/phone_number.rb to point to PhoneNumber

change to update if phone number exists

remove the require ‘sms_on_rails/all_models.rb from environment.rb‘

Use template runner to run specified template and output message

return true if the rails version has support for engines

[Validate]