Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- gem 'rest-client'
- class Message < ActiveRecord::Base
- require 'rest-client'
- end
- respond_to do |format|
- if @message.save
- RestClient.post 'https://www.xxxx.com/api/sendhttp.php', :authkey => 'xxxxxx',
- :nested => { :mobiles => 'xxxxx', :messgf => 'Hai.How are you', :sender => 'xxxx', :route =>'x'}
- format.html { redirect_to @message, notice: 'Message was successfully created.' }
- format.json { render :show, status: :created, location: @message }
- else
- format.html { render :new }
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement