Sha256: 1fa4b968a6e8a0a5dc57992bd9a80a1d8ddba439d9e2310234ab2bdd83e8a17d
Contents?: true
Size: 546 Bytes
Versions: 4
Compression:
Stored size: 546 Bytes
Contents
module Miniblog module Admin class AssetsController < Miniblog::Admin::BaseController # TODO: Skipping filters is the worst solution ever to this problem # Someone should fix the uploadify.js thing skip_before_filter :verify_authenticity_token, :only => :create skip_before_filter :authorize! def create @post = Post.find(params[:post_id]) asset = @post.assets.build asset.attachment = params['attachment'] asset.save! render json: asset end end end end
Version data entries
4 entries across 4 versions & 1 rubygems