module Granite::Querying

Direct including types

Defined in:

granite/querying.cr

Instance Method Summary

Instance Method Detail

def reload #

Returns the record with the attributes reloaded from the database.

Note: this method is only defined when the Spec module is present.

post = Post.create(name: "Granite Rocks!", body: "Check this out.")
# record gets updated by another process
post.reload # performs another find to fetch the record again

[View source]