diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2019-05-27 06:41:31 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2019-05-27 06:41:31 +0900 |
commit | b55f5a3ed9134ed86993fcda3ea9b6fb2e97f09e (patch) | |
tree | 00d6e601267231921e078404885e372226f5dd63 /activerecord/lib/active_record/persistence.rb | |
parent | a1c269fbdf1f10aa038c8b58e6ba48e9f5f3f864 (diff) | |
download | rails-b55f5a3ed9134ed86993fcda3ea9b6fb2e97f09e.tar.gz rails-b55f5a3ed9134ed86993fcda3ea9b6fb2e97f09e.tar.bz2 rails-b55f5a3ed9134ed86993fcda3ea9b6fb2e97f09e.zip |
Extract `readonly_attribute?`
Diffstat (limited to 'activerecord/lib/active_record/persistence.rb')
-rw-r--r-- | activerecord/lib/active_record/persistence.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/persistence.rb b/activerecord/lib/active_record/persistence.rb index a58c5fd48a..b7bc4b3b8e 100644 --- a/activerecord/lib/active_record/persistence.rb +++ b/activerecord/lib/active_record/persistence.rb @@ -939,7 +939,7 @@ module ActiveRecord end def verify_readonly_attribute(name) - raise ActiveRecordError, "#{name} is marked as readonly" if self.class.readonly_attributes.include?(name) + raise ActiveRecordError, "#{name} is marked as readonly" if self.class.readonly_attribute?(name) end def _raise_record_not_destroyed |