From 49fdac76830e7a93d87ec3eed6d8f83192e46fe6 Mon Sep 17 00:00:00 2001 From: Olle Jonsson Date: Tue, 7 Jun 2022 16:45:53 +0200 Subject: [PATCH] Remove unused file 3700e02c901d50dc197f8b1ae0bba35d605e80c8 added it. The project now relies on active_model 4.2 as a runtime dependency, so this code is never used. --- spec/support/active_model.rb | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 spec/support/active_model.rb diff --git a/spec/support/active_model.rb b/spec/support/active_model.rb deleted file mode 100644 index 5cfb0a1..0000000 --- a/spec/support/active_model.rb +++ /dev/null @@ -1,30 +0,0 @@ -unless defined?(ActiveModel::Model) - # ActiveModel::Model is available since ActiveModel 4.0 only. - # - # If it's missing, add the code from - # https://github.com/rails/rails/blob/master/activemodel/lib/active_model/model.rb - module ActiveModel - module Model - def self.included(base) - base.class_eval do - extend ActiveModel::Naming - extend ActiveModel::Translation - include ActiveModel::Validations - include ActiveModel::Conversion - end - end - - def initialize(params={}) - params.each do |attr, value| - self.public_send("#{attr}=", value) - end if params - - super() - end - - def persisted? - false - end - end - end -end