Skip to content

Commit

Permalink
Auto corrected by following Lint Ruby Layout/HeredocIndentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Awesome Code committed Feb 16, 2021
1 parent f66c384 commit df2aad4
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions lib/will_paginate/use_new_syntax.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

Synvert::Rewriter.new 'will_paginate', 'use_new_syntax' do
description <<~EOS
It uses will_paginate new syntax.
Post.paginate(:conditions => {:active => true}, :order => "created_at DESC", :per_page => 10, :page => 1)
Post.paginated_each(:conditions => {:active => true}, :order => "created_at DESC", :per_page => 10) do |post|
end
=>
Post.where(:active => true).order("created_at DESC").paginate(:per_page => 10, :page => 1)
Post.where(:active => true).order("created_at DESC").find_each(:batch_size => 10) do |post|
end
It uses will_paginate new syntax.
Post.paginate(:conditions => {:active => true}, :order => "created_at DESC", :per_page => 10, :page => 1)
Post.paginated_each(:conditions => {:active => true}, :order => "created_at DESC", :per_page => 10) do |post|
end
=>
Post.where(:active => true).order("created_at DESC").paginate(:per_page => 10, :page => 1)
Post.where(:active => true).order("created_at DESC").find_each(:batch_size => 10) do |post|
end
EOS

if_gem 'will_paginate', { gte: '3.0.0' }
Expand Down

0 comments on commit df2aad4

Please sign in to comment.