Sha256: 9adf008a1b9fb214eb244364db24e89f78a1272b312bd217776363023ad2b779
Contents?: true
Size: 984 Bytes
Versions: 2
Compression:
Stored size: 984 Bytes
Contents
Tori === "(\\( ⁰⊖⁰)/)" Tori is a very very simple file uploader. Tori dose nothing. Only file upload to backend store. You can upload file without alter database. # Quick start on Rails Gemfile ``` gem 'tori', require: 'tori/rails' ``` app/models/photo.rb ```ruby class Photo < ActiveRecord::Base tori :image end ``` app/controllers/photos_controller.rb ```ruby class PhotosController < ApplicationController def new @photo = Photo.new end def create Photo.create(photo_params) redirect_to root_path end private def photo_params params.require(:photo).permit(:image) end end ``` app/views/photos/new.html.slim ```ruby = form_for @photo, multipart: true |f| = f.file_field 'image' = f.button 'Upload' ``` # default configure [https://github.com/ksss/tori/blob/master/lib/tori.rb](https://github.com/ksss/tori/blob/master/lib/tori.rb) You can change configure any time. # future TODO - support background S3 Storage
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tori-0.0.3 | README.md |
tori-0.0.2 | README.md |