Ruby on Rails (Part 4 of 5): Search and Sorting

Ruby on Rails (Part 4 of 5): Search and Sorting

Biz Library
Updated Feb 04, 2020

This course covers a wide range of feature build outs, including some advanced development techniques, such as creating custom classes to handle a date range search feature. In being able to create custom classes to handle some of the non trivial aspects of the application, you will learn some key Rails fundamentals such as how to call the custom class in a controller and how to manage the data flow from other models. Next we will build a fully functional search engine into our application by leveraging the built in Postgres full text search functionality. As our program's data begins to grow, being able to quickly sort the data queries in the application view would be a very helpful feature, and with that in mind we will walk through how to build a number of custom Rails methods that will let users toggle the sort order in one of our table's columns simply by clicking on it. Lastly we will integrate pagination into our program, which will improve our page load performance, manage the user interface and allow for an improved level of control in regards to what is rendered on the page.

Lesson 1:

  • Custom Class
  • Process
  • Call from Controllers
  • Demo: Custom Class
  • Demo: Custom Scope
  • Demo: Controller
  • Demo: Update View
  • Demo: Search Troubleshooting.

Lesson 2:

  • Benefits
  • Implementation
  • Custom Method in the Model
  • Demo: Controller Generator
  • Demo: Search View
  • Demo: Search Example.

Lesson 3:

  • Options for Sorting
  • Update the View
  • Update the Controller
  • Demo: Column Sorting
  • Demo: Sort Example.

Lesson 4:

  • What is Pagination?
  • Setup
  • Demo: Pagination.