David Kimura PRO
Joined 7/18/2015
Drifting Ruby Owner
Ruby Rogues Panelist
David Kimura PRO said over 5 years ago on Authentication Crash Course with Devise :
Try setting the domain and use the url to https://note-book-diary.herokuapp.com/ So you'd need to update the host and the domain settings. You can check the Certificate within Chrome to see what the common name (or domain name) to see where the mismatch is.

David Kimura PRO said over 5 years ago on Refactoring Models :
Hello Steve, it really is the code organization which benefits from extracting the methods out. I've worked on similar applications in terms of size as the GitLab app and the fat models made it very difficult to work on. Grouping and moving ideas, like the friendships in the episode example, make the overall maintenance of the model easier over time. Yes, things are now in multiple files, but it ended up still being preferred over a large model. Ultimately, it does come down to the team's preference and their style of coding in which case I think should always be consistent on a per project basis. However, bringing a new person on board, it would be overwhelming to have to work in a large model like GitLab's user model. I consider most things, with exceptions, which makes something easier to maintain, lowering technical debt.

David Kimura PRO said over 5 years ago on Refactoring Models :
If by chance the token already exists then it will not generate the token. This probably would rarely happen on a small app with `SecureRandom.hex`, but on a larger table could be a concern. Another way to write it could be something like ``` def generate_token begin self.token = SecureRandom.hex end while self.class.exists?(token: token) end ```

David Kimura PRO said over 5 years ago on Refactoring Models :
Haha yes, good point. Sorry, I'm winding down for the night and obviously not thinking correctly.

David Kimura PRO said over 5 years ago on Non nested dynamic forms :
Do you have a use case in mind for this?