X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/a59152e34814f453a7380e68a55534e2f8922d57..60f89f0b235ac6b2729166e4bf4c04da3b9c1670:/apps/workbench/config/application.rb diff --git a/apps/workbench/config/application.rb b/apps/workbench/config/application.rb index 107c0cd9e0..891dd432c0 100644 --- a/apps/workbench/config/application.rb +++ b/apps/workbench/config/application.rb @@ -1,15 +1,14 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + require File.expand_path('../boot', __FILE__) require 'rails/all' -if defined?(Bundler) - # If you precompile assets before deploying to production, use this line - Bundler.require(*Rails.groups(:assets => %w(development test))) - # If you want your assets lazily compiled in production, use this line - # Bundler.require(:default, :assets, Rails.env) -end +Bundler.require(:default, Rails.env) -module Vcffarm +module ArvadosWorkbench class Application < Rails::Application # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config/initializers @@ -17,6 +16,7 @@ module Vcffarm # Custom directories with classes and modules you want to be autoloadable. # config.autoload_paths += %W(#{config.root}/extras) + config.autoload_paths += %W(#{config.root}/lib) # Only load the plugins named here, in the order given (default is alphabetical). # :all can be used as a placeholder for all plugins not explicitly named. @@ -47,16 +47,17 @@ module Vcffarm # like if you have constraints or database-specific column types # config.active_record.schema_format = :sql - # Enforce whitelist mode for mass assignment. - # This will create an empty whitelist of attributes available for mass-assignment for all models - # in your app. As such, your models will need to explicitly whitelist or blacklist accessible - # parameters by using an attr_accessible or attr_protected declaration. - config.active_record.whitelist_attributes = true - # Enable the asset pipeline config.assets.enabled = true # Version of your assets, change this if you want to expire all your assets config.assets.version = '1.0' + + # npm-rails loads top-level modules like window.Mithril, but we + # also pull in some code from node_modules in application.js, like + # mithril/stream/stream. + config.assets.paths << Rails.root.join('node_modules') end end + +require File.expand_path('../load_config', __FILE__)