Learning loads about YAML and now it's working - sort of.

This commit is contained in:
2023-01-29 18:56:01 +00:00
parent 7c0681314d
commit 148ef4efdd
6 changed files with 198 additions and 2 deletions

View File

@@ -2,7 +2,7 @@ class HomeController < ApplicationController
def index
if user_signed_in?
if current_user.admin?
@file = YAML.load_file(Rails.root.to_s + '/config/caf_text.yml')
else
end
end

View File

@@ -28,6 +28,9 @@ Not Signed in.
<%= link_to "Add User" %>
</p>
<% @file["objectives"].each do |key, value| %>
<p><%= key%>:<%=value%></p>
<% end %>
<% end %>
<% if current_user.user? %>