Pointers on error handling?

Paul Singh's Avatar

Paul Singh

24 Dec, 2009 02:10 AM

Hey guys,

I'm not quite sure I'm doing this correctly and could use some guidance. I've created an after_save action on my user model that registers the user with CG (along with their credit card info, etc). Is that the recommended way to do this?

The problem I'm running into is that I'm not quite sure how to display CG errors back to the user when I do things my way. (Since it's an after_create call, the user has already been created which causes some headaches if the user can't be setup in CG for some reason...)

Any tips?

Paul

  1. Support Staff 1 Posted by Marc Guyer on 24 Dec, 2009 03:21 AM

    Marc Guyer's Avatar

    Have you looked at the Ruby wrapper from l4rk @ hashrocket?

  2. 2 Posted by Jon Larkowski on 06 Jan, 2010 02:13 AM

    Jon Larkowski's Avatar

    Paul: You'll need to make that a validation, after_save is too late. Please see my prior comment. Cheers!

  3. Marc Guyer closed this discussion on 18 May, 2010 01:25 PM.

Discussions are closed to public comments.
If you need help with Cheddar please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

28 Mar, 2024 10:45 PM
24 Jan, 2024 08:33 AM
11 Jan, 2024 07:13 AM
30 Nov, 2023 02:07 AM
22 Nov, 2023 08:41 AM