makandra dev

If your Angular app has some decent complexity, it will not be easy to use UI Router straight away. Here...

github.com

When an Rspec example fails, I usually investigate by running that example again using rspec . However, this does not work...

You are not using javascript tests The file is served from a public folder (not via controller) Problem description...

makandra dev

An end-to-end test (E2E test) is a script that remote-controls a web browser with tools like Selenium...

When your public-facing application has a longer downtime for server maintenance or long migrations, it's nice to setup...

Browsers support different types of redirects. Be very careful with these status codes: 301 Moved Permanently 308 Permanent Redirect

Slides for Henning's talk on Sep 21st 2017. Understanding sync vs. async control flow Talking to synchronous (or "blocking...

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

Let's say you have a folder images and want to to move all files in there to a new...

Let's say you have a form that you render a few times but you would like to customize your...

If another session is accessing your database you are trying to reset or drop you might have seen the following...

docs.ruby-lang.org

Use return to return from a method. return accepts a value that will be the return value of the...

I frequently find myself needing a combination of group_by, count and sort for quick statistics. Here's a method...

There are many approaches out there how you can import data from a legacy application to a new application. Here...

You can use local copies of gems in your Gemfile like this: gem 'spreewald', path: '~/gems/spreewald' As soon as you...

github.com

Use Traim to build a RESTful API for your ActiveRecord models with very little code. Traim assumes your API resources...

Sometimes you add Paperclip image styles, sometimes you remove some. In order to only keep the files you actually need...

makandra dev

In the ruby shell (IRB) and rails console the return value of the previous command is saved in _ (underscore). This...

You can configure a Ubuntu system as a gateway in order to share it's internet connection (maybe via WLAN...

Webpack is the future. We're using it in our latest Rails applications. For tests, we want to compile assets...

makandra dev
rawgit.com

RawGit serves raw files directly from GitHub with proper Content-Type headers, for CDN-like purposes. Note that they don...

When using GROUP BY, MySQL now complains if the SELECT includes columns which are not part of the GROUP BY...

When you have a multi-server setup, you'll be adding a new server from time to time. Before doing...

Rails supports time zones, but there are several pitfalls. Most importantly because Time.now and Time.current are completely different things and...