search for: new_admin_comments

Displaying 1 result from an estimated 1 matches for "new_admin_comments".

2011 Jun 15
1
.new_record? and :_destroy
...he comment was set in my comment view partial (I want to delete a comment), it seems like this iterating over the comments with new_record? somehow resets that :_destroy flag. Am I doing something wrong here? Or, could someone give me a hint on a more simple way to do this validation.? Thanks !! new_admin_comments = false self.comments.each do |comment| new_admin_comments = true if comment.new_record? && comment.admin_comment == true end if admin_email.blank? && new_admin_comments == true errors.add_to_base("Admin email address required.") end -- You received this message b...