Skip to content

Instantly share code, notes, and snippets.

View karlhigley's full-sized avatar

Karl Higley karlhigley

View GitHub Profile
@karlhigley
karlhigley / gist:5817180
Last active December 18, 2015 17:18 — forked from richmolj/gist:5811358
class PostController < ApplicationController
def search
searcher.search(params[:keywords])
end
private
def searcher
Feature::Set.toggled_on?(:some_feature) ? SunspotPostSearcher.new : AnotherPostSearcher.new
end