Created
April 25, 2009 19:58
-
-
Save mattapayne/101735 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Using JamBase4R in Rails is simple. Just include it in the controller you want to use | |
class MyJamBaseController < ApplicationController | |
include JamBase4R | |
def search | |
@results = API.search(params[:search]) | |
#You could also NOT include JamBase4R and just call it like so: | |
# @results = JamBase4R::API.search(params[:search]) | |
end | |
end | |
#Using JamBase4R in something like Sinatra is also simple | |
get "/search" do | |
@results = JamBase4R::API.search(params[:search]) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment