Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #584 from goldcaddy77/readme-agnostic-paths

README: more consistent delimiter agnostic paths
  • Loading branch information...
commit 4665792092763fc0f5c63da8c6cff87494a8bd2d 2 parents f7ce50d + 912ef8e
Daniel Doubrovkine (dB.) @dblockdotorg dblock authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 README.md
6 README.md
View
@@ -169,8 +169,8 @@ run Rack::Cascade.new [API, Web]
Place API files into `app/api` and modify `application.rb`.
```ruby
-config.paths.add "app/api", glob: "**/*.rb"
-config.autoload_paths += Dir["#{Rails.root}/app/api/*"]
+config.paths.add File.join('app', 'api'), glob: File.join('**', '*.rb')
+config.autoload_paths += Dir[Rails.root.join('app', 'api', '*')]
```
Modify `config/routes`:
@@ -1560,7 +1560,7 @@ Create `config/initializers/reload_api.rb`.
if Rails.env.development?
ActiveSupport::Dependencies.explicitly_unloadable_constants << "Twitter::API"
- api_files = Dir["#{Rails.root}/app/api/**/*.rb"]
+ api_files = Dir[Rails.root.join('app', 'api', '**', '*.rb')]
api_reloader = ActiveSupport::FileUpdateChecker.new(api_files) do
Rails.application.reload_routes!
end
Please sign in to comment.
Something went wrong with that request. Please try again.