小编Ken*_*ien的帖子

如何链接到Tiddlywiki的Node.js版本上的本地图像?

我正在使用TiddlyWiki的Node.js版本,我想链接到文件系统上的图像。

此处列出的文档无效。在[img[path]]标签中,对于路径部分,我放置了类似的东西,/Users/documents/ken/path_to_image.jpg但在提琴手中什么也没显示。

我的Wiki位于中/Users/documents/ken/wiki

tiddlywiki node.js tiddlywiki5

5
推荐指数
1
解决办法
2469
查看次数

如何从屏幕录像#228为Ryan Bates的助手写一个RSpec测试?

我跟着Ryan Bates关于可排序表格列的教程.

我试图写一个规范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)

rspec ruby-on-rails

2
推荐指数
1
解决办法
819
查看次数

标签 统计

node.js ×1

rspec ×1

ruby-on-rails ×1

tiddlywiki ×1

tiddlywiki5 ×1