You cannot use Array#join on an array of strings where some strings are html_safe and others are not...

Why secure-only cookies used to be necessary Cookies have an optional secure flag. It tells the browser to not...

ActiveSupport >= 3 has Date.parse('2011-02-10').beginning_of_quarter #=> 2011-01-01 Date.parse('2011-02-10').end_of_quarter #=> 2011-03-31 You can manually calculate the quarter index...

I have no idea how it's supposed to work (or why the don't have a print CSS), but...

Add a separator between left-aligned and right-aligned items. In the separator properties, set the style to "Transparent" and...

github.com

You can hook into Slack when using Capistrano for deployment. The slackistrano gem does most of the heavy lifting for...

When deleting a record in your Rails app, Carrierwave automatically takes care of removing all associated files. However, the file...

To test if you can connect to a host using password authentication and explicitly deny public key authentication:

On your credit card summary, you will find order numbers of rides with Deutsche Bahn ("DB BAHN A-NR XYZ123...

Don't use be_true to check if a value is true. It actually checks if it anything other than...

Sometimes you want Angular to watch an object only until a certain state is reached (e.g. an object appears in...

If you want to sort a Ruby array with a primary, secondary, etc. criterium, use a sort_by that contains...

...the inert field. It might might as well be removed from the page. This behavior is OK if the fields might as well be hidden, and you're just looking...

...for Structs are temporary data structures which just hold state and don't provide behaviour. In many cases you could use a simple hash as a data structure instead. However...

...are incredibly fast. If you have to handle lots of data it may be better to use hashes for performance reasons, even if the readability of the code suffers compared...

You want to use fields in your applications. However, your desktop users may encounter some weird quirks: Aside from allowing...

This is an extension to PostgreSQL vs MySQL: How to UPDATE using a JOIN. UPDATE employees SET department_name = departments.name...

...addition of both margins takes place but the maximum of both is applied. This behavior is called collapsing margins. Oftentimes it is a good behavior but collapsing margins can be...

...the previous sibling of the parent box. Nevertheless there are some exceptions where the behavior of vertical collapsing margins is not used. Exceptions when margins do not collapse

If you are using PDFKit / wkhtmltopdf, you might as well want to use custom fonts in your stylesheets. Usually this...

...in an encrypted YAML file. Usage is simple: each key in the credentials file becomes a method on Rails.application.credentials, returning the corresponding secret. # Credentials file file_storage_secret: superstrongsecret

In rare circumstances, you want to use a websites full domain (say https://mywebsite.com) while testing in dev mode. This...

github.com

This might be relevant for us since we're often managing customer documents in our apps. I played around with...

blog.plenz.com

If you recorded a bad fix for a conflict, you can tell git to forget that bad resolution:

you should always has_many :join_models, :dependent => :destroy

We have now updated/created two gems that implement the requirements above using the best practices we know of: assignable_values: ActiveRecord macro to restrict the values that may be...