Mochi
  • Introduction
  • Installation
  • Usage
  • Guides
    • Configuration
    • Authenticable
      • Introduction
      • CLI Installation
      • Manual Installation
      • Views
        • Layouts
          • _session.ecr
        • Session
          • new.ecr
        • User
          • edit.ecr
          • show.ecr
          • new.ecr
      • Models
        • granite_user.cr
        • jennifer_ser.cr
      • Controllers
        • user_controller.cr
        • session_controller.cr
      • Pipes
        • authenticate.cr
    • Confirmable
      • Introduction
      • CLI Installation
      • Manual Installation
      • Controllers
        • registration_controller.cr
      • Mailers
        • confirmation_mailer.ecr
        • confirmation_mailer.text.ecr
    • Trackable
      • Introduction
      • CLI Installation
      • Manual Installation
    • Omniauthable
      • Introduction
      • CLI Installation
      • Manual Installation
    • Recoverable
      • Introduction
      • CLI Installation
      • Manual Installation
      • Controllers
        • registration_controller.cr
      • Mailers
        • confirmation_mailer.ecr
        • confirmation_mailer.text.ecr
    • Mochi Mailer
  • Roadmap
  • Contributing
  • Contributors
Powered by GitBook
On this page

Was this helpful?

  1. Guides
  2. Confirmable

CLI Installation

  1. Run the generator in console depending on your ORM:

    Granite:

     mochi g confirm user granite

    or

    Jennifer:

     mochi g confirm user jennifer
  2. Migrate:

    Granite:

     amber db migrate

    or

    Jennifer:

     crystal sam.cr -- db:migrate
  3. Mixin the required modules:

    Granite:

    Add :confirmable to your mochi_granite macro call

     mochi_granite(:confirmable)

    or

    Jennifer:

    Add :confirmable to your mochi_jennifer macro call

     mochi_jennifer(:confirmable)
  4. Configure SMTP - Please follow amber guides for this.

Note: Amber will print out the token in console even if smtp is disabled. Find it, and paste with your_url/registration/confrim?token= to activate an account if you don't want to configure smtp on local.

Pro Tip: Install icr, start it, and input require "./config/application" and then pp User.find(1) and you can copy/paste the token.

  1. Done!

PreviousIntroductionNextManual Installation

Last updated 5 years ago

Was this helpful?