Created
February 20, 2011 17:05
-
-
Save lperichon/836107 to your computer and use it in GitHub Desktop.
Fix DelayedJob - Spree conflict
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
module Searchlogic | |
module NamedScopes | |
# Handles dynamically creating named scopes for ordering by columns. Example: | |
# | |
# User.ascend_by_id | |
# User.descend_by_username | |
# | |
# See the README for a more detailed explanation. | |
module Ordering | |
module InstanceOverrideMethods | |
def order(*args) | |
begin | |
if condition?(args[0]) | |
send(args[0]) | |
else | |
super | |
end | |
rescue | |
Rails.logger.debug "Rescued!" | |
end | |
end | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment