Episodes

Resources

Summary

# Gemfile
gem 'progressive_render'

# application.js
//= require progressive_render

If you plan on using the default loader, you will need to also include the CSS asset.

# application.css
*= require progressive_render

# visitors_controller.rb
class VisitorsController < ApplicationController
  def index
    @users = User.all
    progressive_render
  end

  def images
    # Some task
    progressive_render
  end

  def census
    # Some task
    progressive_render
  end
end

# views
<%= progressive_render do %>
  Slow loading content here...
<% end %>