Permalink
Browse files

Using #as_json_methods instead of custom array

  • Loading branch information...
Slotos committed Aug 26, 2011
1 parent 12e6f23 commit 2de373986f0c191615afbc3e327ea47902fbc193
Showing with 1 addition and 1 deletion.
  1. +1 −1 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>"

0 comments on commit 2de3739

Please sign in to comment.