Skip to content

Commit 5ef1e37

Browse files
author
Ben Lavender
authored
Merge pull request #27 from github/remove-anonymous-references
Remove some broken references to anonymous controller
2 parents 89a0bf6 + d481ed5 commit 5ef1e37

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ Some routing boilerplate is required in `config/routes.rb`:
2424

2525
```ruby
2626
Rails.application.routes.draw do
27-
post "/_chatops/:chatop", controller: "anonymous", action: :execute_chatop
27+
# Replace the controller: argument with your controller's name
28+
post "/_chatops/:chatop", controller: "chatops", action: :execute_chatop
2829
get "/_chatops" => "chatops#list"
2930
end
3031
```
@@ -146,13 +147,13 @@ To work around this, you need to update your router boilerplate:
146147
This:
147148

148149
```ruby
149-
post "/_chatops/:action", controller: "anonymous"
150+
post "/_chatops/:action", controller: "chatops"
150151
```
151152

152153
Becomes this:
153154

154155
```ruby
155-
post "/_chatops/:chatop", controller: "anonymous", action: :execute_chatop
156+
post "/_chatops/:chatop", controller: "chatops" action: :execute_chatop
156157
```
157158

158159
##### Adding a prefix

0 commit comments

Comments
 (0)