lib/petit/shortcode.rb
# Updates an existing object in the database.
# To create new objects use {#save}.
#
# @return [Hash] resulting collection of object attributes after update
# @raise [Petit::ShortcodeAccessError] when record to update does not exist
# @raise [Petit::IncompleteObjectError] when the Shortcode fails validation
Updates an existing object in the database.
To create new objects use {#save}.
Updates an existing object in the database . To create new objects use { #save } .
def update
      stored_values = DATABASE.update(self)
      @updated_at = stored_values['updated_at']
      stored_values
    end
def update stored_values = DATABASE . update ( self ) @updated_at = stored_values [ 'updated_at' ] stored_values end
Updates an existing object in the database.
Updates an existing object in the database .
resulting collection of object attributes after update
resulting collection of object attributes after update
Hash
[Petit::ShortcodeAccessError] when record to update does not exist
[ Petit :: ShortcodeAccessError ] when record to update does not exist
[Petit::IncompleteObjectError] when the Shortcode fails validation
[ Petit :: IncompleteObjectError ] when the Shortcode fails validation