mirror of
https://github.com/projekteuler/projekteuler.git
synced 2026-01-27 10:38:50 +01:00
Add about pages
This commit is contained in:
@@ -11,11 +11,14 @@ class Problem < ApplicationRecord
|
||||
!!self.translation
|
||||
end
|
||||
|
||||
|
||||
def original_url
|
||||
"https://projecteuler.net/problem=#{self.id}"
|
||||
end
|
||||
|
||||
def self.translated_count
|
||||
Problem.count(:translation_id)
|
||||
end
|
||||
|
||||
def self.update_count(new_count)
|
||||
old_count = Problem.count
|
||||
raise ArgumentError, "new count has to be larger than old count" if new_count < old_count
|
||||
|
||||
Reference in New Issue
Block a user