lib/swaggard/engine.rb in swaggard-0.0.4 vs lib/swaggard/engine.rb in swaggard-0.1.0

- old
+ new

@@ -4,11 +4,17 @@ initializer 'swaggard.finisher_hook', :after => :finisher_hook do |app| app.reload_routes! Swaggard.configure do |config| - config.controllers_path = "#{app.root}/app/controllers/**/*.rb" - config.models_path = "#{app.root}/app/serializers/**/*.rb" + unless config.controllers_path + config.controllers_path = "#{app.root}/app/controllers/**/*.rb" + end + + unless config.models_paths + config.models_paths = ["#{app.root}/app/serializers/**/*.rb"] + end + config.routes = app.routes.routes end Swaggard.register_custom_yard_tags! end \ No newline at end of file