Posted about 23 hours ago by Henning Koch. makandracards.com

Added two more methods: Method 3: Use a request spec Only test that the download link's [href] attribute points...

Posted about 10 years ago by Henning Koch.

Rails 3+ allows you to join two scopes from arbitrary sources by calling the merge method: scope1 = User.where(:email => 'foo@bar.com...

Posted 17 days ago by Judith Roth. en.wikipedia.org

Formerly 301 (Moved Permanently) and 302 (Found) were used for redirecting. Browsers did implement them in different ways, so since...

Posted over 8 years ago by Arne Hartherz. w3.org

You probably know that you can use CSS selectors to match against elements and their attributes, such as:

Posted over 8 years ago by Tobias Kraze.

Starting with Rails 3.2, there is a nicer way to display custom error pages (i.e. "page not found") that does...

Posted over 9 years ago by Henning Koch.

The attached patch lets you find a record by a string or number in any column: User.find_by_anything('carla...

Posted about 1 month ago by Arne Hartherz. makandracards.com

Updated Bash snippet so it won't overwrite a previously configured $PROMPT_COMMAND.

Posted about 1 month ago by Emanuel De.

Accessing other repositories in Gitlab CI is not straight forward, since the access rights of the current pipeline might not...

Posted about 1 month ago by Arne Hartherz.

The Node Version Manager allows installing multiple NodeJS versions and switching between them. By default, it does not automatically switch...

Posted about 2 years ago by Tobias Kraze.

Over the years we have tried several solution to have vector icons in our applications. There are many ways to...

Posted over 7 years ago by Martin Straub.

Use protocol independent URLs whenever possible so that the browser will choose the protocol related to the protocol which the...

Posted over 4 years ago by Arne Hartherz.

Occasionally, you have to talk to APIs via HTTPS that use a custom certificate or a misconfigured certificate chain (like...

Posted 3 months ago by Arne Hartherz.

When dealing with external data sources, you may have to deal with improperly encoded strings. While you should prefer deciding...

Posted 3 months ago by Arne Hartherz.

When storing files for lots of records in the server's file system, Carrierwave's default store_dir approach may...

Posted 3 months ago by Henning Koch.

Webpack builds can take a long time, so we only want to compile when needed. This card shows what will...

Posted almost 6 years ago by Dominik Schöler.

Ruby has Enumerable.find(&block), which returns the first item in the collection for which the block evaluates to true.

Posted 3 months ago by Emanuel De.

Installing gems on a server that has no access to the internet (especially rubygems.org) requires to bundle the gems into...

Posted over 6 years ago by Henning Koch. help.github.com

Please don't simply copy line number links from Github. The URL usually contains a branch name like master which...

This website uses short-lived cookies to improve usability.
Accept or learn more