Skip to content
Tim edited this page Aug 11, 2015 · 2 revisions

###Errors from saving active records ####code to put in controllers

  • t.save will return false
  • t.errors.messages => {status:["can't be blank"]} errors are contained here
  • t.errors[:status][0] => "can't be blank" - to display the first error

Clone this wiki locally