luckyframework / luckyframework/avram
Allow Lucky::UploadedFile access in Avram::Params
Nobody has claimed this yet.
- Dominant language
- Crystal
- Stars
- 183
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
Within an operation, after I have passed in my `Lucky::Params` to a create or update method, the `Lucky::Params` get type coerced to `Avram::Params` both classes fulfill the `Avram::Paramable` contract. However, `Lucky::Params` also defines methods for getting a `Lucky::UploadedFile` whereas `Avram::Params` does not.
Adding the `get_file` and `get_file?` methods to the `Avram::Paramable` module could solve this. I also wonder if using the `Avram::Params` as a type of decorator could also help solve this by using a getter for access to `Lucky::Params` if access to that is needed for other methods specific to that class.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing Avram::Paramable and Avram::Params where Lucky::Params is coerced during create or update operations. Compare the existing Lucky::Params file-access methods, get_file and get_file?, and determine how they should remain available through the Avram interface; done means uploaded-file access works from those operations without breaking the contract.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- crystal
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100