Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
T

turboboost

> 编程语言
Open source

Enhanced AJAX handling for Rails apps

167 stars0 likes3 views
WebsiteGitHub

About

Enhanced AJAX handling for Rails apps

Turboboost

Turboboost extends the power of Turbolinks into the forms of your Rails app and provides additional convenient AJAX handlers for forms and links. It aims to be a seemless and logical addition to any Turbolinks-rocking Rails 3.2+ app. Currently it depends on jQuery. The main features are:

  • Form response redirection is handled by Turbolinks.
  • Customizable success and error handling through registered JavaScript, with support for Rails' Flash and optional error rendering built-in.
  • Responses can also be rendered within a scoped DOM target using jQuery selectors.
Disclaimer

In recent history Turbolinks has started to emulate some of these features with a slightly different approach. I will continue to support this library if people are still finding it useful.

Installation

In your Gemfile
ruby
gem 'turboboost'

Or to live on the very edge:

ruby
gem 'turboboost', github: 'waymondo/turboboost'

Then bundle install.

In your application.js
javascript
//= require turboboost

This will also require jQuery, jquery-ujs, Turbolinks, if not already required. If you wish to register your scripts manually, you can like so:

javascript
//= require path/to/vendored/jquery
//= require jquery_ujs
//= require turbolinks
//= require turboboost/turboboost
In your view files

Add turboboost: true to your form / link helpers:

erb

Or you can add the data attribute manually:

Redirection with Turbolinks

In its simplest server-side implementation, a basic Turboboost controller action with redirection might look like this:

ruby
def create
  post = Post.create!(params[:post]) # 
  console.log(errors) # 
  console.log(flash) # -> {'notice': 'Post was successfully created.'}

Scoped response rendering

Turboboost also provides some options for rendering AJAX responses at specific locations in the DOM:

Rails controller render option jQuery function
:within html()
:replace replaceWith()
:prepend prepend()
:append append()
:before before()
:after after()

The value can be any jQuery selector. Example usage:

ruby
respond_to do |format|
  format.html
  format.js { render partial: 'task', object: @task, prepend: "#todo-list" }
end

Issues· 9 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Ruby

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言