collectiveidea / awesomeness

Collective Idea's Awesomeness. A collection of useful Rails bits and pieces.

This URL has Read+Write access

awesomeness / README
3f93413d » danielmorrison 2007-02-28 Added some awesomeness 1 Collective Idea's Awesomeness
0c412207 » danielmorrison 2007-06-26 Cleaned up core extensions,... 2 =============================
3f93413d » danielmorrison 2007-02-28 Added some awesomeness 3
96c269b3 » danielmorrison 2007-03-27 Updated docs 4 A collection of stuff that we use often, but not generic enough to go in another plugin.
3f93413d » danielmorrison 2007-02-28 Added some awesomeness 5
0c412207 » danielmorrison 2007-06-26 Cleaned up core extensions,... 6 If you've stumbled across this and love/hate it, let us know!
7
acc7c29e » brandon 2008-10-01 Added note about compatibility 8 == Compatability
9
10 This plugin is compatible with edge-rails that is slated to be Rails 2.2. For a version compatible with 2.1, check out the "rails-2.1" tag from git.
11
8e538b37 » brandon 2008-04-27 updated docs 12 == Core Extensions
13
14 * Object#tap (http://moonbase.rydia.net/mental/blog/programming/eavesdropping-on-expressions)
15
16 * String#widont to make typography nicer (http://shauninman.com/archive/2006/08/22/widont_wordpress_plugin)
17
18 * Array#uniq with a block
19
20 >> %w(the cow jumped over the moon).uniq {|s| s.length }
21 => ["the", "jumped", "over"]
22
23 * Round floats to the nearest x
24
25 >> 5.38475.round(0.5)
26 => 5.5
27
28 * Hash goodies
29
30 >> {:a => [1,3,4], :b => [2,5]}.without(:a => 1)
31 => {:a => [3,4], :b => [2,5]}
32
33 >> {:a => "", :b => nil, :c => 1}.compact
34 => {:c => 1}
35
36 * And more…
37
38 == Rails Helpers
39
40 * Unicode TextHelper additions that change the default truncate & excerpt string to an elipsis (…) instead of just three periods (...)
41
42 * Add widont to textilize methods
43
44 * Transparent removal of trailing slashes in URLs
45
46 == Rake Tasks
47
48 == Capistrano Recipes
49
50 * Use :remote_cache by default
51
52 * Disable and enable web during restarts
53
54 * Run deploy:cleanup after deploys
55
56 * Backups