1
0
Fork 0
mirror of https://github.com/activerecord-hackery/ransack.git synced 2022-11-09 13:47:45 -05:00

use respond_to? instead of method_defined? when aliasing search

Fixes #305
This commit is contained in:
Jerod Santo 2013-11-15 14:54:48 -06:00 committed by Ryan Bigg
parent 2ca4e4974a
commit 81fd2edd9f

View file

@ -4,7 +4,7 @@ module Ransack
module Base
def self.extended(base)
alias :search :ransack unless base.method_defined? :search
alias :search :ransack unless base.respond_to? :search
base.class_eval do
class_attribute :_ransackers
self._ransackers ||= {}