Sha256: 4d53b7a0506ded75e4d83aa22f1f04268361f241229d6a9608df46b1840419b7

Contents?: true

Size: 254 Bytes

Versions: 11

Compression:

Stored size: 254 Bytes

Contents

module  Crowdblog
  class AssetsController < Controller

    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

11 entries across 11 versions & 1 rubygems

Version Path
crowdblog-0.0.14 app/controllers/crowdblog/assets_controller.rb
crowdblog-0.0.13 app/controllers/crowdblog/assets_controller.rb
crowdblog-0.0.12 app/controllers/crowdblog/assets_controller.rb
crowdblog-0.0.10 app/controllers/crowdblog/assets_controller.rb
crowdblog-0.0.9 app/controllers/crowdblog/assets_controller.rb
crowdblog-0.0.8 app/controllers/crowdblog/assets_controller.rb
crowdblog-0.0.7 app/controllers/crowdblog/assets_controller.rb
crowdblog-0.0.6 app/controllers/crowdblog/assets_controller.rb
crowdblog-0.0.5 app/controllers/crowdblog/assets_controller.rb
crowdblog-0.0.4 app/controllers/crowdblog/assets_controller.rb
crowdblog-0.0.3 app/controllers/crowdblog/assets_controller.rb