Categories
- Active Record
- Active Resource
- Active Support
- Administration
- Ajax
- APIs
- Authentication
- Authorization
- Background Jobs
- Caching
- Code Walkthrough
- Controllers
- Debugging
- Deployment
- eCommerce
- Forms
- Mailing
- Models
- Performance
- Plugins
- Production
- Rack
- Rails 2.0
- Rails 2.1
- Rails 2.2
- Rails 2.3
- Rails 3.0
- Rails 3.1
- Rails 3.2
- Rails 4.0
- Refactoring
- Routing
- Search
- Security
- Testing
- Tools
- Views
Advanced Search Form (revised)
It is often best to use a GET request when submitting a search form, however if it is an advanced search form with a lot of fields then this may not be ideal. Here I show how to create a search resource to handle this.
(6 minutes)
Ransack
Ransack allows you to easily build complex search forms. It also helps in adding sortable links and building a dynamic advanced search page.
(10 minutes)
Full-Text Search in PostgreSQL
Postgres offers full-text searching right out of the box. This episode shows how to write queries from scratch, apply tools like Texticle and pg_search, and optimize performance through indexes.
(16 minutes)
Hacking with Arel
Here I show a variety of ways to rewrite a long SQL query using only Active Record and Arel. This includes generating scopes dynamically, adding an "or" operator, and adding a powerful "match" method.
(15 minutes)
Squeel
Squeel provides a comprehensive DSL for writing SQL queries in Ruby. It is built upon Arel giving you access to many of its powerful features.
(9 minutes)
Search with Sunspot
Sunspot makes it easy to do full text searching through Solr. Here I show how to search on various attributes and add facets for filtering the search further.
(10 minutes)
ElasticSearch Part 1
Add full text searching using ElasticSearch and Tire. Here I will show the steps involved in adding this search to an existing application. This is the first part in a two part series.
(9 minutes)
Thinking Sphinx (revised)
Sphinx is a full-text search engine for use with MySQL or PostgreSQL. Learn how to add Thinking Sphinx by defining an index on your model and searching with various options.
(10 minutes)
ElasticSearch Part 2
This final part on ElasticSearch and Tire will show how to make more complex search queries, customize the indexing, and add facets.
(16 minutes)
Search, Sort, Paginate with AJAX
Many administration pages have search, sorting, and pagination on the index page. See how to add all of this including AJAX.
(13 minutes)