examples/render-binary.rb in capcode-render-binary-0.1.0 vs examples/render-binary.rb in capcode-render-binary-0.2.0
- old
+ new
@@ -15,9 +15,15 @@
class Image < Route '/image'
def get
render :binary => :image, :content_type => "image/png"
end
end
+
+ class Dwl < Route '/download'
+ def get
+ render :binary => :image, :content_type => "image/png", :content_disposition => "attachment; filename=my_image.png"
+ end
+ end
end
module Capcode::Views
def glop
html do
\ No newline at end of file