diff --git a/app/models/project.rb b/app/models/project.rb index ae7c273..bdf9f9b 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -13,6 +13,14 @@ class Project @content = attributes[:content] end + def self.highlighted_projects + @highlighted_projects ||= YAML.load_file(Rails.root.join("config/highlighted_projects.yml")) + end + + def is_highlighted? + self.class.highlighted_projects.include?(github_slug) + end + def name title.presence || project_name.titleize end diff --git a/app/views/projects/index.html.erb b/app/views/projects/index.html.erb index 591a818..a6db00f 100644 --- a/app/views/projects/index.html.erb +++ b/app/views/projects/index.html.erb @@ -17,7 +17,7 @@