Active Record
Association-style accessors: has_future
has_futureclass Post < ApplicationRecord
has_future :draft, PostDraft
end
post = Post.find(params[:id])
post.draft.title = "nihil admirari"
post.draft.saveclass Post < ApplicationRecord
has_future :draft, PostDraft, key: ->(p) { "posts:#{p.id}:draft" }
end Creating or updating from an Active Record model
Creating or updating from an All Futures model
Cache Keys
Excluding attributes
Last updated