Sha256: 2874f326efc12a0541665b2d9722cea165394674c72bf32bfb682a5ad68e0536
Contents?: true
Size: 437 Bytes
Versions: 14
Compression:
Stored size: 437 Bytes
Contents
class ActiveadminSettings::PicturesController < ApplicationController before_filter :authenticate_admin_user! def index @pictures = ActiveadminSettings::Picture.all render :json => @pictures end def create @picture = ActiveadminSettings::Picture.new @picture.data = params[:file] if @picture.save render :json => { :filelink => @picture.url } else render :nothing => true end end end
Version data entries
14 entries across 14 versions & 1 rubygems