diff options
author | Rhenium <rhenium@rhe.jp> | 2014-02-09 18:27:31 +0900 |
---|---|---|
committer | Rhenium <rhenium@rhe.jp> | 2014-02-09 18:27:31 +0900 |
commit | 5975ed19470c2eac079024fcafb56e18d6ecec74 (patch) | |
tree | 6c90ba08c94ab5f4f620f8c314c6b7d0425517e3 /config/application.rb | |
parent | 606054adb73efed232935073a219313e15aa4bba (diff) | |
download | aclog-5975ed19470c2eac079024fcafb56e18d6ecec74.tar.gz |
rewrite APIs with Grape and RABL
Diffstat (limited to 'config/application.rb')
-rw-r--r-- | config/application.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/config/application.rb b/config/application.rb index 8844010..8e8204f 100644 --- a/config/application.rb +++ b/config/application.rb @@ -6,7 +6,6 @@ require "action_controller/railtie" require "action_mailer/railtie" require "sprockets/railtie" # require "rails/test_unit/railtie" -require "./lib/apidoc" # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. @@ -18,6 +17,10 @@ module Aclog # Application configuration should go into files in config/initializers # -- all .rb files in that directory are automatically loaded. + # Configure grape + config.paths.add "app/api", eager_load: true + config.paths.add "app/api/concerns", eager_load: true + # Custom directories with classes and modules you want to be autoloadable. config.autoload_paths += Dir["#{config.root}/lib/", "#{config.root}/lib/**/"] @@ -42,5 +45,9 @@ module Aclog g.test_framework :rspec g.fixture_replacement :factory_girl end + + config.middleware.use(Rack::Config) do |env| + env["api.tilt.root"] = "#{config.root}/app/api/templates" + end end end |