This commit is contained in:
Aaro Koivukangas
2023-08-08 09:31:03 +03:00
parent be444d1e56
commit 83f58f47b2
5 changed files with 24 additions and 0 deletions
+9
View File
@@ -2,4 +2,13 @@ class RatingsController < ApplicationController
def index
@ratings = Rating.all
end
def new
@rating = Rating.new
@beers = Beer.all
end
def create
Rating.create params.require(:rating).permit(:score, :beer_id)
redirect_to ratings_path
end
end