<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ellie Workman on Medium]]></title>
        <description><![CDATA[Stories by Ellie Workman on Medium]]></description>
        <link>https://medium.com/@ellieworkman?source=rss-8a840b4bae9c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*poltVmPfVXtWyr1n.jpg</url>
            <title>Stories by Ellie Workman on Medium</title>
            <link>https://medium.com/@ellieworkman?source=rss-8a840b4bae9c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 03:26:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ellieworkman/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Routes Recap]]></title>
            <link>https://medium.com/@ellieworkman/routes-recap-e5eefa6f9b4?source=rss-8a840b4bae9c------2</link>
            <guid isPermaLink="false">https://medium.com/p/e5eefa6f9b4</guid>
            <category><![CDATA[rails]]></category>
            <category><![CDATA[ruby-on-rails]]></category>
            <dc:creator><![CDATA[Ellie Workman]]></dc:creator>
            <pubDate>Thu, 17 Nov 2016 23:03:37 GMT</pubDate>
            <atom:updated>2016-11-17T23:03:37.076Z</atom:updated>
            <content:encoded><![CDATA[<ol><li>What is the purpose of routing?</li></ol><p>This week we made our first websites using our rails server. A route is a two-way street: it allows us to connect incoming HTTP requests to the code in our application’s controllers, and then vice versa it allows us to generate URLs from our application without having to hard-code them as strings.</p><p>Example: <a href="http://www.localhost.3000.org/products/5">www.localhost.3000.org/products/5</a> = Our routing engine (in Rails) sends the request (“5”) to the appropriate spot in our application. In my application, it goes to the “show” action of my products controller and displays the product with the number 5 id.</p><p>Example:</p><p>@product = Product.find_by[:17]</p><p>&lt;&lt;%= link_to “Product_Edit”, product_edit(@patient) %&gt;</p><p>In this example, the routing engine translates the above code back into a URL such as /products/17.</p><p>2. What are the components of routes?</p><p>2 components of routes: the engine itself (included in rails) and the file config/routes.rb. The latter is what contains the actual routes used by the application. Essentially routes.rb is information sent to the Controller — Routing — Routes.draw. Each request is sent to the first matching route (so pay attention to the order!) and if there is no matching route, then Rails returns HTTP status 404 (my favorite site).</p><p>3. What types of routes exist?</p><p>The one type we have learned is called the REST route. REST stands for REpresentational State Transfer and essentially involves 1) using URLs to represent information and 2) transferring information and changes to that information between the rest of the application. A REST route gives a mapping between HTTP verbs, controller actions, CRUD (Create, Read, Update, Delete) operations in an application.</p><p>Thanks for reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e5eefa6f9b4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>