[Rails] Re: why is wrong with this code - the model "save!" method does not seem to give a correct response back?

2008-12-15 Thread Greg Hauptmann
great - interesting how I've been using the "transaction" model for some months but it is only since I've had a new model that has an association with it (i.e. the "allocation" model in this case) that I've noticed an issue... :) On Mon, Dec 15, 2008 at 7:24 PM, Chris Bartlett wrote: > > On Dec

[Rails] Re: why is wrong with this code - the model "save!" method does not seem to give a correct response back?

2008-12-15 Thread Chris Bartlett
On Dec 15, 10:59 am, Frederick Cheung wrote: > On 14 Dec 2008, at 21:50, Greg Hauptmann wrote: > > > > Q2 - Is there a list of  "reserved names" available somewhere one   > > could  use as a check for model names? > > Not that I know of. http://wiki.rubyonrails.org/rails/pages/ReservedWords (Goo

[Rails] Re: why is wrong with this code - the model "save!" method does not seem to give a correct response back?

2008-12-14 Thread Greg Hauptmann
excellent thanks - not sure how long I would have looked for this one I've tried to summarise this on my blog for furture reference at http://blog.gregnet.org/?p=17 (i.e. on http://blog.gregnet.org) On Mon, Dec 15, 2008 at 7:59 AM, Frederick Cheung < frederick.che...@gmail.com> wrote: > > > On 1

[Rails] Re: why is wrong with this code - the model "save!" method does not seem to give a correct response back?

2008-12-14 Thread Frederick Cheung
On 14 Dec 2008, at 21:50, Greg Hauptmann wrote: > PS. Just adding another followup question if I may: > > Q1 - For the future should there been a way for me to have worked > this out myself? i.e. without knowing the internals of Rails, but > by using log information, trying things in conso

[Rails] Re: why is wrong with this code - the model "save!" method does not seem to give a correct response back?

2008-12-14 Thread Greg Hauptmann
PS. Just adding another followup question if I may: Q1 - For the future should there been a way for me to have worked this out myself? i.e. without knowing the internals of Rails, but by using log information, trying things in console etc Q2 - Is there a list of "reserved names" available some

[Rails] Re: why is wrong with this code - the model "save!" method does not seem to give a correct response back?

2008-12-14 Thread Greg Hauptmann
wow - thanks heaps For the future should there been a way for me to have worked this out myself? i.e. without knowing the internals of Rails, but by using log information, trying things in console etc Tks On Sun, Dec 14, 2008 at 11:37 PM, Frederick Cheung < frederick.che...@gmail.com> wrote: >

[Rails] Re: why is wrong with this code - the model "save!" method does not seem to give a correct response back?

2008-12-14 Thread Frederick Cheung
On 14 Dec 2008, at 10:54, Ryan Bigg wrote: > Transaction is a reserved class in Rails. That's not quite the whole story. The issue that if you have belongs_to transaction in your model that creates a transaction method for reading the association. This overwrites an internal method called t

[Rails] Re: why is wrong with this code - the model "save!" method does not seem to give a correct response back?

2008-12-14 Thread Ryan Bigg
Transaction is a reserved class in Rails. - Ryan Bigg Freelancer http://frozenplague.net On 14/12/2008, at 9:13 PM, Greg Hauptmann wrote: > still stuck here > > When I create a new "allocation" model object, I check it is valid > OK, but when I "save!" it I just get a "nil"? What wou

[Rails] Re: why is wrong with this code - the model "save!" method does not seem to give a correct response back?

2008-12-14 Thread Greg Hauptmann
still stuck here When I create a new "allocation" model object, I check it is valid OK, but when I "save!" it I just get a "nil"? What would this imply. There's no error as such. It is true to say that I populated the non-null columns with relationship with ID's of just "1" (i.e. didn't ensure