Module: Ashikawa::AR::Persistence
Overview
Provides Persistence functionality for your model
Instance Method Summary collapse
-
#delete ⇒ self
Delete the record from the database.
-
#deleted? ⇒ Boolean
Check, if the object has been deleted.
-
#new_record? ⇒ Boolean
Check, if the object is a new record.
-
#persisted? ⇒ Boolean
Check, if the object has been persisted.
-
#reload ⇒ self
Reload the record from the database.
-
#save ⇒ self, false
Save the document to the database returning false if invalid.
-
#save! ⇒ self
Save the document to the database throwing an exception if invalid.
-
#save_without_validation ⇒ self
Save the document to the database even if it is invalid.
-
#update_attribute(key, value) ⇒ self
Update a single attribute and write to the database.
-
#update_attributes(attributes) ⇒ self, false
Updates multiple attributes and write to the database returning false if they are invalid.
-
#update_attributes!(attributes) ⇒ self
Updates multiple attributes and write to the database throwing an exception if they are invalid.
Instance Method Details
#delete ⇒ self
Delete the record from the database
56 |
# File 'lib/ashikawa-ar/persistence.rb', line 56 def delete;end |
#deleted? ⇒ Boolean
Check, if the object has been deleted
106 |
# File 'lib/ashikawa-ar/persistence.rb', line 106 def deleted?;end |
#new_record? ⇒ Boolean
Check, if the object is a new record
114 |
# File 'lib/ashikawa-ar/persistence.rb', line 114 def new_record?;end |
#persisted? ⇒ Boolean
Check, if the object has been persisted
98 |
# File 'lib/ashikawa-ar/persistence.rb', line 98 def persisted?;end |
#reload ⇒ self
Reload the record from the database
47 |
# File 'lib/ashikawa-ar/persistence.rb', line 47 def reload;end |
#save ⇒ self, false
Save the document to the database returning false if invalid
19 |
# File 'lib/ashikawa-ar/persistence.rb', line 19 def save;end |
#save! ⇒ self
Save the document to the database throwing an exception if invalid
29 |
# File 'lib/ashikawa-ar/persistence.rb', line 29 def save!;end |
#save_without_validation ⇒ self
Save the document to the database even if it is invalid
38 |
# File 'lib/ashikawa-ar/persistence.rb', line 38 def save_without_validation;end |
#update_attribute(key, value) ⇒ self
Update a single attribute and write to the database
67 |
# File 'lib/ashikawa-ar/persistence.rb', line 67 def update_attribute(key, value);end |
#update_attributes(attributes) ⇒ self, false
Updates multiple attributes and write to the database returning false if they are invalid
78 |
# File 'lib/ashikawa-ar/persistence.rb', line 78 def update_attributes(attributes);end |
#update_attributes!(attributes) ⇒ self
Updates multiple attributes and write to the database throwing an exception if they are invalid
90 |
# File 'lib/ashikawa-ar/persistence.rb', line 90 def update_attributes!(attributes);end |