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
Playing with PJAX
PJAX allows you to quickly update a section of a page using AJAX with automatic pushState support. Here I show how to use both pjax_rails and rack-pjax gems.
(8 minutes)
jQuery File Upload
Here you will learn how to upload multiple files over ajax using jQuery File Upload. I start with the basic functionality and customize it to fit the user interface.
(13 minutes)
Site-Wide Announcements (revised)
Here I show how to add an announcement message at the top of every page in the application and allow the user to permanently hide it. This is all done test-first and even includes testing the JavaScript behavior.
(11 minutes)
Token Fields (revised)
The Chosen plugin makes it easy to turn a many-to-many select menu into a searchable token field. Then see how the jQuery Tokeninput field can help with AJAX loading and creating new records.
(10 minutes)
Sortable Lists (revised)
Here I show how to use jQuery UI to make a sortable list and a "sort" action to handle the updating. Top it off with acts_as_list to make it feature complete.
(6 minutes)
Auto-Complete Association (revised)
A select menu is often used for setting a belongs_to association, but you should also consider using a text field with autocomple. Here I use jQuery UI and show two different solutions: client side and server side.
(9 minutes)
Token Fields
With the jQuery Tokeninput plugin it is easy to add an autocompleting list of entries for a many-to-many association.
(11 minutes)
Running JavaScript in Ruby
Sometimes logic needs to be shared between the server-side (Ruby) and the client-side (JavaScript). Here I show how to run JavaScript directly in Ruby through ExecJS and therubyracer.
(14 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)
Unobtrusive Javascript
Keep JavaScript out of your HTML content with unobtrusive JavaScript. Here I show how Rails 3 works with this best practice.
(13 minutes)