Commit 67cf8846 authored by Toon Claes's avatar Toon Claes

Make code fail when Rails gem is updated

parent 9c233a9b
...@@ -3,6 +3,11 @@ ...@@ -3,6 +3,11 @@
class Geo::UploadRegistry < Geo::FileRegistry class Geo::UploadRegistry < Geo::FileRegistry
belongs_to :upload, foreign_key: :file_id belongs_to :upload, foreign_key: :file_id
if Rails.gem_version >= Gem::Version.new('6.0')
raise '.type_condition was changed in Rails 6.0, please adapt this code accordingly'
# see https://github.com/rails/rails/commit/6a1a1e66ea7a917942bd8369fa8dbfedce391dab
end
def self.type_condition(table = arel_table) def self.type_condition(table = arel_table)
sti_column = arel_attribute(inheritance_column, table) sti_column = arel_attribute(inheritance_column, table)
sti_names = Geo::FileService::DEFAULT_OBJECT_TYPES sti_names = Geo::FileService::DEFAULT_OBJECT_TYPES
......
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