lib/sluggable_finder/finder.rb in sluggable_finder-2.2.0 vs lib/sluggable_finder/finder.rb in sluggable_finder-2.2.1
- old
+ new
@@ -2,10 +2,10 @@
# This module is included by the base class as well as AR asociation collections
#
module Finder
def find_sluggable(opts,*args)
key = args.first
- if key.is_a?(Symbol) || (key.to_s =~ /\A\d+\Z/ && opts[:allow_integer_ids]) # normal INT find
+ if key.is_a?(Symbol) || key.kind_of?(Array) || (key.to_s =~ /\A\d+\Z/ && opts[:allow_integer_ids]) # normal INT find
find_without_slug(*args)
else # sluggable find
options = {:conditions => ["#{ opts[:to]} = ?", key]}
error = "There is no #{opts[:sluggable_type]} with #{opts[:to]} '#{key}'"
with_scope(:find => options) do
\ No newline at end of file