Created
March 28, 2018 08:45
-
-
Save poustovitss/53456250c8ef8c8c2a5666749a7d482b to your computer and use it in GitHub Desktop.
How to create default CBRA (component based rails application)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| rails new app | |
| cd app | |
| rm -r app | |
| mkdir components | |
| rails plugin new components/app_component --full --mountable | |
| cd components/app_component | |
| rails g controller welcome index | |
| fix app.component.gemspec | |
| nano /components/app_component/config/routes.rb | |
| add there: «root to: "welcome#index» | |
| go to the top app and add component to GEMFILE: | |
| « gem "app_component", path: "components/app_component» | |
| got to the top app and add component to routes.rb: | |
| «mount AppComponent::Engine, at: "/» |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment