On Jul 13, 3:02 am, Rick <[email protected]> wrote:
> On Sun, Jul 12, 2009 at 9:50 PM, JangoSteve<[email protected]> wrote:
>
> Good point, about saving the games first,  but I'm curious, what the
> heck is going on that I can't seem to get match to save even with
> those game save lines commented out (as above.) I'm just trying to get
> a Match to save.
>
> If I call match.save and it doesn't save shouldn't the script throw an
> error? I guess that's why I'm a little stumped since the script seems
> to fun just fine.

save just returns true/false. save! throws an error

One way of getting really confusing results is accidentally
overwriting core active record methods (though from what you have
shown so far you haven't)

Other than that, there's always stepping through it with the debugger
until you understand what's up.

Fred
>
> When I use the rails app UI to add match it seems to save just fine as
> you can see by a quick call in the console:
>
> >> Match.find(:all)
>
> => [#<Match id: 1, match_date: "2009-07-12 00:00:00", overtime: false,
> shootout: false, linechanges: true, period_length: 20, game_version:
> nil, notes: nil>]
>
> I'm sure this is going to turn out to be something really stupid, so
> I'm ready for the 'duh' moment to hit me:)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to