How to a create a blog in Ruby on Rails API part 1

Building a blog is sort of a right-of-passage when learning to code. In this episode, we'll create a very simple post model and expose an API endpoint to display all of those blog posts. In the next episodes, we'll build out our frontend to display those, and then add create, update and delete.
🤯 Support on Patreon

⏱️ Timestamps:
  • 00:00 - Introduction
  • 00:35 - Migration
  • 01:35 - post model
  • 02:00 - Using Rails concerns and corresponding files
  • 04:45 - routes.rb
  • 05:15 - posts controller and spec

💌 Newsletter:

  • Twitter:
  • Twitter: m/programmingtil
  • GitHub:

  • Creating a post model

rails g migration createPosts
rake db:migrate


🎬 Subscribe!

My name is David W Parker and I’m creating and publishing videos on ProgrammingTIL to help teach anyone and everyone who wants to code. I’m a huge fan of Ruby on Rails, Svelte, TailwindCSS, and WebGL. I’ve used React a lot in the past, as well as some Vue and AngularJS. I’ve done some professional Python and Django. I like to create real applications and my tutorials will walk you through how to build something real from beginning-to-end.

ruby #rails #rubyonrails