Ruby Forwardable Module
In my web development journey I recently stumbled upon the Forwardable module. I’ve been making a concerted effort to learn and follow the object oriented design principles. In this case favor composition over inheritance. In other words instead of inheriting and exposing all of the…
5 SOLID Design Principles
In my journey to become a better developer I’m currently concentrating my efforts on design patterns and principles. I came across this video by Sandi Metz on how the 5 SOLID design principles apply to Ruby. SOLID is about managing the dependencies in your application. …
Polymorphic Associations
Had my first interview with Thoughtbot today. The interviewer asked me a question about how I would handle having comments for different objects in a discussion board (Posts, Images, Articles). My answer was to have a bunch of foreign keys under a comments model/table. …
Rails Routes
resources :photos HTTP Verb Path Action Used for GET /photos index-display a list of all photos GET /photos/new new-return an HTML form for creating a new photo POST /photoscreatecreate a new photo GET /photos/:id show-display a specific photo GET /photos/:id/edit edit-return an HTML form for…