Flowdock
method

readonly

Importance_1
v4.0.2 - Show latest stable - 0 notes - Class: ActiveRecord::QueryMethods
readonly(value = true) public

Sets readonly attributes for the returned relation. If value is true (default), attempting to update a record will result in an error.

users = User.readonly
users.first.save
=> ActiveRecord::ReadOnlyRecord: ActiveRecord::ReadOnlyRecord
Show source
Register or log in to add new notes.