Am using below specified gem
acts-as-taggable-on(2.2.2)
will_paginate(3.0.2)
rails(3.0.3)
ruby 1.8.7
i tried to use tagged_with undefined method tagged_with
Code
@search = Product.tagged_with(params[:search][:tag_name]).paginate(:per_page => 15, :page => params[:page])
Output:
NoMethodError (undefined method `tagged_with' for #<Class:0xb51a0f08>):
than i tried find_tagged_with undefined method paginate
Code
@search = Product.find_tagged_with(params[:search][:tag_name]).paginate(:per_page => 15, :page => params[:page])
Output
NoMethodError (undefined method `paginate' for #<Array:0xb512f790>):
class Product < ActiveRecord::Base
attr_accessible :tag_list
acts_as_taggable
end
Kindly either Guide me way to make Will_paginate to work with Array/acts-as-taggable-on.
Thanks in advance..
Add this line in the file you are using
will_paginateover arrays.If you want it globally enabled, add it to end of
application.rb