module Traits::Association::ReadOnly
Public Instance Methods
mutable?()
click to toggle source
# File lib/traits/association/read_only.rb, line 7 def mutable? !through? || source_association.macro == :belongs_to end
readonly?()
click to toggle source
# File lib/traits/association/read_only.rb, line 11 def readonly? not mutable? end
to_hash()
click to toggle source
Calls superclass method
# File lib/traits/association/read_only.rb, line 15 def to_hash super.merge!(mutable: mutable?) end