stackoverflow.com

When you use ab to do some performance benchmarking, you might run into output like this: Complete requests: 200

blog.codeclimate.com

Rails’ reputation as a relatively secure Web framework is well deserved. Out-of-the-box, there is protection against many...

nt.ntnu.no

yaml4r is a juxtaposition of yaml documents and their Ruby couterpart. Thus, it does a great job as YAML-doc...

Sometimes you might want to limit the number of associated records in a has_many association, but cannot add a...

Spreewald's patiently repeats the given block again and again until it either passes or times out.

makandra dev

Ever wondered about the difference between def and define_method? Turns out there are three implicit contexts in Ruby. def...

The way Rational#to_s works on Ruby has changed from Ruby 1.9 on. Here is how to get the...

When a controller action redirects to an external URL (like http://somehost.com/some/path) you will find that this is hard...

To set a cookie in your test browser for cucumber tests, you need to know which driver you are using...

The following code doesn't work like expected: page.find(css_selector).find(other_css_selector) The second .find will search...

opensoul.org

Great presentation about writing Javascript like you write everything else: Well-structured and tested. JavaScript is no longer a toy...

tenderlovemaking.com

In Ruby, the meaning of protected and private is different from other languages like Java. (They don't hide methods...

stackoverflow.com

Access the Method object Dead simple: Get the method object and ask for its owner: "foo".method(:upcase) # => #

chartjs.org

Chart.js seems to be a good alternative to Google's Chart API and other commercial chart drawing libraries.

Rails flashes (FlashHash) track a list of used keys, which is not respected when comparing flash hashes.

coding.smashingmagazine.com

Smashing Magazine lists some handy tricks for print style sheets, all with CSS: Expand External Links For Print

browserhacks.com

The linked site lists a wealth of CSS hacks that let you apply styles to just that one browser. You...

Do not pass times to date attributes. Always convert times to dates when your application uses time zones. Background

ariejan.net

Rails understands a :limit options when you create columns in a migration. Its meaning depends on the column type, and...

robots.thoughtbot.com

Guide how to make fixes in other people's GitHub repositories. It's basically "Open Source Development 101".

Google Chrome saves your profile data in ~/.config/google-chrome. To transfer the profile to for example a system you have setup...

makandra dev

Sometimes it seems a favicon does not work because your browser displays an old version or (in case of local...

web.archive.org

TL;DR: You should generally use #size to count associated records. size Counts already loaded elements If the association is...

Here is a hacky way to load dumps directly from the source server, without fully copying them over and extracting...