mirror of
https://github.com/iritmaximus/brewery.git
synced 2026-10-12 19:13:49 +03:00
add needed variables for error page
This commit is contained in:
@@ -32,6 +32,7 @@ class BeersController < ApplicationController
|
||||
format.html { redirect_to beers_path, notice: "Beer was successfully created." }
|
||||
format.json { render :show, status: :created, location: @beer }
|
||||
else
|
||||
@breweries = Brewery.all
|
||||
format.html { render :new, status: :unprocessable_entity }
|
||||
format.json { render json: @beer.errors, status: :unprocessable_entity }
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user