aboutsummaryrefslogtreecommitdiffstats
path: root/railties/doc/guides/source/creating_plugins/models.txt
diff options
context:
space:
mode:
Diffstat (limited to 'railties/doc/guides/source/creating_plugins/models.txt')
-rw-r--r--railties/doc/guides/source/creating_plugins/models.txt10
1 files changed, 4 insertions, 6 deletions
diff --git a/railties/doc/guides/source/creating_plugins/models.txt b/railties/doc/guides/source/creating_plugins/models.txt
index 458edec80a..505ab44a71 100644
--- a/railties/doc/guides/source/creating_plugins/models.txt
+++ b/railties/doc/guides/source/creating_plugins/models.txt
@@ -1,4 +1,4 @@
-== Add a model ==
+== Models ==
This section describes how to add a model named 'Woodpecker' to your plugin that will behave the same as a model in your main app. When storing models, controllers, views and helpers in your plugin, it's customary to keep them in directories that match the rails directories. For this example, create a file structure like this:
@@ -66,11 +66,9 @@ Finally, add the following to your plugin's 'schema.rb':
[source, ruby]
----------------------------------------------
-ActiveRecord::Schema.define(:version => 0) do
- create_table :woodpeckers, :force => true do |t|
- t.string :name
- end
+create_table :woodpeckers, :force => true do |t|
+ t.string :name
end
----------------------------------------------
-Now your test should be passing, and you should be able to use the Woodpecker model from within your rails app, and any changes made to it are reflected immediately when running in development mode. \ No newline at end of file
+Now your test should be passing, and you should be able to use the Woodpecker model from within your rails app, and any changes made to it are reflected immediately when running in development mode.