Methods
Instance Public methods
pending?() Link
Returns whether the associated query is still being executed or not.
then(&block) Link
Returns a new ActiveRecord::Promise
that will apply the passed block when the value is accessed:
Post.async_pick(:title).then { |title| title.upcase }.value
# => "POST TITLE"
value() Link
Returns the query result. If the query wasn’t completed yet, accessing #value
will block until the query completes. If the query failed, #value
will raise the corresponding error.