1
0
mirror of https://github.com/projekteuler/projekteuler.git synced 2025-12-10 16:46:42 +01:00
projekteuler/app/controllers/problems_controller.rb

18 lines
435 B
Ruby

class ProblemsController < ApplicationController
before_action :set_problem, only: [:show]
def index
@problems = Problem.paginate(page: params[:page]).includes(:translation)
@translated_percentage = 100 * Problem.translated_count / Problem.count
end
def show
end
private
# Use callbacks to share common setup or constraints between actions.
def set_problem
@problem = Problem.find(params[:id])
end
end