Skip to content

Instantly share code, notes, and snippets.

View nslindtner's full-sized avatar

Nicolaj S. Lindtner nslindtner

View GitHub Profile
@nslindtner
nslindtner / Controller
Created February 5, 2015 08:55
Post etoro info from rails app
def create
@etoro = Etoro.new(params[:etoro])
respond_to do |format|
if @etoro.save
uri = URI.parse("https://secure.steamads.com/track/investimonials")
response = Net::HTTP.post_form(uri, {"ip" => "#{request.remote_ip}", "split" => @etoro.split, "value" => @etoro.value, "customer_id" => @etoro.customer_id})
@resp =response
format.html { redirect_to @etoro, notice: 'Etoro was successfully created.' }
format.json { render json: @etoro, status: :created, location: @etoro }
Det her er smart