i can not get Kaminari work together with unscope, here's what I'm experiencing,
https://gist.github.com/1330721
Any thoughts on this?
i can not get Kaminari work together with unscope, here's what I'm experiencing,
https://gist.github.com/1330721
Any thoughts on this?
Your simplified code works for me with newest stable versions either, but anyway, if you're experiencing a strange behavior with default_scope + unscoped, it must be caused by this AR bug. https://rails.lighthouseapp.com/projects/8994/tickets/5386-arbaseunscoped-inconsistency
So, as the document sais, I recommend you to avoid using unscoped method in method chaining. Use block style instead. https://github.com/rails/rails/blob/2407a7a/activerecord/lib/active_record/base.rb#L938
Article.unscoped { Article.page(nil).per(30) }.to_sql