1 2 3 4
# Ruby 1.8.6 pools = {1 => [1,2,3], 2 => [3,4,5], 3 => [5,6,7]} values = pools.values.flatten ...
Ruby On Find the Intersection of Ar...
by Jeremy,
July 31, 2008 21:59
1 2 3 4
class User named_scope :older_than, lambda { |u| { :conditions => ['age > u', u.age] } } end ...
Ruby On How to make instance variab...
by Jeremy,
July 31, 2008 14:21
If you're using Rails 2.1, ...
1 2
event_times = events.collect { |event| event.datetime.strftime("%I:%M %p") } times = times.reject { |time| event_times.include?(time.strftime("%I:%M %p'")) }
1 2 3 4
{
"0" => "24142",
"1" => "15151",
...
Ruby On Looking for comments on sty...
by Jeremy,
June 20, 2008 17:19
Instead of case/when/then, ...


Here are a couple of option...