class WrongReply
Public Instance Methods
check_content_mismatch()
click to toggle source
# File activerecord/test/models/reply.rb, line 36 def check_content_mismatch if attribute_present?("title") && attribute_present?("content") && content == "Mismatch" errors[:title] << "is Content Mismatch" end end
check_empty_title()
click to toggle source
# File activerecord/test/models/reply.rb, line 28 def check_empty_title errors[:title] << "Empty" unless attribute_present?("title") end
check_wrong_update()
click to toggle source
# File activerecord/test/models/reply.rb, line 46 def check_wrong_update errors[:title] << "is Wrong Update" if attribute_present?("title") && title == "Wrong Update" end
errors_on_empty_content()
click to toggle source
# File activerecord/test/models/reply.rb, line 32 def errors_on_empty_content errors[:content] << "Empty" unless attribute_present?("content") end
title_is_wrong_create()
click to toggle source
# File activerecord/test/models/reply.rb, line 42 def title_is_wrong_create errors[:title] << "is Wrong Create" if attribute_present?("title") && title == "Wrong Create" end