Skip to content

Commit

Permalink
Add Rails 8 authentication generator
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromedalbert committed Feb 8, 2025
1 parent b2047c1 commit 2a27128
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
require "generators/factory_bot"
require "factory_bot_rails"

module FactoryBot
module Generators
class AuthenticationGenerator < Base
def create_fixture_file
template 'users.rb', 'test/factories/users.rb'
end
end
end
end
6 changes: 6 additions & 0 deletions lib/generators/factory_bot/authentication/templates/users.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FactoryBot.define do
factory :user do
email_address { "[email protected]" }
password_digest { "MyString" }
end
end

0 comments on commit 2a27128

Please sign in to comment.