Question about the case statement in Erlang.
I am using n2o as my web application framework.
In my sign in page i created an event to extract fields from the page when a user clicks the sign up button,
event(sign_up) - >
Gender = {Male,Female} = {wf:q(gm),wf:q(gf)},
Result = case Gender of
Gender when Male == true -> <<"M">>;
Gender when Female == true -> <<"F">>;
Gender when Male == false, Female == false -> <<"Not Selected">>
end,
error_logger:info_msg("Stuff",[{Result}]).
When I test the page, the logging code never gets hit. It only shows when i remove the case statement. Oddly, when executing the case statement in the shell, it evaluates correctly.
Am i missing something with my case statement?