-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
I created a minimal example to show the error.
https://github.com/russ/shrine-failure-example/tree/master
Seems to be something with the plugin macros?
require "shrine"
require "shrine/plugins/determine_mime_type"
module Uploads
class Uploader < Shrine
load_plugin(
Shrine::Plugins::DetermineMimeType,
analyzer: Shrine::Plugins::DetermineMimeType::Tools::File
)
finalize_plugins!
def generate_location(_io : IO | UploadedFile, metadata, **options)
"/tmp/example"
end
end
end
file = File.open("shard.yml")
Uploads::Uploader.upload(file, "store")❯ crystal example.cr
Showing last frame. Use --error-trace for full trace.
In lib/shrine/src/shrine.cr:141:30
141 | {% for plugin in @type.constant(:PLUGINS) %}
^-------
Error: `for` expression must be an array, hash, tuple, named tuple or a range literal, not NilLiteral:
nil
franciscoGPS and jwoertink
Metadata
Metadata
Assignees
Labels
No labels