Created
October 11, 2012 12:03
-
-
Save ornerymoose/3871885 to your computer and use it in GitHub Desktop.
Note there is only an index for this app: very simple. No form/edit/show anything like that (taken care of in the admin portion of the app).
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
def index | |
@listings = params[:search].nil? ? Listing.all : Listing.search(params[:search]) | |
respond_to do |format| | |
format.js | |
format.html | |
format.json { render json: @listings } | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment