Skip to content

Commit 326fb86

Browse files
committed
fix typo in before/after show.json code
1 parent 995af31 commit 326fb86

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,11 @@ If you are using the default Rails 4 scaffold generators, you will need to adjus
136136

137137
default rails generated show.json.jbuilder
138138

139-
`json.extract! @post, :title, :content, :created_at, :updated_at, :id`
139+
`json.extract! @post, :title, :content, :created_at, :updated_at`
140140

141141
Change it to add `id` attribute as well
142142

143-
`json.extract! @book, :id, :title, :author, :created_at, :updated_at`
143+
`json.extract! @post, :id, :title, :content, :created_at, :updated_at`
144144

145145
Without adjusting the JSON show view, you will be redirected to a "undefined" url after creating an object.
146146

0 commit comments

Comments
 (0)