Other Rails Configuration Details
Last updated
Was this helpful?
Was this helpful?
yarn 'react', '16'
yarn 'react-dom', '16'
yarn 'react-router', '^5.0.0'
yarn 'react-router-dom', '^5.0.0'
yarn 'react_ujs', '^2.5.0'
yarn 'jquery', '^3.4.1' # this is only needed if using jquery
yarn 'create-react-class'# config/routes.rb
Rails.application.routes.draw do
# this route should be first in the routes file so it always matches'
mount Hyperstack::Engine => '/hyperstack' # you can use any path you choose
... get "hyperstack-page/(*others)", "hyperstack#comp_name" config.hyperstack.auto_config = false# This will prevent any data transmitted by HyperOperation from appearing in logs
config.filter_parameters << :hyperstack_secured_json
# Add the hyperstack directories
config.eager_load_paths += %W(#{config.root}/app/hyperstack/models)
config.eager_load_paths += %W(#{config.root}/app/hyperstack/models/concerns)
config.eager_load_paths += %W(#{config.root}/app/hyperstack/operations)
config.eager_load_paths += %W(#{config.root}/app/hyperstack/shared)
# But remove the outer hyperstack directory so rails doesn't try to load its
# contents directly
delete_first config.eager_load_paths, "#{config.root}/app/hyperstack" # add the hyperstack directories to the auto load paths
config.autoload_paths += %W(#{config.root}/app/hyperstack/models)
config.autoload_paths += %W(#{config.root}/app/hyperstack/models/concerns)
config.autoload_paths += %W(#{config.root}/app/hyperstack/operations)
config.autoload_paths += %W(#{config.root}/app/hyperstack/shared)
# except for the outer hyperstack directory
delete_first config.autoload_paths, "#{config.root}/app/hyperstack"