Skip to content

Instantly share code, notes, and snippets.

@mnutt
Created August 6, 2008 14:51
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 mnutt/4219 to your computer and use it in GitHub Desktop.
Save mnutt/4219 to your computer and use it in GitHub Desktop.
def search(*args)
params = {:id => content_ids}
if Hash === args.last
if args.last[:conditions]
args.last[:conditions].merge!(params)
else
args.last[:conditions] = params
end
else
args << {:conditions => params}
end
Content.search(*args)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment