config/initializers/kaminari_patch.rb in drg_cms-0.4.39 vs config/initializers/kaminari_patch.rb in drg_cms-0.4.53

- old
+ new

@@ -21,14 +21,15 @@ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #++ ########################################################################### -# This patch adds page param to url when page one is choosed. +# This patch adds page param to url when page one is choosed. This is needed +# for paging to work as expected. ########################################################################### -module Kaminari - module Helpers - class Tag +module Kaminari #:nodoc: + module Helpers #:nodoc: + class Tag #:nodoc: def page_url_for(page) @template.url_for @params.merge(@param_name => (page < 1 ? 1 : page)) end end end \ No newline at end of file