Re: [Rails] before_update callback is called when new record is created

2014-10-16 Thread Brian Sammon
On Thu, 16 Oct 2014 21:51:53 +0100 Colin Law wrote: > > Well, I've created an issue in the rails issue tracker. We shall see. > > Can you post a link please? https://github.com/rails/rails/issues/17289 -- You received this message because you are subscribed to the Google Groups "Ruby on Rai

Re: [Rails] before_update callback is called when new record is created

2014-10-16 Thread Colin Law
On 16 October 2014 21:16, Brian Sammon wrote: > On Thu, 16 Oct 2014 20:56:28 +0100 > Colin Law wrote: > >> Strictly it will be during event.save call (before the UPDATE). >> Presumably it is adding the room that is triggering the problem. It >> does look like a bug to me. Do you know whether it

Re: [Rails] before_update callback is called when new record is created

2014-10-16 Thread Brian Sammon
On Thu, 16 Oct 2014 20:56:28 +0100 Colin Law wrote: > Strictly it will be during event.save call (before the UPDATE). > Presumably it is adding the room that is triggering the problem. It > does look like a bug to me. Do you know whether it happened with > earlier versions of Rails? If not the

Re: [Rails] before_update callback is called when new record is created

2014-10-16 Thread Colin Law
On 16 October 2014 20:14, Brian Sammon wrote: > On Thu, 16 Oct 2014 19:58:52 +0100 > Colin Law wrote: > >> On 15 October 2014 22:01, Brian Sammon >> wrote: >> > All my tables/models have a "revision" field, and I have a >> > before_update callback to increment the revision field. >> > >> > Among

Re: [Rails] before_update callback is called when new record is created

2014-10-16 Thread Brian Sammon
On Thu, 16 Oct 2014 19:58:52 +0100 Colin Law wrote: > On 15 October 2014 22:01, Brian Sammon > wrote: > > All my tables/models have a "revision" field, and I have a > > before_update callback to increment the revision field. > > > > Among my tables are: > > events > > rooms > > events_room

Re: [Rails] before_update callback is called when new record is created

2014-10-16 Thread Colin Law
On 15 October 2014 22:01, Brian Sammon wrote: > All my tables/models have a "revision" field, and I have a > before_update callback to increment the revision field. > > Among my tables are: > events > rooms > events_rooms > > In my Event model, I have: > has_many :eventRooms > has_many(:

Re: [Rails] before_update callback is called when new record is created

2014-10-16 Thread Brian Sammon
On Thu, 16 Oct 2014 09:58:16 -0400 Brian Sammon wrote: > > All my tables/models have a "revision" field, and I have a > > before_update callback to increment the revision field. > > > > Among my tables are: > > events > > rooms > > events_rooms > > > > In my Event model, I have: > > has

Re: [Rails] before_update callback is called when new record is created

2014-10-16 Thread Brian Sammon
Oh, yeah, and the standard details: Rails 4.1.6 MariaDB SuSE Linux On Wed, 15 Oct 2014 17:01:56 -0400 Brian Sammon wrote: > All my tables/models have a "revision" field, and I have a > before_update callback to increment the revision field. > > Among my tables are: > events > rooms > even

[Rails] before_update callback is called when new record is created

2014-10-15 Thread Brian Sammon
All my tables/models have a "revision" field, and I have a before_update callback to increment the revision field. Among my tables are: events rooms events_rooms In my Event model, I have: has_many :eventRooms has_many(:rooms, :through => :eventRooms) When I create an event, assign a r