DEV Community

Saral Karki
Saral Karki

Posted on

Rails! Here I come (Day #4)

As planned, I set out to create a user login and registration page for my blog today. These would require authentication at various stages, and I intended to build it from scratch, without the use of any gem. Although, in hindsight, it would not have made much of a difference whether I used a gem or not, because, either way, I would have struggled to really internalize and understand the concept of registration, user authentication and sessions.

Today's post, therefore, will be more about the process, my struggle rather than the actual code itself, because truly speaking even though, I was able to get the authentication working, I have not understood how it was implemented, and therefore, it makes no sense to talk about the actual code.

The day started great though after my achievements(if I can call it that) from yesterday. I created the user page and a registration page and started working in a different git branch. I followed the process that had enabled me to create posts and store it in the database. Following that very process, I was able to register a user into my database, and it was then I realized - I had no idea how I was going to code the authentication bit. I looked around for tutorials and found one that would help me get through the process of creating the registration and login page from scratch. "I will really try and understand the code", I thought. But alas! It was not to be. I was not able to internalize and understand what was happening. There were moments where I did feel I had gotten a grasp of the concept, but then again I was not sure enough. I, therefore, have decided to have another go at it tomorrow. I really need to read between the lines and understand what is happening. Furthermore, I also felt I have been having a go at Rails without having any Ruby knowledge whatsoever. So, I have decided to also go and look at Ruby. Whilst, I will go ahead with my app and build it, I will also take the time to learn Ruby basics. This I believe will help me connect the dots.

If you have any advice for this Ruby on Rails newbie then I am all ears. Thank you

Top comments (0)