File tree 3 files changed +2
-15
lines changed
3 files changed +2
-15
lines changed Original file line number Diff line number Diff line change 1
1
#### Next
2
2
3
+ * Automatically require 'grape/rabl'. [ #39 ] ( https://github.com/LTe/grape-rabl/issues/39 ) [ @martinezcoder ] ( https://github.com/martinezcoder )
3
4
* Your contribution here.
4
5
5
6
#### v0.4.0
Original file line number Diff line number Diff line change @@ -23,18 +23,9 @@ And then execute:
23
23
24
24
## Usage
25
25
26
- ### Require grape-rabl
27
-
28
- ``` ruby
29
- # config.ru
30
- require ' grape/rabl'
31
- ```
32
-
33
26
### Setup view root directory
34
27
``` ruby
35
28
# config.ru
36
- require ' grape/rabl'
37
-
38
29
use Rack ::Config do |env |
39
30
env[' api.tilt.root' ] = ' /path/to/view/root/directory'
40
31
end
@@ -78,8 +69,6 @@ You can override the default layout conventions:
78
69
79
70
``` ruby
80
71
# config.ru
81
- require ' grape/rabl'
82
-
83
72
use Rack ::Config do |env |
84
73
env[' api.tilt.root' ] = ' /path/to/view/root/directory'
85
74
env[' api.tilt.layout' ] = ' layouts/another'
@@ -94,8 +83,6 @@ You can enable template caching:
94
83
95
84
``` ruby
96
85
# config.ru
97
- require ' grape/rabl'
98
-
99
86
Grape ::Rabl .configure do |config |
100
87
config.cache_template_loading = true # default: false
101
88
end
@@ -114,8 +101,6 @@ get "/home", :rabl => "view.rabl"
114
101
115
102
``` ruby
116
103
# config.ru
117
- require ' grape/rabl'
118
-
119
104
use Rack ::Config do |env |
120
105
env[' api.tilt.root' ] = ' /path/to/view/root/directory'
121
106
end
Original file line number Diff line number Diff line change 1
1
require 'rabl'
2
2
require 'grape'
3
3
require 'hashie/hash'
4
+ require 'grape/rabl'
4
5
require 'grape-rabl/tilt'
5
6
require 'grape-rabl/version'
6
7
require 'grape-rabl/formatter'
You can’t perform that action at this time.
0 commit comments