Rails Generators provided by Compony
To make your life easier and coding faster, Compony comes with two generators:
rails g component Users::Newwill createapp/components/users/new.rband, since the component's name coincides with a a pre-built component, automatically inherit from that. If the name is unknown, the generated component will inherit formCompony::Componentinstead. The generator also equips generated components with the boilerplate code that wil be required to make the component work.- The generator can also be called via its alternative form
rails g component users/new.
- The generator can also be called via its alternative form
rails g components Userswill generate a set of the most used components.
Support for custom base components
Generators will automatically detect your BaseComponents (see Inheritance: best practice).