Sha256: e0bf33f897951b5f570703467a776d022c5cd388b3a4e4217b8450ba8bd0157c
Contents?: true
Size: 560 Bytes
Versions: 6
Compression:
Stored size: 560 Bytes
Contents
module Amalgam class Admin::EditorController < Admin::BaseController def update ContentPersistence.save(params[:content]) if params[:content] respond_to do |format| format.json {render :text => '{}'} format.js { render :text => 'Mercury.trigger("saved")' } end end # POST /images.json def upload_image @image = Attachment.new(params[:image]) respond_to do |format| if @image.save format.json { render :json => @image } end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems