yakryder / muscle-wizards

Contest prep app
0 stars 1 forks source link

More robust validation available #54

Closed dummied closed 8 years ago

dummied commented 8 years ago

https://github.com/SherSpock/muscle-wizards/blob/master/app/models/message.rb#L5

validates :body, :user, :conversation, presence: true

Would validate not just the presence of the id, but the existence of the associated record as well.