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 imgur.com 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.
The first step of creating my Ajax response was by stopping the natural function…
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
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
My first full Rails project was building a event budget planner.
The homepage is very basic with a signup page were you can sign up by entering your info or using facebook login.
Once logged in you are welcomed to a page that shows your event which you can click…
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…