<FromGitter>
<andrewc910> Any way to do something like `self.errors.add(:my_attribute, "Too short")
<FromGitter>
<Blacksmoke16> im not a fan of the `errors` array
<FromGitter>
<Blacksmoke16> would be better to just raise an exception or something versus silently failing to save etc
<FromGitter>
<andrewc910> They're good for flash messages! lol From the user perspective, they submit a register form, server recieves the response, tries to save, fails, passes error message to flash, the browser refreshes with said error message available. ⏎ ⏎ Going the exception route, user inputs too short of a password, exception is raised, they get a 500 error
<FromGitter>
<Blacksmoke16> well the idea would be you would use like a 422 error that contains the failed validations
<FromGitter>
<Blacksmoke16> i dont really know anything about server rendered stuff but yea..
<FromGitter>
<andrewc910> Wasn't aware of 422. I need to read up on more status codes. ⏎ ⏎ But i don't think a full error is in order. Like if you reset your password but took to long to click the email link, i want to raise an flash message that states 'Token expired, please reset your password again'
<FromGitter>
<Blacksmoke16> fair enough
<FromGitter>
<andrewc910> i have to create an api. Jennifer & Granite handle errors completely differently. Fun.
<FromGitter>
<Blacksmoke16> gl
FromGitter has quit [Remote host closed the connection]