You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I don't require 'will_paginate' in my environment.rb file I get the following error:
undefined method `paginate' for #<ActiveRecord::Relation:0x007fd832b6e5b0>
Wanted to point this out and perhaps find some explanation for this.
Perhaps this is due to my application setup? Perhaps you will see if the issue stems from my Gemfile.lock (notice will_paginate is listed twice)? Let me know if you observe anything:
This is the use case between the model and controller for the my resource
class Product < ActiveRecord::Base
include RocketPants::Cacheable
...
end
class Api::ProductsController < RocketPants::Base
version 1
...
def search
...
expose Product.where("vendor_cats like ?", q).paginate(:page => params[:page])
end
We depend on will paginate but since we only use the collection class, we leave the rest of it as is. What do you have in your Gemfile for will_paginate? It looks like nothing directly, so if that's the case I suggest explicitly adding it there (which should also have the effect of loading it for you)
If I don't
require 'will_paginate'
in myenvironment.rb
file I get the following error:Wanted to point this out and perhaps find some explanation for this.
Perhaps this is due to my application setup? Perhaps you will see if the issue stems from my Gemfile.lock (notice
will_paginate
is listed twice)? Let me know if you observe anything:This is the use case between the model and controller for the my resource
And here is the relevant part of my
Gemfile.lock
The text was updated successfully, but these errors were encountered: