mikker / passwordless

๐Ÿ— Authentication for your Rails app without the icky-ness of passwords
MIT License
1.26k stars 85 forks source link

Add a simple view generator for #64 #123

Closed nickhammond closed 2 years ago

nickhammond commented 2 years ago

This utilizes Thor's copy_file method which utilizes the same generator flow of copying a file and checking for conflicts if the view files already exist. This mirrors exactly what's currently in the readme for utilizing your own views and I've added a mention to this generator task as well.

$ rails generate passwordless:views
   identical  app/views/passwordless/mailer/magic_link.text.erb
   identical  app/views/passwordless/sessions/new.html.erb
    conflict  app/views/passwordless/sessions.create.html.erb
Overwrite /Users/nick/src/sandbox/blah/app/views/passwordless/sessions.create.html.erb? (enter "h" for help) [Ynaqdhm] y
       force  app/views/passwordless/sessions.create.html.erb
mikker commented 2 years ago

This is wonderful!

mikker commented 2 years ago

โค๏ธ๐Ÿงก๐Ÿ’›๐Ÿ’š๐Ÿ’™๐Ÿ’œ