Monthly Archives: February 2019

Essential Git: Clone Commit Push Pull Checkout

For this example, I’ll use my binoculars page to demo the basic commands I use to track changes and move code between my laptop, github and my server.

In a new project folder

Make some changes and save them

I went down a rabbit hole and I wanna go home

Create a branch to track bug fix

Put this gem in GitHub

Create Repository

 

Make Dolly proud

Sheep

Clone repo to web server

Taking Search Input and Returning Result(s)

This book store really needs a search function. One notable difference is whether to return a single value, e.g. one person matching a phone number, or multiple values, e.g. a list of books.

A little modification to the Home Controller and the Index View will get us an input field and an output field for displaying results. For now, this will involve a full postback, reloading the page. In the single result example, it will send the user to the detail page for that item. In the list example, it will refresh the index page with the result. In case there are no results, I’ll provide some feedback that nothing was found.


SearchSingle

 

 

Resulting redirect to /Authors/Details/1

Redirect to Details

 


SearchListItems

 

 

Users should be alerted in the event nothing is found, i.e. when results.Count == 0.

No Unicorns