From: Adam Hoyle Date: Sun, 8 Aug 2021 22:28:26 +0000 (+0100) Subject: stub model and show in view X-Git-Tag: live~1497^2~49 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/86912a61df67582b37d0ae5cb6542bc41aa5a41f?hp=ffc6b697f05220627d28c1f9d4719d5ff451f658 stub model and show in view --- diff --git a/app/controllers/site_controller.rb b/app/controllers/site_controller.rb index 1845ecfaf..2eb084f91 100644 --- a/app/controllers/site_controller.rb +++ b/app/controllers/site_controller.rb @@ -108,6 +108,7 @@ class SiteController < ApplicationController def communities @locale = I18n.locale + @local_chapters = Communities.local_chapters end def export; end diff --git a/app/models/communities.rb b/app/models/communities.rb new file mode 100644 index 000000000..89a09cf05 --- /dev/null +++ b/app/models/communities.rb @@ -0,0 +1,9 @@ + + + +class Communities + + def self.local_chapters + array_string_ = ["Local Chapter 1", "Local Chapter 2", "Local Chapter 3", "Another one", "And Another"] + end +end diff --git a/app/views/site/communities.html.erb b/app/views/site/communities.html.erb index 31c48eaf6..ad431d849 100644 --- a/app/views/site/communities.html.erb +++ b/app/views/site/communities.html.erb @@ -9,6 +9,11 @@

<%= t ".local_chapters.title", :locale => @locale %>

<%= t ".local_chapters.about_text", :locale => @locale %>

<%= t ".local_chapters.list_text", :locale => @locale %>

+

<%= t ".other_groups.title", :locale => @locale %>

<%= t ".other_groups.about_html", :locale => @locale %>

<% end %> \ No newline at end of file