Re: [Rails-core] Re: Feature Request: Delete associated records when model is saved

2016-02-18 Thread Jeremy Mickelson
I agree complete that `delete` and `destroy` should remove objects from the database immediately. The situation that I'm talking about is not really related to the deletion of individual objects, its about how associations behave. If I have a model with a has many, and I alter the array that

Re: [Rails-core] Re: Feature Request: Delete associated records when model is saved

2016-02-18 Thread Geoff Harcourt
One way you could handle this would be to add a virtual attribute to your model with `attr_accessor` called `marked_for_deletion`. You could then use that flag as a temporary change to your model without deleting it, and then delete those objects in the final DB transaction after the user approv

[Rails-core] Re: Feature Request: Delete associated records when model is saved

2016-02-18 Thread Jeremy Mickelson
In our specific project we have an object called CommunicationSetting that defines an automated email that a client is setting up. That setting has many different child objects, Filters for example, which would exclude or include people from the recipient list. In this example we would like th

Re: [Rails-core] Rails edit action getting too big

2016-02-18 Thread T.J. Schuck
This mailing list (rubyonrails-core) is intended for discussion about development of the framework itself, not usage of it. For support issues or usage questions like this one that are not issues with Rails itself, please post to the rubyonrails-talk mailing list ( http://groups.google.com/group/r

[Rails-core] Rails edit action getting too big

2016-02-18 Thread ajayg1567
In my current rails application , there are multiple tabs for the edit action. All tabs go to the same action. For example if i modify some input field in one tab , all the tabs parameters go to edit action.I need to send only those modified. Is there any suggestion for this scenario -- You re

Re: [Rails-core] Predictable seed

2016-02-18 Thread Ben Colon
A consistent database ... but with some random fields ;) I guess, it's simpler to run a seed with 1.times { User.create! :first_name => Faker::Name.first_name } than loading an hardcoded file with 1 users. Ben Le mercredi 17 février 2016 20:21:30 UTC+1, Derek Prior a écrit : > > Interes