Documentation states in Basic Usage chapter that create_snapshot! has a keyword argument identifier:
post = Post.first
# Create snapshot grouped by identifier, only :identifier argument is required, all others are optional
snapshot = post.create_snapshot!(
identifier: "snapshot_1", # Required
user: current_user,
metadata: {
foo: :bar
},
)
But actually the contract of the method is the following: create_snapshot!(identifier, user: nil, metadata: nil). The first parameter is a simple argument (not a keyword argument).
Documentation states in Basic Usage chapter that
create_snapshot!
has a keyword argumentidentifier
:But actually the contract of the method is the following:
create_snapshot!(identifier, user: nil, metadata: nil)
. The first parameter is a simple argument (not a keyword argument).