Closed tmtrademarked closed 2 years ago
Hmm, that's a tough one. The entity plugin passes down arguments from the model method to Attacher#get
because the derivatives plugin overrides Attacher#get
with the ability to accept arguments. Technically, the derivatives plugin could probably override the model method to forward arguments, so that the entity plugin can define it with no arguments. I agree that getting an ArgumentError
down the chain can be misleading, so I'll look into this.
Brief Description
Attacher.get
doesn't accept arguments, but the entity definition defines a:name
method with args.Expected behavior
The entity plugin seems to define a method that aliases
attacher.get
which takes in arguments. So I'd expect to be able to callicon(:foo)
, for example. It seems like Shrine should either pass the arguments down the chain, or not claim to be able to accept them.Actual behavior
This call results in an errror:
Simplest self-contained example code to demonstrate issue
System configuration
Ruby version: 3.0.0
Shrine version: 3.4.0