Prefer simpler code

This commit is contained in:
Akira Matsuda 2016-11-23 13:08:19 +09:00
parent 8763cad3d7
commit 315e06bcc4
1 changed files with 2 additions and 2 deletions

View File

@ -49,7 +49,7 @@ module Kaminari
prev_page = path_to_prev_page(scope, options)
options.except! :params, :param_name
options.reverse_merge! rel: 'prev'
options[:rel] ||= 'prev'
link_to_if prev_page, name, prev_page, options do
yield if block_given?
@ -77,7 +77,7 @@ module Kaminari
next_page = path_to_next_page(scope, options)
options.except! :params, :param_name
options.reverse_merge! rel: 'next'
options[:rel] ||= 'next'
link_to_if next_page, name, next_page, options do
yield if block_given?