From e823ac9d164343e65f2d81f4a581067e99e88830 Mon Sep 17 00:00:00 2001 From: Torsten Date: Sun, 8 Jan 2023 14:25:49 +0200 Subject: [PATCH] rename route to page (because that is what we show --- README.md | 4 ++-- app/controllers/merged/view_controller.rb | 2 +- app/views/merged/view/{view.haml => page.haml} | 0 3 files changed, 3 insertions(+), 3 deletions(-) rename app/views/merged/view/{view.haml => page.haml} (100%) diff --git a/README.md b/README.md index 7a214c5..9629e5d 100644 --- a/README.md +++ b/README.md @@ -104,12 +104,12 @@ mount Merged::Engine => "/merged" Create route to serve content. ```ruby -get ":id" , to: "merged/view#view" , id: :id +get ":id" , to: "merged/view#page" , id: :id ``` If Merged served the root: ```ruby -root "merged/view#view" , id: 'index' +root "merged/view#page" , id: 'index' ``` ### Stylesheets diff --git a/app/controllers/merged/view_controller.rb b/app/controllers/merged/view_controller.rb index a58b9eb..5780d47 100644 --- a/app/controllers/merged/view_controller.rb +++ b/app/controllers/merged/view_controller.rb @@ -1,7 +1,7 @@ module Merged class ViewController < ::ApplicationController - def view + def page @page = Page.find_by_name(params[:id]) end diff --git a/app/views/merged/view/view.haml b/app/views/merged/view/page.haml similarity index 100% rename from app/views/merged/view/view.haml rename to app/views/merged/view/page.haml