diff options
Diffstat (limited to 'vendor/plugins')
| -rw-r--r-- | vendor/plugins/acts_as_taggable_redux/lib/acts_as_taggable.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/vendor/plugins/acts_as_taggable_redux/lib/acts_as_taggable.rb b/vendor/plugins/acts_as_taggable_redux/lib/acts_as_taggable.rb index 6b5e8b9..e070d2b 100644 --- a/vendor/plugins/acts_as_taggable_redux/lib/acts_as_taggable.rb +++ b/vendor/plugins/acts_as_taggable_redux/lib/acts_as_taggable.rb | |||
| @@ -30,7 +30,7 @@ module ActiveRecord | |||
| 30 | end | 30 | end |
| 31 | 31 | ||
| 32 | def tagged_with_scope(tags, options={}) | 32 | def tagged_with_scope(tags, options={}) |
| 33 | options.assert_valid_keys([:match, :order, :user]) | 33 | options.assert_valid_keys([:match, :order, :user, :limit]) |
| 34 | 34 | ||
| 35 | tags = Tag.parse(tags) | 35 | tags = Tag.parse(tags) |
| 36 | return [] if tags.empty? | 36 | return [] if tags.empty? |
| @@ -44,7 +44,8 @@ module ActiveRecord | |||
| 44 | "LEFT OUTER JOIN #{Tag.table_name} #{table_name}_tags ON #{table_name}_tags.id = #{table_name}_taggings.tag_id", | 44 | "LEFT OUTER JOIN #{Tag.table_name} #{table_name}_tags ON #{table_name}_tags.id = #{table_name}_taggings.tag_id", |
| 45 | :conditions => conditions, | 45 | :conditions => conditions, |
| 46 | :group => group, | 46 | :group => group, |
| 47 | :order => options[:order] | 47 | :order => options[:order], |
| 48 | :limit => options[:limit] | ||
| 48 | } | 49 | } |
| 49 | 50 | ||
| 50 | with_scope(:find => find_parameters) { yield } | 51 | with_scope(:find => find_parameters) { yield } |
