makandra dev
sitepoint.com

Scope is all about where something is visible. It’s all about what (variables, constants, methods) is available to 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...

Put the line below in the respective env.rb file to make your action controllers raise an ActionController::UnpermittedParameters error when...

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

select2 is a great jQuery library to make (large) fields more usable. For Bootstrap 3 there is select2-bootstrap-theme...

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...

Nowadays it is fairly easy to intercept and modify mails globally before they are sent. All you have to do...

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...

stackoverflow.com

This card will show you how to use git rebase --onto without confusion. Use case: You've got two feature...

You can use gem list to list all gems available from a remote gem server: gem list -r --clear-sources...

By default Middleman generates files with a .html extension. Because of this all your URLs end in /foo.html instead of...

Middleman is a static page generator that brings many of the goodies that Rails developers are used to.

Sometimes, through some firewall or proxy misconfiguration, you might have to deploy to a server that cannot access the git...

makandra dev
stackoverflow.com

Assuming you're wanting to undo the effects of git rm or rm followed by git add -A or something...

chris.beams.io

Separate subject from body with a blank line Limit the subject line to 50 characters (max. 72), include...

Database connections are not thread-safe. That's why ActiveRecord uses a separate database connection for each thread.

rspec.info

In modern default RSpec configurations, your tests are usually run in random order. This helps to detect "flickering" tests that...

In case you want to require a gem, that is not in the Gemfile of you bundle and therefore not...

blog.jetbrains.com

RubyMine allows bookmarking lines of code. This is super-helpful when working on a complex problem. I've been using...