o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1335834736.269024: @value"‰{I" class:EFI"ProcessedAsset;FI"logical_path;F"%active_admin/editor/quicksave.jsI" pathname;F"i/Users/ericholmes/Source/active_admin_editor/app/assets/javascripts/active_admin/editor/quicksave.jsI"content_type;FI"application/javascript;FI" mtime;FI"2012-04-30T17:57:36-07:00;FI" length;Fi8I" digest;F"%b5b4fa31f041018b0839865a242c91d6I" source;FI"8(function($) { $(function(){ var button = $('.button.quicksave'); button.click(function(e) { e.preventDefault(); $.ajaxSetup({ beforeSend: function(xhr) { xhr.setRequestHeader('X-CSRF-Token', $('meta[name="csrf-token"]').attr('content')); } }); var form = $(this).closest('form'); var url = form.attr('action'); var textarea = $(this).closest('.active_admin_editor').find('textarea'); var fields = textarea.attr('id').split('_'); var content = textarea.val(); var data = { _method: 'PUT' }; data[fields[0]] = {}; data[fields[0]][fields[1]] = content; $.ajax({ url: url, type: 'POST', dataType: 'json', data: data, success: function(response) { console.log('saved'); } }); }); }); })(jQuery); ;FI"dependency_digest;F"%7d6b3b025447780ffa7740a293fc839eI"required_paths;F["i/Users/ericholmes/Source/active_admin_editor/app/assets/javascripts/active_admin/editor/quicksave.jsI"dependency_paths;F[{I" path;F"i/Users/ericholmes/Source/active_admin_editor/app/assets/javascripts/active_admin/editor/quicksave.jsI" mtime;FI"2012-04-30T17:57:36-07:00;FI" digest;F"%b5b4fa31f041018b0839865a242c91d6I" _version;F"%aa7d0db7619379e13b08335dee027df2