Skip to content

Commit 57ddb9d

Browse files
committed
Add Rails 8 authentication generator
1 parent b2047c1 commit 57ddb9d

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
require "generators/factory_bot"
2+
require "factory_bot_rails"
3+
4+
module FactoryBot
5+
module Generators
6+
class AuthenticationGenerator < Base
7+
def create_fixture_file
8+
template "users.rb", "test/factories/users.rb"
9+
end
10+
end
11+
end
12+
end
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FactoryBot.define do
2+
factory :user do
3+
email_address { "[email protected]" }
4+
password_digest { "MyString" }
5+
end
6+
end

0 commit comments

Comments
 (0)