-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] User authentication tutorial - ROM, Rails, Warden #177
base: main
Are you sure you want to change the base?
Conversation
# <= migration file created db/migrate/20161109173831_create_users.rb | ||
``` | ||
|
||
Let's open up our migration file and add the following lines: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you gotta add an empty line here, for some reason middleman doesn't render html correctly without it
# <= db:migrate executed | ||
``` | ||
|
||
Once that is done, we can start working on our repositories and rom components. Let's add schema file first: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here as well, and in all other places, basically there must always be an empty line between a line of text and code block syntax
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, missed this one. Should be fixed
end | ||
``` | ||
|
||
After this, we will need to add ROM rake tasks in our Procfile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Procfile => Rakefile :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
```ruby | ||
# app/repos/users_repo.rb | ||
include BCrypt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you replace this with require "bcrypt/password"
and use fully qualified BCrypt::Password
later on?
So this is really nice, but I'd like to figure out how to avoid |
@solnic Yeah, I think that is true - dry-container would be great to have in this mix, because having |
@janjiss we could try to add a dry-container/auto_inject based setup and just see if it doesn't look too overwhelming. If I had time I would really rebuild rom-rails on top of dry-system but for now we just have to stick to what we have. Re validation, yeah having a simple schema would be a nice and gentle into to dry-validation at the same time. We could see how it looks :) (should look pretty gooood). |
@solnic Got it. I will write this up in next couple of days. |
No description provided.