to create a Gallery that has a name and has_many :images, which in turn have a...
TL;DR If you want to support most browsers, then don't exceed 50 cookies per domain, and don't...
ActiveRecord offers an explain method similar to using EXPLAIN SQL statements on the database. However, this approach will explain all...
When building a form with a file select field, you may want to offer your users a live preview before...
To upload a file via AJAX (e.g. from an ) you need to wrap your params in a FormData object.
TL;DR There are three dimensions you can control when scoping routes: scope module: 'module', path: 'url_prefix', as: 'path...
PostgreSQL offers a really handy field type: json. You can store any JSON there, in any structure. While its flexibility...
You know that Devise offers RSpec test helpers for controller specs. However, in request specs, they will not work.
With "attaching an event handler once" you possibly mean one of these two things: Register a function for an event...
Note This card does not reflect the current state of lazy loading technologies. The native lazy attribute could be used...
Sometimes you just want to have a small web server that serves files to test something. Serve the current directory...
While you usually do not need a Content-Type on GET request (which have a blank body), an external API...
PostgreSQL's array data type is pretty useful, but manipulating values of arrays can be awkward because of its syntax...
When a method has keyword arguments, Ruby offers implicit conversion of a Hash argument into keyword arguments. This conversion is...
A fantastic guide for a dilemma facing any web-based product. Here’s a simple set of Yes/No questions that...
As the web is being used for more and more tasks, expectations rise. Not only should web pages offer rich...
This is how you regain disk space from OpenStack instances if you are using kvm and qcow. If your instance...
While debugging an intricate issue with failed HTTP requests I have come to appreciate the more advanced features of the...
If you need to upgrade code that uses the old jQuery methods bind, delegate, live, unbind and die, the attached...
Free Bootstrap theme resembling Material Design. Bootswatch offers Sass and Less files, so the theme can easily be integrated into...
Jasmine comes with two matchers that test for equality. The first is toBe: expect(first).toBe(second) toBe passes when...
The migration DSL now supports adding and removing foreign keys. They are dumped to schema.rb as well. At this time...
Disabling auto-complete in login forms is probably a bad idea, since it encourages weak passwords. If you are still...
Starting from 4.1, Rails automatically detects the inverse of an association, based on heuristics. Unfortunately, it does not seem to...