-
Notifications
You must be signed in to change notification settings - Fork 0
Rails with Webpack
This Ruby on Rails project uses Webpack instead of the default Asset Pipeline for JavaScript pre-processing and static asset management. Notice the project does not have a app/assets
directory and instead has app/javascripts
.
Good resources to get started:
Frontend components live in app/javascripts/components
. Any section of the frontend that can be reused in multiple places or uses javascript is a good candidate to be made into a component.
Throughout the frontend of the project you will see method calls of render
and render_component
. The difference is #render
allows you to show Rails partials that are located in the app/views
directory. #render_component
is a method which allows you to show components found in app/javascripts/components
.
To add your own component you can use our custom rails generator found at lib/generators/component_generator.rb
:
rails generate component <component-name>