Module: MerbSignupto::ControllerExtension
- Defined in:
- lib/merb_signupto/controller_extension.rb
Instance Method Summary collapse
-
#send_sms(klass, method, mail_params, send_params = nil) ⇒ Object
you can now call this in any of your ordinary controllers like so:.
Instance Method Details
#send_sms(klass, method, mail_params, send_params = nil) ⇒ Object
you can now call this in any of your ordinary controllers like so:
def index
send_sms(ExampleMessenger, :some_method, { :from => '02UK', :to => '4445265485' })
end
You must use international format for your phone numbers, rather than using +44 or 078 for example.
for more information on how to use the SmsController please see the docs in sms_controller.rb
15 16 17 18 |
# File 'lib/merb_signupto/controller_extension.rb', line 15 def send_sms(klass, method, mail_params, send_params = nil) # puts "Class is #{klass}" klass.new(send_params || params, self).dispatch_and_deliver(method, mail_params) end |