我正在使用TiddlyWiki的Node.js版本,我想链接到文件系统上的图像。
此处列出的文档无效。在[img[path]]标签中,对于路径部分,我放置了类似的东西,/Users/documents/ken/path_to_image.jpg但在提琴手中什么也没显示。
我的Wiki位于中/Users/documents/ken/wiki。
我试图写一个规范ApplicationHelper,但#link_to方法失败了.
这是我的规格:
require "spec_helper"
describe ApplicationHelper, type: :helper do
it "generates sortable links" do
helper.sortable("books") #just testing out, w/o any assertions... this fails
end
end
Run Code Online (Sandbox Code Playgroud)
以下是运行规范的输出:
1) ApplicationHelper generates sortable links
Failure/Error: helper.sortable("books") #just testing out, w/o any assertions... this fails
ActionController::UrlGenerationError:
No route matches {:sort=>"books", :direction=>"asc"}
# ./app/helpers/application_helper.rb:5:in `sortable'
Run Code Online (Sandbox Code Playgroud)
app/helpers/application_helper.rb(可排序方法)
module ApplicationHelper
def sortable(column, title = nil)
title ||= column.titleize
direction = (column == params[:sort] && params[:direction] == "asc") ? "desc" …Run Code Online (Sandbox Code Playgroud)