how to set session domain in rails 2.3
   Sunday July 05, 2009

The guys from rails changed the way to set the base domain for session storage, from rails 2.2 to 2.3. .

so heres how to do it now (much nicer imho)

In any of your environment files simply add

config.action_controller.session = { :domain => ".domain.com" }

This will allow session sharing between subdomains. simply as pie!


 

ie6Warning Message jquery plugin
   Tuesday June 09, 2009

This little plugin when bound to a div, will show() the div when the user has an ie6 browser or below. If a user clicks on the div, the message will fade away, set a cookie and not be shown again for 20 days.

find it here


 

jquery.tabbify
   Sunday June 07, 2009

I've just pushed a copy of my tabbify plugin for jquery up to github. It simply makes it easy to create tabs, and it saves state on click.

Its very small, and useable. check out the readme for more details.

http://github.com/markgandolfo/jquery.tabbify/tree/master


 

Stringify Time
   Thursday June 04, 2009

Stringify Time


Stringify Time is a plugin for ruby on rails that will convert time into human readable text from minutes, and to minutes from human readable time.

>> "1d 3h 4m".minutes
=> 1624

You can use any of combination of time blocks
"3h".minutes => 180
"1h 2h".minutes => 180
"240m".minutes => 240

It also can go back from minutes to user readable time with the humanize Integer method

180.humanize => "3h"
1624.humanize => "1d 3h 4m"

You can get the plugin markgandolfo's git hub


 

Find List
   Thursday June 04, 2009

Find List


find list is an active record extension that lets you return an array to be used in a select.
i.e.
@users = User.list
f.select 'User', @users

You can even use all of the find features.
@users = User.list(:conditions => { :active => 1 })