Commit e9472c809b31331c45f3f4c8526a285f23f03397
1 parent
8a3a7150
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
First step to allow API reload
Showing
1 changed file
with
6 additions
and
1 deletions
Show diff stats
lib/noosfero/api/api.rb
1 | 1 | require 'grape' |
2 | 2 | #require 'rack/contrib' |
3 | 3 | |
4 | -Dir["#{Rails.root}/lib/noosfero/api/*.rb"].each {|file| require file unless file =~ /api\.rb/} | |
4 | +if Rails.env == "production" | |
5 | + Dir["#{Rails.root}/lib/noosfero/api/*.rb"].each {|file| require file unless file =~ /api\.rb/} | |
6 | +else | |
7 | + Dir["#{Rails.root}/lib/noosfero/api/*.rb"].each {|file| load file unless file =~ /api\.rb/} | |
8 | +end | |
9 | + | |
5 | 10 | module Noosfero |
6 | 11 | module API |
7 | 12 | class API < Grape::API | ... | ... |