In specs, the session never persists but is always a new object for each request. Data put into the session...

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.

Sometimes you might want to limit the number of associated records in a has_many association, but cannot add a...

The User-Agent HTTP header identifies the client and is sent by "regular" browsers, search engine crawlers, or other web...

Rails flashes (FlashHash) track a list of used keys, which is not respected when comparing flash hashes.

Do not pass times to date attributes. Always convert times to dates when your application uses time zones. Background

ariejan.net

Rails understands a :limit options when you create columns in a migration. Its meaning depends on the column type, and...

web.archive.org

TL;DR: You should generally use #size to count associated records. size Counts already loaded elements If the association is...

Here is a hacky way to load dumps directly from the source server, without fully copying them over and extracting...

mysqlperformanceblog.com

When MySQL refuses to use your index, there's a number of things that you may be doing wrong. One...

When creating an ActiveRecord with .new, .create or create!, you cannot set the ID attribute (note: When using Machinist's...

You can use the content CSS attribute to set an element's content -- which is especially useful for the :before...

Defining one callback several times in the same class behaves different in ActiveRecord and ResourceController. While in ActiveRecord the callbacks...

Consul 0.6.1+ gives you a way to dynamically access and query powers for a given name, model class or record...

validates_uniqueness_of is not sufficient to ensure the uniqueness of a value. The reason for this is that in...

Calling bundle update (without arguments) updates all your gems at once. Given that many gems don't care about stable...

kernel.org

If you say git stash, your stashed changes will be identified with an automatically generated message: $ git stash

When calling a scope like current_power.user?(user), Consul will no longer trigger a query if the users power selects all...

The way MySQL's FULLTEXT tokenizer splits text into word tokens might not always be what you need. E.g. it...

josh.github.io

li.active a:link Example output (specificity): | 0 | 2 | 2 | See also: https://www.codecaptain.io/tools/css-specificity-calculator

makandra dev
github.com

Axlsx is an incredible gem to generate "Office Open XML" spreadsheet files (XLSX). Does not break on large spreadsheets and...

TLDR: In tests you need to clean out the database before each example. Use :transaction where possible. Use :deletion for...

When searching for text in a MySQL table, you have two choices: The LIKE operator FULLTEXT indexes (which currently only...