Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

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

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 generators
Octocat-spinner-32 lib
Octocat-spinner-32 recipes
Octocat-spinner-32 tasks
Octocat-spinner-32 test
Octocat-spinner-32 README
Octocat-spinner-32 Rakefile
Octocat-spinner-32 init.rb
Octocat-spinner-32 install.rb
README
Collective Idea's Awesomeness
=============================

A collection of stuff that we use often, but not generic enough to go in another plugin.

If you've stumbled across this and love/hate it, let us know!

== Compatability

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.

== Core Extensions

* Object#tap (http://moonbase.rydia.net/mental/blog/programming/eavesdropping-on-expressions)

* String#widont to make typography nicer (http://shauninman.com/archive/2006/08/22/widont_wordpress_plugin)

* Array#uniq with a block

  >> %w(the cow jumped over the moon).uniq {|s| s.length }
  => ["the", "jumped", "over"]

* Round floats to the nearest x

  >> 5.38475.round(0.5)
  => 5.5

* Hash goodies

  >> {:a => [1,3,4], :b => [2,5]}.without(:a => 1)
  => {:a => [3,4], :b => [2,5]}

  >> {:a => "", :b => nil, :c => 1}.compact
  => {:c => 1}

* And more…

== Rails Helpers

* Unicode TextHelper additions that change the default truncate & excerpt string to an elipsis (…) instead of just three periods (...)

* Add widont to textilize methods

* Transparent removal of trailing slashes in URLs

== Rake Tasks

== Capistrano Recipes

* Use :remote_cache by default

* Disable and enable web during restarts

* Run deploy:cleanup after deploys

* Backups
Something went wrong with that request. Please try again.