Welcome To Snipplr


Everyone's Recent Ruby Snippets Tagged rails



1 2 3 Next »
This snippet is Polish-language specific. This class expands a number (Fixnum or Bignum) into a string with a textual representation of that number in Polish language. Currency suffix supported. Example: 456 -> "four hundred fifty six" (but in Polis...
0 804 posted 18 years ago by komor
1 1010 posted 18 years ago by andyh
by xurde
2 1288 posted 18 years ago by xurde
1 1060 posted 19 years ago by andyh
1 1003 posted 19 years ago by andyh
1 1008 posted 19 years ago by bbuckley
Add foreign key support for migration
1 987 posted 19 years ago by ctran
Add a method to ActiveRecord::Migration to automatically drop created tables/indexes within the current migration file.
1 865 posted 19 years ago by ctran
To assert the difference in values before and after some code blocks. Save this as assert_helper.rb and include it in your test_helper.rb
1 1016 posted 19 years ago by ctran
The key here is display:none being in the style attribute of the affected div. It will not work if it's in a separate CSS file.
6 2157 posted 19 years ago by tjstankus
2 1255 posted 19 years ago by darthapo
A fairly DRY way to test for required attributes of a model. It's sort of an alternative to fixtures. It breaks the one-assertion-per-test rule that some people favor. Drop in your unit test and edit as necessary. A better (yet not quite perfect)...
3 2054 posted 19 years ago by tjstankus
2 1159 posted 19 years ago by tjstankus
1 2 3 Next »