Skip to content
Browse files

[engines guide] Point out that we need to run rake db:migrate after c…

…reating user model
  • Loading branch information...
1 parent 7d8c650 commit 518b30cf486164c59b7120b7b5039aa85c962630 @radar radar committed Oct 17, 2011
Showing with 2 additions and 0 deletions.
  1. +2 −0 railties/guides/source/engines.textile
View
2 railties/guides/source/engines.textile
@@ -416,6 +416,8 @@ To keep it simple in this case, the application will have a class called +User+
rails g model user name:string
</shell>
+The +rake db:migrate+ command needs to be run here to ensure that our application has the +users+ table for future use.
+
Also to keep it simple, the posts form will have a new text field called +author_name_+ where users can elect to put their name. The engine will then take this name and create a new +User+ object from it or find one that already has that name, and then associate the post with it.
First, the +author_name+ text field needs to be added to the +app/views/blorgh/posts/_form.html.erb+ partial inside the engine. This can be added above the +title+ field with this code:

0 comments on commit 518b30c

Please sign in to comment.
Something went wrong with that request. Please try again.