Most of the JavaScript snippets have code that manipulates the DOM. For that reason dom manipulating javascript code should have...

If you see a stacktrace beginning with lines like this: E, [2015-07-16T09:23:10.896146 #23308] ERROR -- : app error: "incompatible marshal file format (can't be read)\n...

Consul 0.6.1+ gives your Power class a number of static methods that behave neutrally in case Power.current is nil. This allows you to create authorization-aware models that still work...

...user.email, user.income] end end end There is a long selection of class methods that behave neutrally in case Power.current is nil: Call Equivalent Power.for_model(Note) Power.current.present? ? Power.current.notes : Note

ActiveRecord::RecordNotFound errors provide quite meaningful error messages that can provide some insight on application details. Consider the following:

Even when you're using bundler, it might be significant in which order your gems are listed in your Gemfile...

After I upgraded to Mac OS X Mavericks, I regularly got this error message when running Cucumber features with Selenium...

...and UTF-8) this might be what happened. You can override this behaviour by manually setting Encoding.default_external = 'UTF-8'. You should do this at the very beginning of your...

There are many fun Unicode characters like ▲ or ☯. You might be tempted to use them for graphical elements in lieu...

Today, this line made me trouble. Can you spot the mistake? match 'sitemap.xml' => 'feeds#sitemap', :constraints => { :format => 'xml' }, :as => 'sitemap...

Imagine the following HTML structure, where the scrolling container has overflow-y: scroll: +--scrolling container+-+ | | | +-child element+----+ | | | ++iframe++ | | | | | | | | | | | | | | +-----------------------+ | | | | <-- actually cut...

When you open up a story to only have a look at it, close it by pressing the "Cancel" button...

makandra dev

...clarify: This not only disables the memoization, but will also return wrong results! The best solution is to use the Memoizer gem instead...

Take care when using rescue_from to rescue multiple errors. The following will not work, because later rescue_from statements...

If you make a gem with Bundler, you will get a rake release task that will instantly publish your gem...

...many includes), this query may take several seconds to complete. If you encounter this behavior, a solution is to calculate the total count yourself and pass it to the pagination...

If you defined your association via class Article belongs_to "category" end and you try Article.scoped(:include => :category) you will get an error message in `preload_one_association': Association named...

...you misspelled it? (ActiveRecord::ConfigurationError) Solution Always define your assocations via symbol class Article belongs_to :category

makandra dev

A popular ruby idiom I keep stumbling upon is def do_some_thing_for(values) values = Array(values)

I've encountered a Ubuntu 16.04 today, where localhost resolved to ::1 instead of 127.0.0.1. This will not usually make...

makandra dev

RSpec's be_false behaves unexpectedly: nil.should be_false # passes, as the expectation returns true If you want to check for false, you need to do it like this:

When you get this error: No word lists can be found for the language "de". An aspell dictionary is missing...

dev.mysql.com

The next version of MySQL will include a built-in memcached daemon. This daemon can quickly get and set key/value...

github.com

Then the "sorted" select should be sorted But the "unsorted" select should not be sorted

shopify.com

Most web applications contain several examples of state machines, including accounts and subscriptions, invoices, orders, blog posts, and many more...

Probably was in the repository once and got deleted in a commit that you pulled.