lib/hydra_attribute/hydra_value.rb
def save
      raise EntityModelIsNotPersistedError unless entity.persisted?

      if persisted?
        return false unless changed?
        update
      else
        create
      end

      @previously_changed = changes
      @changed_attributes.clear

      true
    end
# Saves model
# Performs +insert+ or +update+ sql query
# Method doesn't perform sql query if model isn't modified
#
# @return [TrueClass, FalseClass]
Saves model
Performs +insert+ or +update+ sql query
Method doesn't perform sql query if model isn't modified
Saves model Performs + insert + or + update + sql query Method doesn ' t perform sql query if model isn ' t modified
def save
      raise EntityModelIsNotPersistedError unless entity.persisted?
      if persisted?
        return false unless changed?
        update
      else
        create
      end
      @previously_changed = changes
      @changed_attributes.clear
      true
    end
def save raise EntityModelIsNotPersistedError unless entity . persisted? if persisted? return false unless changed? update else create end @previously_changed = changes @changed_attributes . clear true end
Saves model
Performs +insert+ or +update+ sql query
Method doesn't perform sql query if model isn't modified
Saves model Performs + insert + or + update + sql query Method doesn ' t perform sql query if model isn ' t modified
None
TrueClass, FalseClass