Sha256: f8c81ee48a4e0a6115269f358a889c020626eadc903d2b066b57172cd3a13842
Contents?: true
Size: 691 Bytes
Versions: 111
Compression:
Stored size: 691 Bytes
Contents
module Acfs::Model # Provides method to check for loading state of resources. # A resource that is created but not yet fetched will be loaded # after running {Acfs::Global#run Acfs.run}. # # @example # user = User.find 5 # user.loaded? # => false # Acfs.run # user.loaded? # => true # module Loadable extend ActiveSupport::Concern # @api public # # Check if model is loaded or if request is still queued. # # @return [ Boolean ] True if resource is loaded, false otherwise. # def loaded? !!@loaded end # @api private # # Mark model as loaded. # def loaded! @loaded = true end end end
Version data entries
111 entries across 111 versions & 1 rubygems