...much faster than the configured up.form.config.watchInputDelay. Therefore, it may happen that you already entered something into the next field before Unpoly updates that field with a server response, discarding your...
The steps I wait for active ajax requests to complete (if configured) and capybara-lockstep can catch some of these cases, but not all. Both of these only wait...
Rails 3.0 has been underway for a good two years, so it’s with immense pleasure that we can declare...
Hanna is an RDoc template that scales. It's implemented in Haml, making the sources clean and readable. It's built with simplicity, beauty and ease of browsing in mind...
Martin Odersky talks with Frank Sommers and Bill Venners about the compromises and most important goals in Scala's design, its object-oriented innovations, and what's in it for...
Here is how to use Chromedriver without libraries like selenium-webdriver. This can be useful for debugging. The following example visits a web page and reads the a headline's...
...things you can do with it, but performing more advanced tasks without a tool like selenium-webdriver can be quite difficult. However, for simple debugging or remote-controlling, curl might...
PostgreSQL can cosplay as a full-text search engine. It doesn't have the features or fidelity of ElasticSearch or Algolia, but it's good enough if you just need...
...to search and rank large volumes of text. This card will teach you how to index, search and rank your Rails models in a PostgreSQL full-text index. We will...
...END__ keyword tells Ruby where a file ends – but you don't have to stop there. Any text you add after it is accessible via the DATA object.
Flash movies (.swf files) can talk with Javascript code embedded in the same HTML page. There are two ways to do this: The preferred way is to use the ExternalInterface...
...ActionScript by calling SetVariable(name, value) on the Flash movie's DOM element. This is super-legacy, but still encountered in the field. Note that communication between a Flash movie...
Short reference on how to quickly debug the vanilla Rails job adapters. Queue Adapters by Environment Environment Adapter Jobs Run In Worker Needed? development :async Rails server process No
Not executed (stored) No production :solid_queue Separate worker Yes (bin/jobs) Development (:async) Jobs run in background threads (Concurrent Ruby ThreadPoolExecutor) within the process that called the job.
...and autoload paths. They do NOT create a module for namespacing. This is intuitive, since there normally is no module Model, or module Controller. If you want to add a...
├── models ├── uploaders # No config needed ├── util # No config needed └── workers # No config needed Sometimes it's handy to group files within a directory, but not reflect that grouping within...
When your application is open for public sign up and sends out transactional e-mails to a large number of users, e-mail deliverability becomes an issue. E-mail providers...
...work hard to eliminate spam and have put in place relatively tight checks what kinds of emails they will accept, and from whom. To that end we use tools like...
...throw in some locking mechanism, but then are usually done with it. Unfortunately, transactions semantics in databases are actually very complicated, and chances are, your making some incorrect assumptions.
...engine actually has four different modes for transactions: READ UNCOMMITTED READ COMMITTED REPEATABLE READ SERIALIZABLE READ UNCOMMITED gives you the least isolation between transactions (i.e. one transaction can see most...
This note is a reminder that there is something called AppArmor that could cause weird errors ("File not found", "Can't open file or directory", ...) after configuration changes, e.g. when...
You most likely never want to do this. But if you do: Model.update_all({:id => new_id}, {:id => old_id...
Jasmine has long standing support for writing asynchronous specs. In days gone by we used the done callback to achieve this, but these days it is possible to write much...
...more readable specs. Async specs As a first example, say we want to check that some form disables the submit button while working. // bad (how we used to do it...
A JavaScript error in an E2E test with Selenium will not cause your test to fail. This may cause you to miss errors in your frontend code. Using the BrowserConsole...
!!driver_logs_proc end def driver_logs_proc browser = page.driver.browser if browser.respond_to?(:logs) # selenium-webdriver >= 4 proc { browser.logs } elsif browser.respond_to?(:manage) && browser.manage.respond_to?(:logs) # selenium-webdriver...
Terser is a really good minifier ("compressor") for JavaScript code. I'm often surprised by the thoughtfulness of its compressed output. Let's take this function: function fn() {
...this to the following code: console.log(a||b?"foo":c()) Note how: The if statement has been replaced by a tertiary expression. This is often less readable, but it doesn...
...be confused with truemail.io) allows validating email addresses, e.g. when users enter them into a sign-up form. It runs inside your application and does not depend on an external...
...set config.not_rfc_mx_lookup_flow = true. Validation methods explained Regex validation (1) is pretty straight-forward and basically "free" since you're not making and network connections. SMTP validation...
...do not use request.xhr? to decide that. Use respond_to. I've too often seen code like this: def show # ... if request.xhr? render json: @user.as_json else # renders default HTML...
...just plain wrong. Web browsers often fetch JSON via XHR, but they (should) also send the correct Accept HTTP header to tell the server the data they expect to receive...
...in C, with much better performance (20-200x) than the version in the standard library, while being almost completely compatible...
Reads Active Record's validations and makes them available to live client side javascript
...that pops up as it’s a thing of beauty in a piece of software that usually is seen as highly unimportant, yet is the first thing you encounter when...
...taking commercial software for a spin...
...fans of progress, of technology's inexorable march forward, will change their tune as soon as progress destroys something they care deeply about...
...Adobe a few days before the launch of their flagship product, what hope do smaller players hold...