Skip to content

Releases: jetrockets/shrine.cr

Shrine::UploadedFile#download

12 Nov 04:35
Compare
Choose a tag to compare

Added Shrine::UploadedFile#download.

Plugin System

29 Oct 14:47
Compare
Choose a tag to compare

Improvements

  • Added ability to extend Shrine with plugins
module FooPlugin
  # This will extend your uploader class methods
  module ClassMethods;      def foo; "plugin_foo"; end; end
  # This will included into your uploader instance methods
  module InstanceMethods;   def foo; "plugin_foo"; end; end
  
  # This will extend <YourUploader>::UploadedFile class methods
  module FileClassMethods;  def foo; "plugin_foo"; end; end
  # This will included into <YourUploader>::UploadedFile instance methods
  module FileMethods;       def foo; "plugin_foo"; end; end
end

class Shrine
  load_plugin ::FooPlugin
  create_plugins_class_method
end