change views to use objects instead of yaml
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user