Skip to content

Commit

Permalink
Removed use of deep_dup method when rendering a partial.
Browse files Browse the repository at this point in the history
#deep_dup was causing activerecord relations that were paginated with will_paginate in Rails 4 to lose their pagination attributes
  • Loading branch information
hunterae committed Dec 11, 2017
1 parent 6fc0203 commit 64a57cf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/blocks/renderers/partial_renderer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module Blocks
class PartialRenderer < AbstractRenderer
def render(partial, options={}, &block)
if !options.is_a?(Blocks::RuntimeContext)
options = RuntimeContext.new(builder, options).to_hash.with_indifferent_access.deep_dup
options = RuntimeContext.new(builder, options).to_hash.with_indifferent_access
end
overrides_and_provided_content = capture(builder, options, &block) if block_given?
locals = options.merge(
Expand Down
2 changes: 1 addition & 1 deletion lib/blocks/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Blocks
VERSION = "3.0.1"
VERSION = "3.0.2"
end

0 comments on commit 64a57cf

Please sign in to comment.