def update_cloneable_associations
      associations_for_cloning.each do |association|
        type = @klass.reflect_on_association(association)
        through_record = type.through_reflection

        if through_record.present?
          clone_join_relationships(through_record.plural_name)
        else
          clone_has_one_relationship(association,type) if type.macro == :has_one
          clone_has_many_relationships(association) if type.macro == :has_many
        end
      end
    end
def update_cloneable_associations
      associations_for_cloning.each do |association|
        type = @klass.reflect_on_association(association)
        through_record = type.through_reflection

        if through_record.present?
          clone_join_relationships(through_record.plural_name)
        else
          clone_has_one_relationship(association,type) if type.macro == :has_one
          clone_has_many_relationships(association) if type.macro == :has_many
        end
      end
    end
set cloneable attributes and associations