create event = Event.create(params[:event]) if event.valid? EventMailer.created_event(event) .deliver redirect_to event_path(event) else ... # handle error end end end
create event = Event.create(params[:event]) if event.valid? EventMailer.created_event(event) .deliver redirect_to event_path(event) else ... # handle error end end end
create event = Event.create(params[:event]) if event.valid? EventMailer.delay.created_event(event) redirect_to event_path(event) else ... # handle error end end end better