Welcome To Snipplr


Everyone's Recent Ruby Snippets



1 ... 8 9 10 11 12 Next »
1 126 posted 14 years ago by gdonald
1 141 posted 14 years ago by gdonald
1 133 posted 14 years ago by gdonald
by xurde
2 172 posted 14 years ago by xurde
1 121 posted 14 years ago by andyh
4 140 posted 14 years ago by miklophone
1 155 posted 14 years ago by bbuckley
Add foreign key support for migration
1 131 posted 14 years ago by ctran
Add a method to ActiveRecord::Migration to automatically drop created tables/indexes within the current migration file.
1 94 posted 14 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 130 posted 14 years ago by ctran
Simple HTTP server daemon (webrick).
1 125 posted 14 years ago by ishikawa
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 186 posted 14 years ago by tjstankus
2 177 posted 14 years ago by Catfish
1 122 posted 14 years ago by ringo
2 145 posted 14 years ago by darthapo
This method generates random (and printable) ascii characters.
1 172 posted 14 years ago by ishikawa
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 183 posted 14 years ago by tjstankus
2 174 posted 14 years ago by tjstankus
2 151 posted 14 years ago by yaguta
3 187 posted 14 years ago by Catfish
reference: \n http://www.ruby-doc.org/stdlib/libdoc/net/http/rdoc/classes/Net/HTTP.html http://www.ruby-doc.org/stdlib/libdoc/net/http/rdoc/index.html
7 191 posted 2021 years ago by aravet
1 ... 8 9 10 11 12 Next »