Created
May 6, 2022 16:56
-
-
Save nathanpalmer/e04f8cdd3102467f2be064fe134e6171 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# app/controllers/quotes_controller.rb | |
def create | |
@quote = current_company.quotes.build(quote_params) | |
if @quote.save | |
respond_to do |format| | |
format.html { redirect_to quotes_path, notice: "Quote was successfully created." } | |
format.turbo_stream { flash.now[:notice] = "Quote was successfully created." } | |
end | |
else | |
render :new | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment