Skip to content

Instantly share code, notes, and snippets.

@acidtib
Created November 13, 2012 23:19
Show Gist options
  • Save acidtib/4069086 to your computer and use it in GitHub Desktop.
Save acidtib/4069086 to your computer and use it in GitHub Desktop.
respond_to do |format|
if @client.save
if @client.dash == 1
format.html { redirect_to sales_prospects_path, notice: 'Prospect was successfully created.' }
elsif @client.employ == 1
format.html { redirect_to liya_clients_show_path(@client.employer), notice: 'Employ was successfully created.' }
else
format.html { redirect_to liya_clients_show_path(@client.id), notice: 'Client was successfully created.' }
end
else
format.html { render action: "new" }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment