Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate page scaffolding #10

Open
FTLam11 opened this issue Jul 7, 2022 · 0 comments
Open

Generate page scaffolding #10

FTLam11 opened this issue Jul 7, 2022 · 0 comments

Comments

@FTLam11
Copy link
Contributor

FTLam11 commented Jul 7, 2022

Context

There is some setup required to start using RailsPages. Here are a few things I had to do:

  • Create a page controller to setup the appropriate asset packs
  • Create the javascript pack to load pages and locale files
  • Create the page controller/Vue/locale files
  • Mount the page controller routes
  • Create a feature spec

I think it would be nice to run a command to automatically create this scaffolding, perhaps something like this:

rails generate page card_application --driver=komoju_card --scope=merchant

And this would create the required files:

  • drivers/komoju_card/app/controllers/komoju_card/pages_controller.rb
  • drivers/komoju_card/app/frontend/packs/card_application.js
  • drivers/komoju_card/app/pages/komoju_card/merchant/card_application/page.rb
  • drivers/komoju_card/app/pages/komoju_card/merchant/card_application/page.vue
  • drivers/komoju_card/app/pages/komoju_card/merchant/card_application/page.yml
  • drivers/komoju_card/config/routes.rb
  • drivers/spec/features/merchant/card_application_spec.rb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant