Sha256: 2df9f4cb91f7633e543e8f2b63832c556eca5a0e88e30af13859de3b911ee805
Contents?: true
Size: 590 Bytes
Versions: 36
Compression:
Stored size: 590 Bytes
Contents
# This extends the @template.url_for method to work with Kaminari # It is only extended on the posts#index method, for minimal pollution module EffectiveKaminariHelper def url_for(params) if params.kind_of?(Hash) && params[:controller] == 'effective/posts' && params[:action] == 'index' params.delete(:page) if params[:page].blank? params.delete(:category) if EffectivePosts.use_category_routes params = params.except(:action, :controller, :only_path) request.path.to_s + (params.present? ? '?' : '') + params.to_param else super end end end
Version data entries
36 entries across 36 versions & 1 rubygems