2022-11-22 15:42:20 +01:00
|
|
|
class CmsController < ApplicationController
|
2022-11-22 18:44:34 +01:00
|
|
|
|
2022-11-22 15:42:20 +01:00
|
|
|
def view
|
2022-11-22 18:44:34 +01:00
|
|
|
page = params[:id]
|
|
|
|
# assert file exists
|
|
|
|
@data = YAML.load_file(Rails.root.join('cms' , "#{page}.yaml"))
|
|
|
|
#assert data is an array (of hashes?)
|
2022-11-22 15:42:20 +01:00
|
|
|
end
|
2022-11-22 18:44:34 +01:00
|
|
|
|
2022-11-22 15:42:20 +01:00
|
|
|
end
|