From 3945e01190a96c73d644c1c223c97cab6b621463 Mon Sep 17 00:00:00 2001 From: Davin Lagerroos Date: Sun, 12 Apr 2020 16:37:58 -0500 Subject: [PATCH] Workaround ActiveSupport::Concern error See https://github.com/laserlemon/vestal_versions/issues/111. This issue seems to be the gem defines 2 Version::VersionMethods modules, one users.rb and one in version_tagging.rb, each with an `included` block. As quick proof of concept rename the module in VersionTagging (since we don't use that feature) to `VersionTaggingMethods` and update the `class_eval` block to reflect the change. A better approach might be to namesoace each `VersionMethods` module to the parent module, e.g. `VestalVersions::VersionTagging::VersionMethods` and `VestalVersions::User::VersionMethods` --- lib/vestal_versions/version_tagging.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/vestal_versions/version_tagging.rb b/lib/vestal_versions/version_tagging.rb index 962d1bd5..44ddeaeb 100644 --- a/lib/vestal_versions/version_tagging.rb +++ b/lib/vestal_versions/version_tagging.rb @@ -23,7 +23,7 @@ def tag_version(tag) end # Instance methods included into VestalVersions::Version to enable version tagging. - module VersionMethods + module VersionTaggingMethods extend ActiveSupport::Concern included do @@ -46,6 +46,6 @@ def validate_tags? tagged? && tag != 'deleted' end - Version.class_eval{ include VersionMethods } + Version.class_eval{ include VersionTaggingMethods } end end