In tests, it is sometimes useful to create records with specific ids. On PostgreSQL this can cause problems: Usually, PostgreSQL...
Read (or re-read) the following chapters from our book Growing Rails Applications in Practice (it’s in our...
A common task in web applications is to add client-side JavaScript behavior to existing HTML elements.
The migration DSL now supports adding and removing foreign keys. They are dumped to schema.rb as well. At this time...
iPads will not trigger click events for all elements. You can fix that, but you don't want to know...
Large projects usually have large test suites that can run for a long time. This can be annoying as running...
Get an idea of the varying support for HTML/CSS/JavaScript features in different browsers like Chrome, Firefox, Internet Explorer, Edge...
Action Mailer Basics and Previews Chapter "Task H1: Sending Confirmation Emails" from Agile Web Development with Rails (in our...
In this card we will learn to write code that scales with a large number of database records. We will...
Read the following chapters from The Pragmatic Programmer, anniversary edition (in our library): Chapter 1, Topic 3: Software Entropy...
Understand why we test: Low defect rate without a QA department. Customer acceptance testing can concentrate on new features...
Rails is our web framework. Goals Be able to write a simple Rails application. Understand how Rails talks to the...
When using ORDER BY "column" in PostgreSQL, NULL values will come last. When using ORDER BY "column" DESC, NULLs will...
There is no such thing as a "default order" of rows in database tables. For instance, when you paginate a...
If you're a frequent user of LibreOffice, I strongly recommend to checkout out the VLOOKUP function (SVERWEIS in German...
Small (1.5 KB) Javascript library that lets you render tables, lists, etc. with hundreds of thousands of items.
Re-creating a complex ActiveRecord scenario quickly without setting up a full-blown Rails app can come in handy e.g...
When you want to UPDATE a table with information from an associated table, you can JOIN the associated table into...
Several Rails migration methods accept index: true as an option to create an index. In some cases (like #add_column...
TL;DR Under certain circumstances, dynamically defined symbols may break keyword arguments in Ruby 2.2. This was fixed in Ruby...
You know that ActiveRecord caches associations so they are not loaded twice for the same object. You also know that...
Instead of this: Image.order('images.created_at DESC') You can write this: Image.order(created_at: :desc) Not only do you not...
It's generally not trivial to change a datetime's seconds, minutes, etc in SQL. Here is how it works...
Web applications can be used by multiple users at the same time. A typical application server like Passenger has multiple...