Permalink
Browse files

Update getting-started.md

Without exposing the variable `book`, the spec `spec/web/controllers/books/create_spec.rb` fails.

```
NoMethodError:         NoMethodError: undefined method 'book' for #<Web::Controllers::Books::Create:0x007ff5e5afbe40>
```

After I applies the changes of the PR the test passed. Am I missing something?
  • Loading branch information...
andresilveirah committed Jun 28, 2015
1 parent 9078b53 commit bbc9cf3c0270d18ba98eb92b8a677620b408c93b
Showing with 4 additions and 3 deletions.
  1. +4 −3 source/guides/getting-started.md
@@ -756,10 +756,11 @@ module Web::Controllers::Books
class Create
include Web::Action
def call(params)
book = Book.new(params[:book])
BookRepository.create(book)
expose :book
def call(params)
@book = BookRepository.create(Book.new(params[:book]))
redirect_to '/books'
end
end

0 comments on commit bbc9cf3

Please sign in to comment.