Say you want to allow users to emphasize some string, but the whole markdown thing would be far too much...
view_context.helper_method('args') Rails 2 ApplicationController.helpers.helper_method('args') Also see How to use helper methods inside a model...
Spreewald's patiently repeats the given block again and again until it either passes or times out.
Ever wondered about the difference between def and define_method? Turns out there are three implicit contexts in Ruby. def...
When a controller action redirects to an external URL (like http://somehost.com/some/path) you will find that this is hard...
Smashing Magazine lists some handy tricks for print style sheets, all with CSS: Expand External Links For Print
CSSmatic lets you play around with four rather complex CSS stylings and gives you CSS or SASS code to use...
Rails understands a :limit options when you create columns in a migration. Its meaning depends on the column type, and...
Here is a hacky way to load dumps directly from the source server, without fully copying them over and extracting...
In Ruby 1.9, instance_eval calls the block the with receiver as the first argument: In Ruby 1.8, receiver.instance_eval...
Prepare to explain customers what changed if your application renders PDF documents to users.
If you need to capture signatures on an IPad or similar device, you can use Thomas J Bradley's excellent...
So you're using multiple remotes that offer the same branch? $ git branch -a | grep my-branch remotes/something/my-branch remotes/origin/my-branch
UnicodeUtils implements Unicode algorithms for case conversion, normalization, text segmentation and more in pure Ruby code.
TLDR: Ruby class variables (@@foo) are dangerous in many ways. You should avoid them at all cost. See bottom of...
Ruby has two different ways to match the start and the end of a text: ^ (Start of line) and $ (End...
Behave.js is a lightweight library for adding IDE style behaviors to plain text areas, making it much more enjoyable to...
validates_uniqueness_of is not sufficient to ensure the uniqueness of a value. The reason for this is that in...
Awesome color schemes for RubyMine, Sublime Text 2 and other editors. To install the themes into your Rubymine, copy intellij...
The way MySQL's FULLTEXT tokenizer splits text into word tokens might not always be what you need. E.g. it...
I needed a way to make my apps full screen from bash scripts. There is no super-easy way, but...
When doing a git blame, git will blame the person who added or removed white space in a line (e.g...
Microsoft Office pre-fetches hyperlinks using an internal DLL (which doesn't know about your cookies), follows all redirects and...
TLDR: In tests you need to clean out the database before each example. Use :transaction where possible. Use :deletion for...