[Rails-core] Re: HttpOnly cookies by default

2014-05-17 Thread Gabriel Sobrinho
I would argue that if you have some information that can't be hijacked and even parsed on javascript (httponly cookies can't be read on javascript at all), why would you use cookies instead of the rails session? On Friday, May 16, 2014 7:07:42 PM UTC-3, fedesoria wrote: I would like to see

[Rails-core] Ability to customise the errors JSON response for nested attributes

2014-05-17 Thread Gabriel Sobrinho
Hello guys, We're working in some applications where we need to customise the JSON errors output in a more robust way (the front-end have a lot of backbone stuff). When a active record object fails to create, rails render this response: { :employments.company=[can't be blank],

[Rails-core] Re: Ability to customise the errors JSON response for nested attributes

2014-05-17 Thread Gabriel Sobrinho
The pull request I mentioned: https://github.com/rails/rails/pull/8638 On Saturday, May 17, 2014 10:48:43 AM UTC-3, Gabriel Sobrinho wrote: Hello guys, We’re working in some applications where we need to customise the JSON errors output in a more robust way (the front-end have a lot of

[Rails-core] Re: Ability to customise the errors JSON response for nested attributes

2014-05-17 Thread Gabriel Sobrinho
Got a working prototype using a monkey patch: https://gist.github.com/sobrinho/f634f52a4ab7d47588f5 But object.errors.full_messages is not working anymore, we may need to reimplement the full_messages method. On Saturday, May 17, 2014 10:50:50 AM UTC-3, Gabriel Sobrinho wrote: The pull

[Rails-core] smart eager loading and caching

2014-05-17 Thread Lawrence Wu
I'd like to deprecate methods like includes and eager_load in Rails since I think it is possible to automatically detect when they are needed. Ideally the developer could know very little about how databases work and still get very efficient queries using just the ORM. What do other people

Re: [Rails-core] smart eager loading and caching

2014-05-17 Thread richard schneeman
There's a ton of magic in active record as is. If you have ideas on a big change like the one you are suggesting, you should fork active record and get it working to get feedback. After that it's worth discussing. If you really want to help here, take a look at open issues tagged with active