Ruby on Railsでファイルアップロード機能を作成してみました。 例外処理等は実装しておらず、基本的なCRUDのみですが、載せます。 まず、scaffoldを行い土台を作成します。 ruby script/generate scaffold image file_name:string content_type:string size:integer image_url:string 以下の様にMVCを変更しました。 images_controller.rb class ImagesController < ApplicationController # GET /images # GET /images.xml def index @images = Image.all respond_to do |format| format.html # index.html.erb for