Can you go into a few more details and a use case? I'm understanding this as you want the Rails application (for example, that is being browsed on an end user's iOS Safari browser), to trigger, send and read SMS communications from their iMessage app.
On the other hand, are you more talking about having a backend service where a user can SMS a static phone number and carry a conversation? Something like a state managed SMS send/response.
<%= form.submit "Previous", class: 'btn btn-secondary' %>
<%= form.submit "Continue", class: 'btn btn-primary' %>
def create
@company_profile = CompanyProfile.new(company_profile_params)
if @company_profile.valid?
session[:company_profile] = {
name: @company_profile.name,
website: @company_profile.website
}
redirect_to redirection_url
else
render :new
end
end
private
def redirection_url
case params[:commit]
when "Continue"
new_wizards_companies_location_path
when "Previous
new_wizards_companies_[PREVIOUS_RESOURCE_STEP_HERE]_path
else
# handle non matching (likely the next step)
end
endorigins "*"
origins ENV["URL_DOMAIN"]