Sha256: db8f250ae43d4d020ea85f020018e76f1f3f3db19bd35ae46abf194ef827badc
Contents?: true
Size: 477 Bytes
Versions: 2
Compression:
Stored size: 477 Bytes
Contents
module Crowdblog class AssetsController < Controller # 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['Filedata'] asset.save! render json: asset end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
crowdblog-0.0.16 | app/controllers/crowdblog/assets_controller.rb |
crowdblog-0.0.15 | app/controllers/crowdblog/assets_controller.rb |