Without the guard, the app would try to send out a mail weather the user
had been persisted or not. If it had not, then the app would throw an
exception.

--
Will Green
http://hotgazpacho.org/



On Aug 28, 2013, at 9:21 AM, Ryan Castillo <notifications@github.com> wrote:

In app/controllers/registrations_controller.rb:

>
> -    if params[:source] == "open_impact"
> -      SignupMailer.open_impact_greeting(@user).deliver
> -    else
> -      SignupMailer.greeting(@user).deliver
> -    end
> +    if @user.persisted?

@hotgazpacho <https://github.com/hotgazpacho> why was this guard necessary?

—
Reply to this email directly or view it on
GitHub<https://github.com/codeforamerica/brigade/pull/241/files#r6032764>
.