mirror of
https://github.com/projekteuler/projekteuler.git
synced 2025-12-10 08:46:41 +01:00
13 lines
268 B
Ruby
13 lines
268 B
Ruby
class Translation < ActiveRecord::Base
|
|
belongs_to :problem, inverse_of: :translations
|
|
|
|
validates :title, :content, presence: true
|
|
validates :title, uniqueness: true
|
|
|
|
self.per_page = 50
|
|
|
|
def original_url
|
|
"https://projecteuler.net/problem=#{id}"
|
|
end
|
|
end
|