stub model and show in view

This commit is contained in:
Adam Hoyle 2021-08-08 23:28:26 +01:00
parent ffc6b697f0
commit 86912a61df
3 changed files with 15 additions and 0 deletions

View file

@ -108,6 +108,7 @@ class SiteController < ApplicationController
def communities
@locale = I18n.locale
@local_chapters = Communities.local_chapters
end
def export; end

View file

@ -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

View file

@ -9,6 +9,11 @@
<h2><%= t ".local_chapters.title", :locale => @locale %></h2>
<p><%= t ".local_chapters.about_text", :locale => @locale %></p>
<p><%= t ".local_chapters.list_text", :locale => @locale %></p>
<ul>
<% @local_chapters.each do |chapter| %>
<li><%= chapter %></li>
<% end %>
</ul>
<h2><%= t ".other_groups.title", :locale => @locale %></h2>
<p><%= t ".other_groups.about_html", :locale => @locale %></p>
<% end %>