ActiveRecord translations live in locale.activerecord. ActiveModel translations live in locale.activemodel. To use the same translations for both, use YAML references...

makandra dev
wikihow.com

Issue this command: sqlite3 ~/Library/Application\ Support/Dock/*.db "DELETE from apps WHERE title='APP_NAME';" && killall Dock This tells sqlite3 to...

When HTTP clients make an request they can define which response formats they can process. They do it by adding...

Authentication is hard: there are many edge cases, and most users (including yourself) usually only go the "happy path" once...

We have often felt the pain where our models need to serve too many masters. E.g. we are adding a...

In the following example the method update_offices_people_count won't be called when office_id changes, because it...

When you want to do a git diff but do not care about the full diff and just want to...

You can detect city and country from an IP address by using the GeoLite database. This is a flat file...

You probably haven't configured version control for your project. Go to Project Settings / Version Control and set the director...

We ran into trouble when adding additional compute units to our railscomplete Hosting environment lately. VM-instances on the new...

highscalability.com

Awesome battle report from Pinterest trying to scale their setup using different approaches. When you push something to the limit...

tl;dr: Ruby's Bundler environment is passed on to system calls, which may not be what you may want...

makandra dev
github.com

jQuery plugin to fire events when user's cursor aims at particular dropdown menu items. For making responsive mega dropdowns...

This only works when you actually have a session ID (not the case for Rails' CookieStore, for example): request.session_options...

makandra dev
aaronlasseigne.com

All Rubyists should be familiar with the common definitions for include and extend. You include a module to add instance...

developer.mozilla.org

Non-SSL contents on SSL pages are blocked by default Bug 834836 – Turn on pref to block mixed active content...

apidock.com

All columns of a model's database table are automagically available through accessors on the Active Record object.

thejh.net

What you copy may not be what you see in the browser. Here is an online tool to determine the...

Note: This technique is confusing and slows down your test suite. Copy the attached code to features/support. This gets you...

Say you want to allow users to emphasize some string, but the whole markdown thing would be far too much...

stackoverflow.com

Usually, the logrotate service takes care of renaming log files each night or so to avoid logs becoming huge. That...

stackoverflow.com

TL;DR: Variables not declared using var are stored outside the current scope, most likely in the global scope (which...

stackoverflow.com

When you use ab to do some performance benchmarking, you might run into output like this: Complete requests: 200