Does anybody have any example code on how this would work? Seems like it should be pretty straightforward, but the Twilio documentation is sparse for SMS/Rails.
I have a simple "post" model with a "body" column and "from" column. I just want to display the SMS messages in a list. The closest thing I got to work was something like this:
#posts_controller.rb
class PostsController < ApplicationController
def new
@post = Post.new(:body=>"?",:from=>"?")
@post.save
end
end
#twilio sms url: ...myappurl/posts/new
This creates a new post, but the 'from' and 'body' values are "?", obviously. How do I pass the Twilio SMS 'From' and 'Body' values into the rails controller?
Any ideas or a nudge in the right direction? Thanks!