Skip to content

Instantly share code, notes, and snippets.

{"Countries"=>{"Country"=>[{"Name"=>"China ", "Rank"=>"1", "Total"=>"67", "Gold"=>"39", "Silver"=>"14", "Bronze"=>"14"}, {"Name"=>"United States ", "Rank"=>"2", "Total"=>"72", "Gold"=>"22", "Silver"=>"24", "Bronze"=>"26"}, {"Name"=>"Great Britain ", "Rank"=>"3", "Total"=>"27", "Gold"=>"12", "Silver"=>"7", "Bronze"=>"8"}, {"Name"=>"Australia ", "Rank"=>"4", "Total"=>"33", "Gold"=>"11", "Silver"=>"10", "Bronze"=>"12"}, {"Name"=>"Germany ", "Rank"=>"5", "Total"=>"23", "Gold"=>"9", "Silver"=>"7", "Bronze"=>"7"}]}}
PERSONAL CELL -> PAID INCOMING -> PAID OUTGOING -> INTERESTED PARTY 1
PERSONAL CELL -> PAID INCOMING -> PAID OUTGOING -> INTERESTED PARTY 2
PERSONAL CELL -> PAID INCOMING -> PAID OUTGOING -> INTERESTED PARTY 3
PERSONAL CELL -> PAID INCOMING -> PAID OUTGOING -> INTERESTED PARTY 4
PERSONAL CELL -> PAID INCOMING -> PAID OUTGOING -> INTERESTED PARTY 5
def create
@receive_text = ReceiveText.new
@receive_text.body = params[:Body]
@receive_text.to = params[:To]
@receive_text.from = params[:From]
@user = User.find_by_phone("#{@receive_text.to}")
respond_to do |format|
if @receive_text.save
twilio_sid = "asdf2"
@receive_text = ReceiveText.new(params[:receive_text])
@receive_text[:body] = params[:receive_text => :body]
Twilio::REST::RequestError in SendTextController#send_text_message
The 'From' number +113142000751 is not a valid phone number or shortcode.
Rails.root: /home/afresta/rails_projects/TSHIRT_TEXT
Application Trace | Framework Trace | Full Trace
app/controllers/send_text_controller.rb:16:in `send_text_message'
<movies><sport>public/movies/Sports/test</sport><entertainment>public/movies/Entertainment/Entertainment213</entertainment></movies>
xml.instruct!
xml.movies do
@sports.each do |sport|
xml.sport sport
end
@entertainments.each do |entertainment|
xml.entertainments entertainment
end
<movies>
<sports>
<sportsFilename1</sport>
</sports>
<entertainments>
<entertainment>Filename1</entertainment
</entertianments>
</movies>
<movies>
<sports>
<sportsFilename1</sport>
</sports>
<entertainments>
<entertainment>Filename1</entertainment
</entertianments>
</movies>
def index
@movies = Dir.glob("public/movies/*/*")
@sports = Dir.glob("public/movies/Sports/*")
@entertainments = Dir.glob("public/movies/Entertainment/*")
respond_to do |format|
format.html # index.html.erb
format.xml { render xml: @movie }
end
end