[Rails] A model's validators as json

2014-07-27 Thread Kurt Mueller
Hey guys, I've been working with Rails and a number of frontend js frameworks and libs, including Ember, Angular, and React. While all three libraries are powerful in their own regard, one pain point (for me at least) has always been form validation. I've always hated having to keep my model va

Re: [Rails] A model's validators as json

2014-07-29 Thread Antônio Augusto Sousa Britto
I could guess that the method as_json doesn't intend to serialize your module/class name. One option is to provide inside each class an attirbute with the name of the validator, i.e. "validation = self.name" 2014-07-26 20:45 GMT-03:00 Kurt Mueller : > Hey guys, > > I've been working with Rails