2022-11-22 16:42:20 +02:00
|
|
|
class CmsController < ApplicationController
|
2022-11-22 19:44:34 +02:00
|
|
|
|
2022-11-22 16:42:20 +02:00
|
|
|
def view
|
2022-11-22 19:44:34 +02: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 16:42:20 +02:00
|
|
|
end
|
2022-11-22 19:44:34 +02:00
|
|
|
|
2022-11-22 16:42:20 +02:00
|
|
|
end
|