On Tue, Jun 25, 2013 at 9:55 PM, Cameron G. firstname.lastname@example.org
This will do (or at least try) the save twice, if the user has a
group. I’d recommend:
if it saves
redirect to (if it has a group, the group, else /)
give error msg
Also, look closely at the way you’re checking for a group. The first
option will trigger if the group is nil, the second if it’s not “”
(empty string)… but what if it is “”? That’s neither nil nor
not-"", so it will take the “else” path and pretend like it didn’t
save. I suggest you use .blank? (or its inverse, .present?) to tell
if it’s there or not. Both nil and “” count as blank (and not
Dave A., the T. Rex of Codosaurus LLC,
secret-cleared freelance software developer
taking contracts in or near NoVa or remote.
See information at http://www.Codosaur.us/.