🚨 Shai-Hulud Strikes Again:More than 500 packages and 700+ versions compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

qtousart-sortable_pictures

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

qtousart-sortable_pictures

bundlerRubygems
Version
1.0.0
Version published
Maintainers
1
Created
Source

sortable_pictures

You can manage & sort pictures

== Model class Model < ActiveRecord::Base sortable_pictures end

== Controller def create @model = Model.find params[:id] picture = Picture.new params[:picture] if picture.save sortable_pictures = picture.sortable_pictures.new sortable_picture.picturable = @model sortable_picture.save end end

== View <% @model.pictures.each do |picture| %> <%= image_tag(picture.public_filename :thumb) %> <% end %>

== initializers in RAILS_ROOT + config/initializers/sortable_pictures.rb

module SortablePictures def self.options { :storage => :file_system, :file_system_path => 'public/images/sortable_pictures', :content_type => 'image', :thumbnails => { :big => '500x500', :normal => '200x200', :small => '100x100', :thumb => '50x50' } } end end

FAQs

Package last updated on 10 Aug 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