rename route to page (because that is what we show
This commit is contained in:
parent
e09f2935f1
commit
e823ac9d16
@ -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
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user