Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

saxondale

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

saxondale

  • 0.0.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Saxondale

ETags for assets that are delivered with Rails controllers

#####Purpose

The assets in FedoraCommons are expensive to load. This gem uses Rails conventions to cache and compare the hashes of ETags.

#####Add to your Gemfile

  gem 'saxondale'

#####Examples

# app/controllers/image_controller.rb
etag :thumbnail

def thumbnail
  @image = Image.find(params[:id])
  authorize! :read, @image
  data_stream = @image.datastreams['thumbnail']
  send_data data_stream.content, 
    filename: 'thumbnail', 
    disposition: :inline, 
    type: ds.mimeType)
end
 # app/models/image.rb
  expire_etag :thumbnail
 

FAQs

Package last updated on 31 Mar 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc