Using React for the developing your site gives you lots of ways to quickly access and manipulate the state of your site. One great thing you can do with react is live searches without sending a post request.

So let’s say we have a basic listing of car brands that…

My Final Flatiron school project is A clone which is built using a react-redux front end and ruby on rails backend.

To display my images on the homepage I have to get all the images and there information and add it to the react images state.

Step 1


IF Statement

A simple if statement normally written.

if dishes_dirty == true
puts "wash the dishes"

The same code can be written on one line by first putting the output you want to return than condition after the if statement.

puts "wash the dishes" if dishes_dirty == true

If statements in ruby check if condition is true without explicit comparison since the statement is just a true or false boolean we can rewrite this code.

puts "wash the dishes" if dishes_dirty 

IF Else Statement

The normal way you would write a normal if else statement is.

if hungry == true
puts "Go eat"
puts "Take a nap."

IF Else Ternary operator

hungry == true ?  puts "Go eat" : puts "Take a nap."

The way this code works

condition ? condition meet output :else if condition not meet output

As part of my Flatiron Learn Verified program my second project was building a MVC Sinatra Project.

What is it?

The Web Application I built was A Wish List were you create a user account and user can create many wish lists and these list can have many items.


Scraping is a very useful resource to get live up to date information from other website through there HTML information.

The first step is to tell your program what tools it will be requiring

require 'open-uri' require 'nokogiri'

Open URI is a module which is included in ruby which gives…

Vinesh Persaud

Full Stack Web Developer

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