diff --git a/app/controller/redactor_rails/documents_controller.rb b/app/controller/redactor_rails/documents_controller.rb index 41b401c3..abec6a05 100644 --- a/app/controller/redactor_rails/documents_controller.rb +++ b/app/controller/redactor_rails/documents_controller.rb @@ -1,10 +1,10 @@ class RedactorRails::DocumentsController < ApplicationController - before_filter :redactor_authenticate_user! + before_action :redactor_authenticate_user! def index @documents = RedactorRails.document_model.where( RedactorRails.document_model.new.respond_to?(RedactorRails.devise_user) ? { RedactorRails.devise_user_key => redactor_current_user.id } : { }) - render :json => @documents.to_json + render json: @documents.to_json end def create @@ -18,7 +18,7 @@ def create end if @document.save - render :text => { :filelink => @document.url, :filename => @document.filename }.to_json + render plain: { filelink: @document.url, filename: @document.filename }.to_json else render json: { error: @document.errors } end diff --git a/app/controller/redactor_rails/pictures_controller.rb b/app/controller/redactor_rails/pictures_controller.rb index 04c59fe2..e76a300a 100644 --- a/app/controller/redactor_rails/pictures_controller.rb +++ b/app/controller/redactor_rails/pictures_controller.rb @@ -1,10 +1,10 @@ class RedactorRails::PicturesController < ApplicationController - before_filter :redactor_authenticate_user! + before_action :redactor_authenticate_user! def index @pictures = RedactorRails.picture_model.where( RedactorRails.picture_model.new.respond_to?(RedactorRails.devise_user) ? { RedactorRails.devise_user_key => redactor_current_user.id } : { }) - render :json => @pictures.to_json + render json: @pictures.to_json end def create @@ -18,7 +18,7 @@ def create end if @picture.save - render :text => { :filelink => @picture.url }.to_json + render plain: { filelink: @picture.url }.to_json else render json: { error: @picture.errors } end diff --git a/vendor/assets/javascripts/redactor-rails/plugins/filemanager.js b/vendor/assets/javascripts/redactor-rails/plugins/filemanager.js index 9f2fac8a..a6fe524c 100755 --- a/vendor/assets/javascripts/redactor-rails/plugins/filemanager.js +++ b/vendor/assets/javascripts/redactor-rails/plugins/filemanager.js @@ -33,7 +33,7 @@ if (!RedactorPlugins) var RedactorPlugins = {}; var ul = $('