mirror of
https://github.com/projekteuler/projekteuler.git
synced 2026-01-27 02:28:50 +01:00
Add check whether problem has a translation
This commit is contained in:
@@ -5,4 +5,9 @@ class Problem < ActiveRecord::Base
|
||||
has_many :translations, inverse_of: :problem
|
||||
|
||||
self.per_page = 50
|
||||
|
||||
def is_translated?
|
||||
!!self.translation
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user