With the SMSala Bulk SMS Provider, I'm creating a rails-based app that lets users send me SMS messages. Simply enter the user's name, email, some text, and submit the form on the home page. I am trying to create a function that would take the three options from parameter, create a text message, and send it to my phone number, but I'm not sure how to do it.
Those are the form and routes that I tried to create for this:
View: app/views/home/index.html.erb
<div>
<%= form_for @phone, url: 'home/send_text' do |f| %>
<%= f.label :name %>
<%= f.text_field :name %>
<%= f.label :email %>
<%= f.text_field :email %>
<%= f.label :message %>
<%= f.text_field :message %>
<%= f.submit 'Submit', class: "btn btn-primary" %>
<% end %>
</div>
Routes:
Rails.application.routes.draw do
root 'home#index'
post 'home/send_text'
end