Image for post
Image for post

Dissecting Your Ruby on Rails Code; A Learning Practice for Beginners

What we can learn from the founder of Dell, Inc. on taking things apart

Image for post
Image for post
Image for post
Image for post
<% if params[:id] != nil %>
<% @url = '/user/' + params[:id] %>
<% if current_page?(@url) %>
<img src="/banner.png" class="profile-banner">
<% end %>
<% end %>
get '/user/:id' => 'pages#profile'
<% if params[:id] != nil %>
<% @url = '/user/' + params[:id] %>
http://localhost:3000/user/david
<% if params[:id] != nil %>
<% @url = '/user/' + params[:id] %>
<% if current_page?(@url) %>
<img src="/banner.png" class="profile-banner">
<% end %>
<% end %>

Written by

Documentation and tutorials on Python, Programming, and Data Analysis. FPL Addict. Occasionally writing about biohacking, PMing, and food.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store