Add Goals seeds and translations
Extracted from the official United Nations Sustainable Development Goals website [1]. [1] https://www.un.org/sustainabledevelopment/sustainable-development-goals/
This commit is contained in:
committed by
Javi Martín
parent
cb78a254f4
commit
cbe84450ac
@@ -1,5 +1,5 @@
|
||||
class SDG::Goal < ApplicationRecord
|
||||
validates :code, presence: true, uniqueness: true
|
||||
validates :code, presence: true, uniqueness: true, inclusion: { in: 1..17 }
|
||||
|
||||
def title
|
||||
I18n.t("sdg.goals.goal_#{code}.title")
|
||||
|
||||
Reference in New Issue
Block a user