[WIP] User authentication tutorial - ROM, Rails, Warden#177
[WIP] User authentication tutorial - ROM, Rails, Warden#177
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.
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.
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.
Ah, missed this one. Should be fixed
| end | ||
| ``` | ||
|
|
||
| After this, we will need to add ROM rake tasks in our Procfile |
|
|
||
| ```ruby | ||
| # app/repos/users_repo.rb | ||
| include BCrypt |
There was a problem hiding this comment.
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.