change views to use objects instead of yaml

This commit is contained in:
2022-12-02 11:10:38 +02:00
parent 4f6538e135
commit 48cfcb592d
14 changed files with 55 additions and 42 deletions

View File

@ -2,10 +2,7 @@ module Merged
class ViewController < ::ApplicationController
def view
page = params[:id]
# assert file exists
@data = YAML.load_file(Rails.root.join('cms' , "#{page}.yaml"))
#assert data is an array (of hashes?)
@page = Page.find(params[:id])
end
end