add tiny_mce controller

This commit is contained in:
zmagod 2017-04-19 09:13:16 +02:00
parent c25df63a14
commit 37be04c09c

View file

@ -0,0 +1,16 @@
class TinyMceAssetsController < ApplicationController
def create
step = Step.find_by_id(params[:step])
image = Asset.create(file: params[:file],
created_by: current_user,
team: current_team)
image.file.reprocess_without_delay!(:full)
render json: {
image: {
url: view_context.image_url(image.url(:full))
}
}, content_type: 'text/html'
end
end