diff options
author | Ryan Bigg <radarlistener@gmail.com> | 2011-10-17 20:25:45 +1100 |
---|---|---|
committer | Ryan Bigg <radarlistener@gmail.com> | 2011-10-17 20:25:45 +1100 |
commit | 518b30cf486164c59b7120b7b5039aa85c962630 (patch) | |
tree | 2d612a5dbf021604e5e325bec09245838828806e /railties/guides | |
parent | 7d8c650e8663e0af722225e66f72a82dcb518b55 (diff) | |
download | rails-518b30cf486164c59b7120b7b5039aa85c962630.tar.gz rails-518b30cf486164c59b7120b7b5039aa85c962630.tar.bz2 rails-518b30cf486164c59b7120b7b5039aa85c962630.zip |
[engines guide] Point out that we need to run rake db:migrate after creating user model
Diffstat (limited to 'railties/guides')
-rw-r--r-- | railties/guides/source/engines.textile | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/railties/guides/source/engines.textile b/railties/guides/source/engines.textile index d191fe07b6..42c99d3405 100644 --- a/railties/guides/source/engines.textile +++ b/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: |