Skip to content

Commit

Permalink
Fixes assaf#24 Experiment#created_at is nil
Browse files Browse the repository at this point in the history
  • Loading branch information
assaf committed Oct 7, 2010
1 parent 689b05a commit 30e97fb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/vanity/experiment/base.rb
Expand Up @@ -81,7 +81,9 @@ def initialize(playground, id, name, options = nil)
attr_reader :id

# Time stamp when experiment was created.
attr_reader :created_at
def created_at
@created_at ||= connection.get_experiment_created_at(@id)
end

# Time stamp when experiment was completed.
attr_reader :completed_at
Expand Down Expand Up @@ -166,7 +168,6 @@ def destroy
def save
return unless @playground.collecting?
connection.set_experiment_created_at @id, Time.now
@created_at = connection.get_experiment_created_at(@id)
end

protected
Expand Down

0 comments on commit 30e97fb

Please sign in to comment.