把 application.js 放到 head 不是临时方案,而是正确方案。
opal 本来我觉得没什么用,直到我看到 https://github.com/asciidoctor/asciidoctor.js
triangle = <<EOF
*
* *
* *
* * * *
EOF
for line in triangle.lines
puts line
end
楼主你看,我可以用这个马甲给你回复
#3 楼 @joke1943 我不用 IDE,要推荐就是 https://www.jetbrains.com/ruby/ 了。
我现在用 https://atom.io/ 编辑器。
看到后半看不懂了,等 Passenger 的大大发文分析。
<h1>请假记录</h1>
<%= link_to 'New note’, new_notes_path %><!--这里出错,找不到原因,求助!-->
<table>
<tr>
<th>请假人</th>
<th>时间</th>
</tr>
<% @notes.each do |note| %>
<tr>
<td><%= note.name %></td>
<td><%= note.time %></td>
<td><%= link_to 'Show', note_path(note) %></td>
</tr>
<% end %>
</table>
如果楼主好好排版就能发现问题了。
#26 楼 @sickate 看来需要考古了,我本来以此为共识发这个话题的:
https://ruby-china.org/topics/9825 https://ruby-china.org/topics/9853
Angular 2 的模板类似这样:
<input type="text" [value]="firstName">
<button (click)="addPerson()">Add</button>
polymer 的模板(其实就是 HTML 标记)类似这样:
<my-counter counter="10">Points</my-counter>
不过实际上模板是隐藏在内部,类似一般的模板:
<template>
<style> /*...*/ </style>
<div id="label"><content></content></div>
Value: <span id="counterVal">{{counter}}</span><br>
<button on-tap="{{increment}}">Increment</button>
</template>
同样基于 Components,不见得要用 Angular。
::
是从顶层开始查找,如果没有 ::
就从当前域查找。需不需要 ::
取决于当前域有没有同名常量。
1.3 用户被无情抛弃,还跟着上 2.0 就是真爱。
我不懂怎么设置一个满足所有测试需求的 Fixture 数据集,FactoryGirl 可以在每个 test case 中独立。
paginate 算总页数的时候需要用到 count。