Skip to content

Instantly share code, notes, and snippets.

@jasdeepsingh
Created November 3, 2011 00:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasdeepsingh/1335365 to your computer and use it in GitHub Desktop.
Save jasdeepsingh/1335365 to your computer and use it in GitHub Desktop.
API Controller
class ApiController < ApplicationController
before_filter :authenticate_user!
skip_before_filter :verify_authenticity_token
def store_coordinates
@store = Geocoder.search(params[:address])
render :json => @store[0].geometry
end
def make_punch
@deal = Deal.find_by_qr_code(params[:qr_code])
binding.pry
respond_to do |format|
format.html
format.json { render :partial => "make_punch" }
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment