From f865a9238fb700dcdf4d4355d2237f7466f9cf7a Mon Sep 17 00:00:00 2001 From: "David J. Brenes" Date: Wed, 8 Jun 2016 00:33:46 +0200 Subject: [PATCH] Removing deprecated alias_method_chain Issue #19 --- app/models/no_cms/blocks/concerns/model_with_slots.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/models/no_cms/blocks/concerns/model_with_slots.rb b/app/models/no_cms/blocks/concerns/model_with_slots.rb index e27ddb4..ebeb717 100644 --- a/app/models/no_cms/blocks/concerns/model_with_slots.rb +++ b/app/models/no_cms/blocks/concerns/model_with_slots.rb @@ -24,8 +24,8 @@ module ModelWithSlots # In the dup implementation we configure the `dup_block_when_duping_slot` # virtual attribute of the slot with the same value than the attribute # from this model. This way we propagate the configuration. - def dup_with_slots options = {} - duplicated = dup_without_slots + def dup + duplicated = super # We just need to dub root slots, if there are nested slots # will be dupped in each slot block_slots.roots.each do |slot| @@ -36,8 +36,6 @@ def dup_with_slots options = {} end duplicated end - alias_method_chain :dup, :slots - end end