rename route to page (because that is what we show

This commit is contained in:
Torsten 2023-01-08 14:25:49 +02:00
parent e09f2935f1
commit e823ac9d16
3 changed files with 3 additions and 3 deletions

View File

@ -104,12 +104,12 @@ mount Merged::Engine => "/merged"
Create route to serve content. Create route to serve content.
```ruby ```ruby
get ":id" , to: "merged/view#view" , id: :id get ":id" , to: "merged/view#page" , id: :id
``` ```
If Merged served the root: If Merged served the root:
```ruby ```ruby
root "merged/view#view" , id: 'index' root "merged/view#page" , id: 'index'
``` ```
### Stylesheets ### Stylesheets

View File

@ -1,7 +1,7 @@
module Merged module Merged
class ViewController < ::ApplicationController class ViewController < ::ApplicationController
def view def page
@page = Page.find_by_name(params[:id]) @page = Page.find_by_name(params[:id])
end end