APIs should be consistent, but it is difficult to do this when returning a JSON response along side the HTML interface. Here I show how to add a versioned, RESTful API. The version can be determined from either the URL or HTTP headers.
| RailsCasts | Programming Ruby |
It is often asked: Is Rails a good fit if I only need to serve an API? In this episode I show how to use the Rails API gem to create a slimmer Rails application designed to respond with JSON.
| RailsCasts | Programming Ruby |
Creating a wizard form can be tricky in Rails. Learn how Wicked can help by turning a controller into a series of multiple steps.
| RailsCasts | Programming Ruby |
PostgreSQL can act as a worker queue which can replace the need for a separate process to manage the background jobs. Here you will learn how to do this with the queue_classic gem.
| RailsCasts | Programming Ruby |
PostgreSQL is a feature-packed relational database that every Rails developer should consider using. Here you will learn how to install it, add it to a new application, and transition from an existing SQLite app using the "taps" gem.
| RailsCasts | Programming Ruby |
DataTables makes it easy to convert a plain HTML table into one with pagination, sorting, and searching - all done with JavaScript and jQuery. Here I show how to set this up and use a Rails application as the data source.
| RailsCasts | Programming Ruby |
Rails has great internationalization (I18n) support making it easy to translate static text into other languages, but how do we translate database content? Learn how using Globalize 3 in this episode.
| RailsCasts | Programming Ruby |
Copycopter provides a nice interface that clients can use to edit the text in a Rails application. Learn how to deploy a Copycopter server using Heroku and integrate it in a Rails application through I18n.
| RailsCasts | Programming Ruby |
Compass improves the Sass experience by providing useful mixins, functions, and more. You will also learn how to make CSS sprites with it in this episode.
| RailsCasts | Programming Ruby |
If you need to quickly create an informational site that can be easily edited, consider using a content management system. Here I show how to build a site using Refinery CMS.
| RailsCasts | Programming Ruby |
If you are tired of the browser vendor prefixes in CSS, check out Bourbon. It provides Sass mixins and functions to make CSS more convenient.
| RailsCasts | Programming Ruby |
Twitter Bootstrap can help make beautiful web apps quickly by providing you with useful CSS and JavaScript. Here you will learn how to include it into Rails with the twitter-bootstrap-rails gem.
| RailsCasts | Programming Ruby |
ActiveAttr provides what Active Model left out. If you need to create a table-less model with features similar to Active Record, watch this episode.
| RailsCasts | Programming Ruby |
There are a variety of ways to pass variables from a Rails application to JavaScript. Here I show three techniques: a script tag, a data attribute, and the Gon gem.
| RailsCasts | Programming Ruby |
RABL - Ruby API Builder Language - provides a DSL for generating JSON or XML responses in a Ruby application. Learn how to share and configure complex JSON data in this episode.
| RailsCasts | Programming Ruby |
Jbuilder provides a DSL for generating JSON. It includes a template engine which allows you to create complex responses with helpers and conditions.
| RailsCasts | Programming Ruby |
Rails 3.2 sports many new features including automatic explain queries, tagged logging, key-value store in Active Record, improve migration generator and more. Learn all about these new features in this episode.
| RailsCasts | Programming Ruby |
Private Pub makes it easier than ever to publish and subscribe to real-time events in a Rails app. You can use publish_to with a block of JavaScript or supply a hash for use with JSON.
| RailsCasts | Programming Ruby |
If you are tired of model ids in the URL, overriding to_param can only get you so far. The friendly_id plugin can help by making it easy to generate a URL slug and maintain a history.
| RailsCasts | Programming Ruby |
HTML email can be difficult to code because any CSS should be made inline. Here I present a few tools for doing this including the premailer-rails3 and roadie gems.
| RailsCasts | Programming Ruby |
Learning Ruby on Rails can be overwhelming, especially if you are new to programming. Here I will take you on a tour through various resources to help get started with Rails.
| RailsCasts | Programming Ruby |
As Rails developers, we frequently use the command line. Here I will show how to switch to Z Shell using Oh My ZSH including how to make your own theme and plugins.
| RailsCasts | Programming Ruby |
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.
| RailsCasts | Programming Ruby |
With the release of OmniAuth 1.0 there is a new Identity strategy which allows users to register/login with a password if they don't want to use an external provider.
| RailsCasts | Programming Ruby |
Edit an attribute in-place without leaving a page using the Best In Place gem. Learn how to add validations and support for various field types.
| RailsCasts | Programming Ruby |
GitHub makes it easier than ever to contribute to open source with pull requests. Here I show how to submit a pull request to the VCR project.
| RailsCasts | Programming Ruby |
Spree allows you to quickly turn a Rails project into a full eCommerce application. Here I show how to set it up and configure the look and feel of the store.
| RailsCasts | Programming Ruby |
Mercury allows you to edit a section of HTML directly in the web browser through a WISYIWYG editor. Here I show how to integrate Mercury into a Rails app and save the changes back to the database.
| RailsCasts | Programming Ruby |
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.
| RailsCasts | Programming Ruby |
Vagrant allows you to run your Rails application and all of its dependencies in a portable, sharable environment. Use for development, set it up as a staging server, or experiment with a production setup.
| RailsCasts | Programming Ruby |
Communicating with a SOAP API can be a daunting task. Savon makes this easier by presenting the SOAP API through a Ruby interface.
| RailsCasts | Programming Ruby |
Stripe is a full-stack payment solution with very reasonable pricing and is easy to setup. See how to add it to a Rails application here. Currently only available in the US.
| RailsCasts | Programming Ruby |
Clean up complex view logic using Draper. This gem provides decorators (much like presenters) which bundles view logic in an object oriented fashion. In this episode I do a step-by-step refactoring of a complex template into a decorator.
| RailsCasts | Programming Ruby |
Spork improves the loading time of your test suite by starting up your Rails application once in the background. Use it with Guard for the ultimate combo in fast feedback while doing TDD.
| RailsCasts | Programming Ruby |
Active Admin allows you to quickly build an admin interface with just a few commands. Not only does it look great, but it is very customizable as shown in this episode.
| RailsCasts | Programming Ruby |
Sorcery is a full-featured, modular solution to authentication which leaves the controller and view layers up to you.
| RailsCasts | Programming Ruby |
It is incredibly easy to upgrade to Rails 3.1, but if you want to take advantage of the asset pipeline you will need to put in some extra effort. Have no fear because I walk you through each of the necessary steps in this episode.
| RailsCasts | Programming Ruby |
Foreman can help manage multiple processes that your Rails app depends upon when running in development. It also provides an export command to move them into production.
| RailsCasts | Programming Ruby |
Pry is an alternative to IRB and sports many great features. Here I show how to integrate it into a Rails app, and how it can aid in debugging.
| RailsCasts | Programming Ruby |
The asset pipeline is probably the biggest feature in Rails 3.1, but it can seem like magic at first. Here I dive into exactly how the asset pipeline works.
| RailsCasts | Programming Ruby |