In specs, the session never persists but is always a new object for each request. Data put into the session...

thejh.net

What you copy may not be what you see in the browser. Here is an online tool to determine the...

Note: This technique is confusing and slows down your test suite. Copy the attached code to features/support. This gets you...

blog.codeclimate.com

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

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

Unfortunately, Capybara does not offer a switch to disable cookies in your test browser. However, you can work around that...

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

singlepageappbook.com

Great look at the tradeoffs between progressive enhancement with jQuery or similiar, vs. client-side views.

stackoverflow.com

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

coding.smashingmagazine.com

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

cssmatic.com

CSSmatic lets you play around with four rather complex CSS stylings and gives you CSS or SASS code to use...

robots.thoughtbot.com

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

web.archive.org

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

tl;dr: Do not use merge! for session hashes. Use update instead. Outline Let's assume you're modifying the...

JavaScript has no built-in functions to compare two objects or arrays for equality of their contained values.

github.com

MongoMapper is a MongoDB adapter for Ruby. We've forked it so it works for Rails 2.3.x applications running...

apidock.com

Ruby 1.9 changed the default behavior of Module.const_defined? from what it was in Ruby 1.8 -- this can be especially...

If you need to capture signatures on an IPad or similar device, you can use Thomas J Bradley's excellent...

makandra dev
rails-sqli.org

This page lists many query methods and options in ActiveRecord which do not sanitize raw SQL arguments and are not...

makandra dev
github.com

UnicodeUtils implements Unicode algorithms for case conversion, normalization, text segmentation and more in pure Ruby code.

In our continued quest to extract proven code snippets from makandropedia into tested and upgradable gems, we have released Edge...

TLDR: Ruby class variables (@@foo) are dangerous in many ways. You should avoid them at all cost. See bottom of...