app/models/concerns/strong_key_value_store.rb
def save
    if valid?
      hash = {}

      self.class.permitted_keys.each do |key|
        hash[key] = self.send(key)
      end

      self.class.underlying_raw_kvs.set(hash)
    else
      false
    end
  end
# Saves any changes to the backing store.
#
# Works just like ActiveRecord::Persistence#save.
Saves any changes to the backing store.
Works just like ActiveRecord::Persistence#save.
Saves any changes to the backing store . Works just like ActiveRecord :: Persistence#save .
def save
    if valid?
      hash = {}
      self.class.permitted_keys.each do |key|
        hash[key] = self.send(key)
      end
      self.class.underlying_raw_kvs.set(hash)
    else
      false
    end
  end
def save if valid? hash = { } self . class . permitted_keys . each do | key | hash [ key ] = self . send ( key ) end self . class . underlying_raw_kvs . set ( hash ) else false end end
Saves any changes to the backing store.
Saves any changes to the backing store .