Created
November 5, 2012 21:25
-
-
Save jlstr/4020422 to your computer and use it in GitHub Desktop.
Sorting using Ransack
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
class LandingController < ApplicationController | |
layout "landing2" | |
def index | |
@zones = Zone.all | |
@zone_id ||= 1 | |
@q = Property.search(params[:q]) | |
@q.build_sort if @q.sorts.empty? | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment