Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Using #as_json_methods instead of custom array

  • Loading branch information...
commit 2de373986f0c191615afbc3e327ea47902fbc193 1 parent 12e6f23
@Slotos Slotos authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  app/controllers/ckeditor/base_controller.rb
View
2  app/controllers/ckeditor/base_controller.rb
@@ -21,7 +21,7 @@ def respond_with_asset(asset)
callback = ckeditor_before_create_asset(asset)
if callback && asset.save
- result = asset.serializable_hash(:only => [:id, :type], :methods => [:url_content, :size, :url_thumb, :filename, :format_created_at])
+ result = asset.serializable_hash(:only => [:id, :type], :methods => asset.as_json_methods)
body = params[:CKEditor].blank? ? result.to_json : %Q"<script type='text/javascript'>
window.parent.CKEDITOR.tools.callFunction(#{params[:CKEditorFuncNum]}, '#{Ckeditor::Utils.escape_single_quotes(asset.url_content)}');
</script>"
Please sign in to comment.
Something went wrong with that request. Please try again.