]> git.openstreetmap.org Git - rails.git/commitdiff
stub model and show in view
authorAdam Hoyle <atomoil@gmail.com>
Sun, 8 Aug 2021 22:28:26 +0000 (23:28 +0100)
committerAdam Hoyle <atomoil@gmail.com>
Sun, 8 Aug 2021 22:28:44 +0000 (23:28 +0100)
app/controllers/site_controller.rb
app/models/communities.rb [new file with mode: 0644]
app/views/site/communities.html.erb

index 1845ecfaf3071d16323033d90891d987f41a8995..2eb084f913f0641b18a0b7505714eefcfbd1eb9d 100644 (file)
@@ -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 (file)
index 0000000..89a09cf
--- /dev/null
@@ -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
index 31c48eaf68fe5af1129901b97cf6822151bd90d0..ad431d849286a395253cf70052548337e4d1fb79 100644 (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 %>
\ No newline at end of file