1
2
3
4
@week_endings ||= Actual.get_week_endings(4.weeks.ago.to_date)
last = @week_endings.last.week_ending
6.times do |i|
...

Ruby On Appending future dates to t...

by Adkron, April 23, 2008 12:17

get rid of the last+7*(i+1)...

F04aeb28129f653b207e8b5d92706096 Talk
1
2
3
def self.valid?(key)
  !((h = find_by_key(key)).nil? || h.invitation_details_count >= h.total)
end

Ruby On Better Nest Ifs

by Adkron, April 22, 2008 03:08

Wait that doesn't work. I ...

F04aeb28129f653b207e8b5d92706096 Talk
1
2
3
def self.valid?(key)
  (h = find_by_key(key)).nil? || h.invitation_details_count >= h.total
end

Ruby On Better Nest Ifs

by Adkron, April 22, 2008 03:03

Like Jeremy on I like my st...

F04aeb28129f653b207e8b5d92706096 Talk
1
2
3
4
class UserMailer < ActionMailer::Base
  def signup_notification 
    Proc.new  do  |user|
...

Ruby On before_filter in model???

by Adkron, April 22, 2008 02:24

Not sure if this is much be...

F04aeb28129f653b207e8b5d92706096 Talk