You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+25Lines changed: 25 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -104,6 +104,31 @@ end
104
104
105
105
To update Swagger UI from its [distribution](https://github.com/wordnik/swagger-ui), run `bundle exec rake swagger_ui:dist:update`. Examine the changes carefully.
106
106
107
+
### Enabling in a Rails-API Project
108
+
109
+
The grape-swagger-rails gem uses the Rails asset pipeline for its Javascript and CSS. Enable the asset pipeline with [rails-api](https://github.com/rails-api/rails-api).
110
+
111
+
Add sprockets to `config/application.rb`.
112
+
113
+
```ruby
114
+
require'sprockets/railtie'
115
+
```
116
+
117
+
Include JavaScript in `app/assets/javascripts/application.js`.
118
+
119
+
```javascript
120
+
//
121
+
//= require_tree .
122
+
```
123
+
124
+
Include CSS stylesheets in `app/assets/stylesheets/application.css`.
0 commit comments