Class: ActiveRecord::InternalMetadata

Inherits:
Base
  • Object
show all
Defined in:
lib/activerecord/monkey_patch/rails5_0.rb

Overview

Class Method Summary collapse

Class Method Details

.[]=(key, value) ⇒ Object



14
15
16
# File 'lib/activerecord/monkey_patch/rails5_0.rb', line 14

def []=(key, value)
  find_or_initialize_by(key: key).update_attributes!(value: value.to_s)
end