1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

[engines guide] Point out that we need to run rake db:migrate after creating user model

This commit is contained in:
Ryan Bigg 2011-10-17 20:25:45 +11:00
parent 7d8c650e86
commit 518b30cf48

View file

@ -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: