aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/lint.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activemodel/lib/active_model/lint.rb')
-rw-r--r--activemodel/lib/active_model/lint.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activemodel/lib/active_model/lint.rb b/activemodel/lib/active_model/lint.rb
index 26eb4a3c41..d7a6da48ca 100644
--- a/activemodel/lib/active_model/lint.rb
+++ b/activemodel/lib/active_model/lint.rb
@@ -38,6 +38,7 @@ module ActiveModel
# not persisted?, then to_param should always return nil.
def test_to_param
assert model.respond_to?(:to_param), "The model should respond to to_param"
+ def model.to_key() [1] end
def model.persisted?() false end
assert model.to_param.nil?
end