File tree Expand file tree Collapse file tree 6 files changed +9
-8
lines changed Expand file tree Collapse file tree 6 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -28,9 +28,9 @@ get '/' do
28
28
end
29
29
```
30
30
31
- This will render ./views/index.erb:
31
+ This will render ` ./views/index.erb ` :
32
32
33
- ``` ruby
33
+ ``` erb
34
34
<% for post in @posts %>
35
35
<h1><%= post.title %></h1>
36
36
<% end %>
Original file line number Diff line number Diff line change @@ -52,9 +52,9 @@ get '/posts/:title' do
52
52
end
53
53
```
54
54
55
- This will render ./views/posts.erb:
55
+ This will render ` ./views/posts.erb ` :
56
56
57
- ``` ruby
57
+ ``` erb
58
58
<% for post in @posts %>
59
59
<div>
60
60
<h1><%= post.title %></h1>
Original file line number Diff line number Diff line change 42
42
43
43
Finally, the view at ` ./view/index.html ` :
44
44
45
- ``` ruby
45
+ ``` erb
46
46
<% @posts.each do |post| %>
47
47
<h3><%= post.title %></h3>
48
48
<p><%= post.body %></p>
Original file line number Diff line number Diff line change @@ -48,9 +48,9 @@ get '/posts/:title' do
48
48
end
49
49
```
50
50
51
- This will render ./views/index.erb:
51
+ This will render ` ./views/index.erb ` :
52
52
53
- ``` ruby
53
+ ``` erb
54
54
<% for post in @posts %>
55
55
<h1><%= post.title %></h1>
56
56
<% end %>
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ require 'sequel'
12
12
Use a simple in-memory DB:
13
13
14
14
``` ruby
15
+ require ' sqlite3'
15
16
DB = Sequel .sqlite
16
17
```
17
18
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ Features from Cucumber and Webrat
3
3
4
4
** A Feature Example**
5
5
6
- ```
6
+ ``` gherkin
7
7
Feature: View my page
8
8
In order for visitors to feel welcome
9
9
We must go out of our way
You can’t perform that action at this time.
0 commit comments