我使用ruby 1.9.3和redmine 1.4.4
根据这个 - > 请帮我发送一个jpg文件使用send_data,我在控制器中这样做:
@file = temp.path
File.open(@file, 'r') do |f|
send_data f.read, :filename => "myfile.pdf", :type => "application/pdf", :disposition => "attachment"
end
File.delete(@file)
Run Code Online (Sandbox Code Playgroud)
但它回来了ArgumentError (invalid byte sequence in UTF-8),为什么?
我使用AngularJS 1.7和ag-grid 18.0.1.
当我将angularCompileRows设置为true时,我在控制台中出现此错误:
Uncaught TypeError: Cannot read property '$apply' of null
at eval (rowRenderer.js:586)
Run Code Online (Sandbox Code Playgroud)
这是相应的代码(这是agGrid代码):
RowRenderer.prototype.checkAngularCompile = function () {
var _this = this;
// if we are doing angular compiling, then do digest the scope here
if (this.gridOptionsWrapper.isAngularCompileRows()) {
// we do it in a timeout, in case we are already in an apply
setTimeout(function () {
_this.$scope.$apply();
}, 0);
}
};
Run Code Online (Sandbox Code Playgroud)
在这里我的选择:
const gridOptions = {
rowData: null,
columnDefs: [...],
enableColResize: true,
onColumnResized: (params) => {
angularCompileRows: …Run Code Online (Sandbox Code Playgroud)