2 hours ago ... Articles by thoughtbot about design, Ruby on Rails, and iOS.
Link: robots.thoughtbot.com
Chat Example App Using Server-Sent Events Mason Fischer July 14, 2013 rails redis Rails 4 can stream data to the browser with ActionController::Live using server-sent events (SSEs) . I was curious how server sent events worked so I decided to use them to implement a simple chat applic...
Mike Burns February 06, 2014 rcm open source We have built a suite of tools for managing your rc files. The rcm suite of tools is for managing dotfiles directories. This is a directory containing all the .*rc files in your home directory (.zshrc , .vimrc , and so on). These files have...
Request bodies are defined by a form's markup. In the form tag there is an attribute called enctype , this attribute tells the browser how to encode the form data. There are several different values this attribute can have. The default is application/x-www-form-urlencoded , which tell...
Automatically wait for AJAX with Capybara Gabe Berke-Williams February 04, 2014 rails testing Capybara's very good about waiting for AJAX . For example, this code will keep checking the page for the element for Capybara.default_wait_time seconds, allowing AJAX calls to finish: expect(...
Starting and Stopping Background Services with Homebrew Gabe Berke-Williams January 21, 2014 osx I love Homebrew , but sometimes it really gets me down, you know? Especially when I have to deal with launchctl . launchctl loads and unloads services that start at login. In OS X, these s...
Opening an Austin Office Britt Ballard February 03, 2014 austin news We're pleased to announce that we're opening an office in Austin, Texas! Starting in early March we'll have a team in town consisting of myself and Alex (at least temporarily). Caleb will join shortly thereafter. Thi...
Gabe Berke-Williams January 22, 2014 rails Rails 4.0 introduced a helpful new method for ActiveRecord queries: where.not . It can make clunky queries easier to read. Usage This query: User.where.not(name: 'Gabe') is effectively the same as this: User.where('name != ?', 'Gabe') It's "e...
ActiveRecord, Caching, and the Single Responsibility Principle Josh Clayton August 19, 2011 rails good code I was working on a messaging system earlier this week and noticed a pretty tight coupling between two classes. class Message < ActiveRecord::Base belongs_to :author, :class_name...