|
|
@ -5,7 +5,7 @@ class ScoresController < ApplicationController |
|
|
|
before_action :set_score, only: %i[show edit update destroy] |
|
|
|
|
|
|
|
def index |
|
|
|
@q = Score.all.ransack |
|
|
|
@q = Score.all.ransack(q_params) |
|
|
|
@pagy, @scores = pagy(@q.result) |
|
|
|
end |
|
|
|
|
|
|
@ -47,4 +47,5 @@ class ScoresController < ApplicationController |
|
|
|
|
|
|
|
def set_score = @score = Score.find(params[:id]) |
|
|
|
def score_params = params.require(:score).permit(:name, :grade) |
|
|
|
def q_params = params.fetch(:q, {}).permit! |
|
|
|
end |