Advertisement
Guest User

Untitled

a guest
Apr 27th, 2015
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. gem 'rest-client'
  2.  
  3. class Message < ActiveRecord::Base
  4. require 'rest-client'
  5. end
  6.  
  7. respond_to do |format|
  8. if @message.save
  9. RestClient.post 'https://www.xxxx.com/api/sendhttp.php', :authkey => 'xxxxxx',
  10. :nested => { :mobiles => 'xxxxx', :messgf => 'Hai.How are you', :sender => 'xxxx', :route =>'x'}
  11. format.html { redirect_to @message, notice: 'Message was successfully created.' }
  12. format.json { render :show, status: :created, location: @message }
  13. else
  14. format.html { render :new }
  15. end
  16. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement