<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: gabbinguyen</title>
    <description>The latest articles on DEV Community by gabbinguyen (@gabbinguyen).</description>
    <link>https://dev.to/gabbinguyen</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F522496%2Fcdb3caf8-ee50-4eac-8431-e3bada38bbd0.jpeg</url>
      <title>DEV Community: gabbinguyen</title>
      <link>https://dev.to/gabbinguyen</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gabbinguyen"/>
    <language>en</language>
    <item>
      <title>Let's Git It</title>
      <dc:creator>gabbinguyen</dc:creator>
      <pubDate>Fri, 29 Jan 2021 17:08:26 +0000</pubDate>
      <link>https://dev.to/gabbinguyen/let-s-git-it-13m6</link>
      <guid>https://dev.to/gabbinguyen/let-s-git-it-13m6</guid>
      <description>&lt;p&gt;At one point a codenewbie, I found myself thoroughly confused by git commands, how to use them, when to use them, and so on. While there's many online resources outlining the commands, most of what I found wasn't 'beginner-friendly' or robust enough for my liking. In short, the documentation confused me even more. It seemed to me as if the people who wrote the docs were simply trying to help &lt;em&gt;themselves&lt;/em&gt; remember the commands, as opposed to teaching a newbie what the commands meant. &lt;/p&gt;

&lt;p&gt;For any code beginner stumbling across my blog, this post is for you! This is git, simplified. &lt;/p&gt;

&lt;h4&gt;
  
  
  Git Clone
&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;git clone&lt;/em&gt; is used to target an existing Git repository and make a clone of that to exist on your local machine. You are able to sync the local clone to the remote with a few commands (which I will go over later in the post). After cloning it, you can &lt;em&gt;cd&lt;/em&gt; into the directory to begin coding. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fygeyml5bq8712ls0l2mq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fygeyml5bq8712ls0l2mq.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Git Checkout
&lt;/h4&gt;

&lt;p&gt;Speaking of new branches, &lt;em&gt;git checkout&lt;/em&gt; is used to create a new branch. The command for that is &lt;em&gt;git checkout -b "your-branch-name-here"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fn1rdh2mkjuac7obd1d9s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fn1rdh2mkjuac7obd1d9s.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Git Branch
&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;git branch&lt;/em&gt; is a command used to check which branch you are currently working out of. A use case for this is when you're working on multiple features with other collaborators, you don't necessarily want to be working off the same branch. To keep things from getting mixed up or from breaking, you want to checkout a new branch to code your portion of the project. In this case, it's good practice to check what branch you're in just in case before pushing any changes. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fahr9he62sodprd5ragq7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fahr9he62sodprd5ragq7.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Git Add
&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;git add&lt;/em&gt; isn't quite the same as a traditional 'save' command. &lt;em&gt;git add&lt;/em&gt; sends all the changes made to the staging area, which then is able to be saved with a different command. There are different types of &lt;em&gt;add&lt;/em&gt; commands that stage certain pieces of information: &lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F61mvi38cab80ldle2x6b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F61mvi38cab80ldle2x6b.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Git Commit
&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;git commit&lt;/em&gt; is the command used to save your local copy of the project. The most commonly used command is &lt;em&gt;git commit -m "your-message-here"&lt;/em&gt; where you include a message of any changes your made. &lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fqsoamadkoql1jzkro8kg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fqsoamadkoql1jzkro8kg.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Git Push
&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;git push&lt;/em&gt; is the command used to upload the local saved changes to the remote repository. After you push, it allows other collaborators to pull your branch, merge your changes with theirs, and work with the modifications you made. &lt;/p&gt;

&lt;h4&gt;
  
  
  Git Pull
&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;git pull&lt;/em&gt; fetches any commits from the remote branch and allows you to merge it with your branch. When you're collaborating with others, the command you'll be using frequently will be &lt;em&gt;git pull origin "name-of-branch-you-are-wanting-to-pull-from&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;In this example, my project partner's branch is called 'testbranch.' I want to merge what they have with my portion of the project in my own working branch, so I call testbranch at the end of the pull command. &lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fcnmma3ikdb6axzr7kwhw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fcnmma3ikdb6axzr7kwhw.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This pull command only merges the work on your local copy. To share the merged work with the rest of your team, you will then add, commit, and push this newly merged branch for others to pull from. &lt;/p&gt;

&lt;p&gt;These are just the basics git commands; while there's many more that you can utilize, having a good understanding of the basics will help any beginner get a jump start into collaboration. Happy coding! &lt;/p&gt;

&lt;p&gt;References: &lt;br&gt;
-&lt;a href="https://stackoverflow.com/questions/572549/difference-between-git-add-a-and-git-add?rq=1" rel="noopener noreferrer"&gt;https://stackoverflow.com/questions/572549/difference-between-git-add-a-and-git-add?rq=1&lt;/a&gt;&lt;br&gt;
-&lt;a href="https://www.atlassian.com/git/tutorials/saving-changes" rel="noopener noreferrer"&gt;https://www.atlassian.com/git/tutorials/saving-changes&lt;/a&gt;&lt;/p&gt;

</description>
      <category>git</category>
      <category>codenewbie</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Great Expectations: Flatiron Software Engineering Program </title>
      <dc:creator>gabbinguyen</dc:creator>
      <pubDate>Fri, 29 Jan 2021 04:17:26 +0000</pubDate>
      <link>https://dev.to/gabbinguyen/great-expectations-flatiron-software-engineering-program-2i01</link>
      <guid>https://dev.to/gabbinguyen/great-expectations-flatiron-software-engineering-program-2i01</guid>
      <description>&lt;p&gt;It's the day before my graduation from Flatiron School's software engineering program, and as I approach the end of this grueling 3.5ish month journey, I can't help but to reflect on the progress I've made: from playing around on freecodecamp.com in my spare time, to now being able to build a fully functioning website, involving solo coding a backend and frontend, in less than 3 weeks. &lt;/p&gt;

&lt;p&gt;I just made it sound effortless and easy, but in reality, what got me to where I am today was 40-50 hours a week (at least) of watching code lectures, practicing coding, and coding with other newbies. That's a whole lot of coding, and it's practically a full time job! And like most full time jobs, this experience came with its highs and lows. &lt;/p&gt;

&lt;p&gt;To give the reader some perspective, I started out with practically zero coding knowledge; I changed the font once on my Myspace layout and that's about as far as I ever ventured into the coding realm until the summer of 2020, also known as the year when Covid-19 decided to rear its ugly head and wiped out any prospects of in-person &lt;em&gt;anything&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;In simpler terms, social distancing took effect and remote learning became ubiquitous, so in turn, we had to adapt to the shortcomings that came along with it. Learning how to code is already tough as it is, but losing the class dynamic only made it that much harder. &lt;/p&gt;

&lt;p&gt;There was a sharp learning curve in the beginning, and now that it's all said and done, there's a few things I wish I understood about the bootcamp before going into it, so for anyone toying with the idea of applying to Flatiron, this post is for you. If you just recently got accepted - congrats! Hopefully this post can be of help to you too. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Curriculum breakdown&lt;/strong&gt; &lt;br&gt;
The 15-week program is broken into five 3-week phases where you learn the following fundamentals: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Ruby &lt;/li&gt;
&lt;li&gt;Ruby on Rails &lt;/li&gt;
&lt;li&gt;Javascript &lt;/li&gt;
&lt;li&gt;React &lt;/li&gt;
&lt;li&gt;Final capstone project (technically not a fundamental but will take 3 weeks)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Ok, rewind - what was all that gibberish? Ruby and Javascript are programming languages, the foundation of what we build our web applications off of, whereas Ruby on Rails (or Rails for short) and React are web application frameworks that help provide structure to the backend and frontend code, respectively. &lt;/p&gt;

&lt;p&gt;In short, the curriculum includes two programming languages: Ruby and Javascript, as well as two frameworks: Rails and React.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Program split&lt;/strong&gt; &lt;br&gt;
Each 3-week learning phase consists of:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Lecture week &lt;/li&gt;
&lt;li&gt;Code challenge week&lt;/li&gt;
&lt;li&gt;Project week &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;During lecture week, it consists of exactly what it sounds like - sitting through code lectures over specific principles within that fundamental, as well as daily partner exercises where you are paired up with another student to work through a problem code. This week is when a lot of heavy lifting takes place in terms of learning, coding, and practicing the same principles over and over again. &lt;/p&gt;

&lt;p&gt;During code challenge week, there is an 'exam' (known as the code challenge) that takes place in the middle of the week that tests you over the principles learned from the previous week. While the program doesn't give out grades, it does operate off a pass/fail system, and if you aren't able to pass the code challenge, the opportunity to retake the exam or redo the phase is then up for discussion. &lt;/p&gt;

&lt;p&gt;During project week, you have the opportunity to collaborate with other students on a project where you implement the fundamentals you learned from week 1. This week is probably the hardest, yet most rewarding week in each phase because you are literally creating something from scratch and seeing ideas that you might have had finally materialize. At the end of project week, the cohort comes together to present their project and seeing the progress that other students have made is just as rewarding. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Take a break every once in a while&lt;/strong&gt; &lt;br&gt;
The last thing I wish I knew beforehand was the very important lesson of taking a step back from your computer and decompressing. Going into the program, I thought I had to be non-stop coding to keep up with all the other software devs in the industry. I felt lightyears behind them since I was just beginning to embark on this journey while others had been coding for years, and at a much younger age.  &lt;/p&gt;

&lt;p&gt;Taking a break won't hurt your coding progress; if anything it can help it. The amount of times I've spent chasing a problem all afternoon only to solve it the next day after being well rested has been far too many times, and it makes sense - your brain is a muscle and like every other muscle in your body, after strenuous exertion it needs &lt;strong&gt;rest&lt;/strong&gt;. 15 straight weeks of coding is mentally draining and the only way to prevent burnout is to take the time to recharge when you can. &lt;/p&gt;

&lt;p&gt;So there you have it - things you can expect from the program and how to set yourself up for success. Good luck to any newbies out there, the journey is hard but it sure is fun! Happy coding, y'all. &lt;/p&gt;

</description>
      <category>beginners</category>
      <category>bootcamp</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>MVC and REST, Simplified</title>
      <dc:creator>gabbinguyen</dc:creator>
      <pubDate>Mon, 11 Jan 2021 03:00:34 +0000</pubDate>
      <link>https://dev.to/gabbinguyen/mvc-and-rest-simplified-5ee9</link>
      <guid>https://dev.to/gabbinguyen/mvc-and-rest-simplified-5ee9</guid>
      <description>&lt;p&gt;So, you're learning about Models, Views, and Controllers. What's the difference, how do they work with each other, and what does this have to do with your application? Let's break it down and simplify the MVC framework. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Models&lt;/strong&gt;&lt;br&gt;
The Model is responsible for holding all the logic that applies to a specific Class in the application. The Model also accesses information from the database and sends it to the Controller to route. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Controllers&lt;/strong&gt;&lt;br&gt;
The Controller is responsible for routing information from the Model to the View, then from the View to the browser to display the contents for the end user. The Controller will have all the methods on any actions (Create, Read, Update, Delete, or other) that apply to the Class. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Views&lt;/strong&gt;&lt;br&gt;
The View is responsible for taking the data from the Controller and defines what is displayed on the client side. All frontend code will be housed in Views for all the actions in a specific Class. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--s3YQs0JF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/0g2zio4jpajuvrx9idb9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--s3YQs0JF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/0g2zio4jpajuvrx9idb9.png" alt="MVC Framework"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When we apply all this information to the above scenario, the flow within the framework would proceed as:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The browser requests for the "/users" URL &lt;/li&gt;
&lt;li&gt;The application routes the "/users" URL to the action that is housed in the Controller&lt;/li&gt;
&lt;li&gt;The specified action asks the User Model to pull information on that class from the Database &lt;/li&gt;
&lt;li&gt;The User Model pulls the information from the Database&lt;/li&gt;
&lt;li&gt;The User Model returns the information to the Controller &lt;/li&gt;
&lt;li&gt;the Controller sends a request to the View based on the original action &lt;/li&gt;
&lt;li&gt;The View renders the action's webpage as HTML&lt;/li&gt;
&lt;li&gt;The Controller passes the HTML to the browser&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;-&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ok great, now we understand the MVC framework!&lt;/strong&gt; But how do we make it &lt;em&gt;work&lt;/em&gt; and &lt;em&gt;do things&lt;/em&gt; for your application?&lt;/p&gt;

&lt;p&gt;In the Controller subsection, we talked about how it holds all the methods for any actions that apply to that class. When we have a Class in our application, let's say, a User Class, we want to be able to obtain or manipulate the data in the database in ways such as creating a new user, viewing a specific user, deleting a user, and so forth. When a request is made to perform that kind of functionality, the Controller uses RESTful conventions and looks to the Routes file to help map to the method that matches what the browser is requesting.&lt;/p&gt;

&lt;p&gt;So REST, simplified, is commands performed, such as our aforementioned CRUD actions. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oelqJCcL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/z7bl9wjkpchju8rh8ij3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oelqJCcL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/z7bl9wjkpchju8rh8ij3.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the diagram above, we see the HTTP verb hitting a specific URL path and being routed to a specific method, or action, within the Controller to render and display the information within the View. &lt;/p&gt;

&lt;p&gt;Simplifying our HTTP verbs: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;GET: simply retrieves information, does not manipulate any data within the database&lt;/li&gt;
&lt;li&gt;POST: creates new data based on the information enclosed in the request&lt;/li&gt;
&lt;li&gt;PATCH: updates existing data with the information enclosed in the request&lt;/li&gt;
&lt;li&gt;DELETE: deletes the data enclosed in the request &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now that we have a better understanding and high-level overview of MVC and REST, we can use the MVC framework and the RESTful design pattern in conjunction to create a badass application! Happy coding! &lt;/p&gt;

</description>
      <category>rails</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Rails Command Line Shortcuts // Re: Generate </title>
      <dc:creator>gabbinguyen</dc:creator>
      <pubDate>Sun, 29 Nov 2020 06:01:20 +0000</pubDate>
      <link>https://dev.to/gabbinguyen/rails-command-line-shortcuts-re-generate-5fg1</link>
      <guid>https://dev.to/gabbinguyen/rails-command-line-shortcuts-re-generate-5fg1</guid>
      <description>&lt;p&gt;Learning Ruby on Rails can be overwhelming, so this article provides some examples on frequently used command line shortcuts to help get you started. We're going to focus on the &lt;strong&gt;rails generate&lt;/strong&gt; shortcuts.&lt;/p&gt;

&lt;p&gt;Using &lt;strong&gt;rails generate&lt;/strong&gt; (or &lt;strong&gt;rails g&lt;/strong&gt;) can help cut down the amount of time typing out code needed to build out your application, but what should we use, and when? Let's break down each shortcut and see what is created when we invoke it. &lt;/p&gt;

&lt;p&gt;The shortcuts that we will be reviewing are: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Model &lt;/li&gt;
&lt;li&gt;Controller&lt;/li&gt;
&lt;li&gt;Resource&lt;/li&gt;
&lt;li&gt;Migration &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;1. Model&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fu59vaik1aq42verflkny.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fu59vaik1aq42verflkny.png" alt="Alt Text"&gt;&lt;/a&gt; &lt;br&gt;
Entering &lt;strong&gt;rails generate model&lt;/strong&gt; will create: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Model file in the app/models directory&lt;/li&gt;
&lt;li&gt;Migration file in the db/migrate directory &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fs9ky4v1jke70b62h1z9i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fs9ky4v1jke70b62h1z9i.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fbo2vgpj38u8wlx13yxdj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fbo2vgpj38u8wlx13yxdj.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Controller
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fh0zd9zdvcgr7qewc7a9v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fh0zd9zdvcgr7qewc7a9v.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Entering &lt;strong&gt;rails generate controller&lt;/strong&gt; will create: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Controller file in app/controller directory with actions included (&lt;strong&gt;new, create,&lt;/strong&gt; and &lt;strong&gt;show&lt;/strong&gt; in this example) &lt;/li&gt;
&lt;li&gt;Routes for each action in the config/routes file&lt;/li&gt;
&lt;li&gt;HTML view files for each action in the app/views directory &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fiwe8zeb5xljr3zx6a0p3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fiwe8zeb5xljr3zx6a0p3.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fl6qeu2kid98b9ssic1ji.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fl6qeu2kid98b9ssic1ji.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fq38ln7bdkkonaj9i37w7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fq38ln7bdkkonaj9i37w7.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  3. Resource
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fwffraz3plpqsf9zf8koo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fwffraz3plpqsf9zf8koo.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Entering &lt;strong&gt;rails generate resource&lt;/strong&gt; will create: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Model file in the app/models directory&lt;/li&gt;
&lt;li&gt;Migration file in the db/migrate directory &lt;/li&gt;
&lt;li&gt;Controller file in the app/controllers directory &lt;/li&gt;
&lt;li&gt;Resources in the config/routes file&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fs9ky4v1jke70b62h1z9i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fs9ky4v1jke70b62h1z9i.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fbo2vgpj38u8wlx13yxdj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fbo2vgpj38u8wlx13yxdj.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fiqrtj36o0omtnbtm7xqk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fiqrtj36o0omtnbtm7xqk.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fu99msxo613cb9l9qjerp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fu99msxo613cb9l9qjerp.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  4. Migration
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fe4kmv87h9zvqcn1ef59y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fe4kmv87h9zvqcn1ef59y.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Entering &lt;strong&gt;rails generate migration&lt;/strong&gt; can create a variety of different outcomes such as adding a column to an existing table, renaming a table, destroying a column, and so on.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F5z1zhpp6yfgdl1k2hlpl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F5z1zhpp6yfgdl1k2hlpl.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Resources: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://guides.rubyonrails.org/command_line.html#rails-generate" rel="noopener noreferrer"&gt;https://guides.rubyonrails.org/command_line.html#rails-generate&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>rails</category>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
