test/fixtures/topic.rb in gettext-1.10.0-mswin32 vs test/fixtures/topic.rb in gettext-1.90.0
- old
+ new
@@ -9,15 +9,30 @@
before_destroy :destroy_children
def parent
Topic.find(parent_id)
end
+
+ def topic_id
+ id
+ end
protected
+ def approved=(val)
+ @custom_approved = val
+ write_attribute(:approved, val)
+ end
+
def default_written_on
self.written_on = Time.now unless attribute_present?("written_on")
end
def destroy_children
self.class.delete_all "parent_id = #{id}"
+ end
+
+ def after_initialize
+ if self.new_record?
+ self.author_email_address = 'test@test.com'
+ end
end
end