Commit 8faec45b authored by Thong Kuah's avatar Thong Kuah

Fix ShaAttribute to not have implicit dependency on DatabaseReflection

Includes DatabaseReflection for models which may not descend from
ApplicationRecord
parent 17b440bb
......@@ -3,6 +3,9 @@
module ShaAttribute
extend ActiveSupport::Concern
# Needed for the database method
include DatabaseReflection
class_methods do
def sha_attribute(name)
return if ENV['STATIC_VERIFICATION']
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
RSpec.describe ShaAttribute do
let(:model) { Class.new(ApplicationRecord) { include ShaAttribute } }
let(:model) { Class.new(ActiveRecord::Base) { include ShaAttribute } }
before do
columns = [
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment