Module: ActiveRecord::View::ReadOnly Private

Extended by:
ActiveSupport::Concern
Defined in:
lib/activerecord/view/read_only.rb

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Defined Under Namespace

Modules: ClassMethods

Constant Summary collapse

READONLY_CLASS_METHODS =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

%i[destroy destroy_all delete delete_all update_all update]

Instance Method Summary collapse

Instance Method Details

#deleteObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Raises:

  • (ActiveRecord::ReadOnlyRecord)


19
20
21
# File 'lib/activerecord/view/read_only.rb', line 19

def delete
  raise ActiveRecord::ReadOnlyRecord
end

#readonly?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)


15
16
17
# File 'lib/activerecord/view/read_only.rb', line 15

def readonly?
  true
end