<?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 Kyle Gundry on Medium]]></title>
        <description><![CDATA[Stories by Kyle Gundry on Medium]]></description>
        <link>https://medium.com/@gundr1kt?source=rss-d2f4f345ea10------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*59lwkhsBoiqNODJmHvPdiQ.jpeg</url>
            <title>Stories by Kyle Gundry on Medium</title>
            <link>https://medium.com/@gundr1kt?source=rss-d2f4f345ea10------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 09:10:39 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gundr1kt/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[Installing bootstrap-sass]]></title>
            <link>https://medium.com/@gundr1kt/installing-bootstrap-sass-51fdeb52dbff?source=rss-d2f4f345ea10------2</link>
            <guid isPermaLink="false">https://medium.com/p/51fdeb52dbff</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[ruby-on-rails]]></category>
            <dc:creator><![CDATA[Kyle Gundry]]></dc:creator>
            <pubDate>Sun, 19 Mar 2017 21:56:30 GMT</pubDate>
            <atom:updated>2017-03-19T21:57:58.523Z</atom:updated>
            <content:encoded><![CDATA[<p>Here’s a quick guide showing you how to install bootstrap-sass in to your application.</p><p>Step 1: Add the below gem statement ‘bootstrap-sass’ anywhere in your Gemfile:</p><p>gem ‘bootstrap-sass’, ‘~&gt; 3.3.6’</p><p>I added it right above the my postgressql gem but you can put it anywhere along this list.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*0dfIuVzDBMebyJFtSzQloA.gif" /><figcaption>Step 1</figcaption></figure><p>Step 2: Inside your terminal (make sure you’re in the folder where your Rails app is), run:</p><p>bundle install</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*mf6x9Q3qobpD_7eVUKnaDQ.gif" /><figcaption>Step 2</figcaption></figure><p>Step 3: Inside app/assets/stylesheets, create a new file called _external.css.scss</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*s3vBaqDygXpLW32INryPBA.gif" /><figcaption>Step 3</figcaption></figure><p>Step 4: Add these lines to that file and save:</p><p>@import “bootstrap-sprockets”;<br>@import “bootstrap”;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*dFSQTczfjbI2flq14GnMhQ.gif" /><figcaption>Step 4</figcaption></figure><p>Step 5: Inside app/assets/javascripts/application.js, add this line under the line that says //=require jquery:</p><p>//= require bootstrap-sprockets</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*4yAafvNQcYv_3Wxr227tBA.gif" /><figcaption>Step 5</figcaption></figure><p>Step 6, and final step: If your rails server was already running in your terminal, restart it by exiting the server (control C) and restarting by typing in rails server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*VlPjWyR5jhOCBwUADEGujQ.gif" /><figcaption>Step 6</figcaption></figure><p>Hopefully this helps!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=51fdeb52dbff" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[.select Method]]></title>
            <link>https://medium.com/@gundr1kt/select-method-534ecd06547c?source=rss-d2f4f345ea10------2</link>
            <guid isPermaLink="false">https://medium.com/p/534ecd06547c</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[code]]></category>
            <category><![CDATA[ruby]]></category>
            <dc:creator><![CDATA[Kyle Gundry]]></dc:creator>
            <pubDate>Mon, 06 Mar 2017 23:49:11 GMT</pubDate>
            <atom:updated>2017-03-07T17:57:20.941Z</atom:updated>
            <content:encoded><![CDATA[<p>Writing loops can become cumbersome as the situation becomes more difficult. Certain methods are out there to help you simplify your code and still return the same results. Select is a method that helps you out with this.</p><p>Here is an example of how you’d write an each loop to return the even numbers within a given array:</p><pre>numbers = [1, 2, 4, 2]<br>even_numbers = []<br>numbers.each do |number|<br>  if number.even?<br>    even_numbers &lt;&lt; number<br>  end<br>end<br>p even_numbers</pre><pre>=&gt;  [2, 4, 2]</pre><p>Here is how you can simplify the code using the select method:</p><pre>numbers = [1, 2, 4, 2]</pre><pre>even_numbers = numbers.select {|number| number.even? }</pre><pre>p even_numbers</pre><pre>=&gt; [2, 4, 2]</pre><p>Here’s another way to use the .select method with an array of hashes to return certain data:</p><pre>movies = [<br>  {id: 1, title: &quot;Die Hard&quot;, rating: 4.0},<br>  {id: 2, title: &quot;Bad Boys&quot;, rating: 5.0},<br>  {id: 3, title: &quot;The Chamber&quot;, rating: 3.0},<br>  {id: 4, title: &quot;Fracture&quot;, rating: 2.0}<br>]</pre><pre>new_hash = movies.select{|movie| movie[:rating] &lt; 4.0}</pre><pre>p new_hash</pre><pre>=&gt;  [{:id=&gt;3, :title=&gt;&quot;The Chamber&quot;, :rating=&gt;3.0}, {:id=&gt;4, :title=&gt;&quot;Fracture&quot;, :rating=&gt;2.0}]</pre><p>The .select method works through each “movie” checking to see if the movie[:rating] is less than 4.0. If the movie is less than 4.0, the method adds that movie hash to the “new_hash”.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=534ecd06547c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[.map Method]]></title>
            <link>https://medium.com/@gundr1kt/map-method-2fc7e960a19b?source=rss-d2f4f345ea10------2</link>
            <guid isPermaLink="false">https://medium.com/p/2fc7e960a19b</guid>
            <category><![CDATA[ruby]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[code]]></category>
            <category><![CDATA[development]]></category>
            <dc:creator><![CDATA[Kyle Gundry]]></dc:creator>
            <pubDate>Mon, 06 Mar 2017 23:23:11 GMT</pubDate>
            <atom:updated>2017-03-06T23:49:40.167Z</atom:updated>
            <content:encoded><![CDATA[<p>After a couple weeks of learning the different types of loops one can write, I was introduced to the map method! In the below example I show you how you can take a loop method and return the same result using the map method:</p><p>Using an each loop:</p><pre>numbers = [1, 2, 4, 2]<br>doubled_numbers = []<br>numbers.each do |number|<br>  doubled_numbers &lt;&lt; number * 2<br>end<br>p doubled_numbers</pre><pre>=&gt;  [2, 4, 8, 4]</pre><p>Using the map method:</p><pre>numbers = [1, 2, 4, 2]</pre><pre>doubled_numbers = numbers.map {|number| number * 2 }</pre><pre>p doubled_numbers</pre><pre>=&gt;  [2, 4, 8, 4]</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2fc7e960a19b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>