Permalink
Browse files

Fix some API documentation links that used erb

* Provide a temporary link to dm-more RF project for dm-validations (this
  needs to be updated).

Signed-off-by: Alex Coles <alex@alexcolesportfolio.com>
  • Loading branch information...
1 parent f2a3fe7 commit 221a787fd3eafb8687536069eb80e12172ab921a @myabc myabc committed Nov 15, 2009
@@ -52,8 +52,8 @@ end
{% endhighlight %}
A couple of things are going on here. First, DataMapper::Base and
-DataMapper::Persistence are gone and replaced with <%=
-doc('DataMapper::Resource') %>. Next `set_table_name` has been replaced with
+DataMapper::Persistence are gone and replaced with [DataMapper::Resource][DataMapper_Resource].
+Next `set_table_name` has been replaced with
`resource_names` hash where you specify which arena play occurs in. After that
we have a couple of Property definitions that look a little different.
@@ -109,3 +109,5 @@ Stay tuned in to the [mailing list](http://groups.google.com/group/datamapper),
check up on the [wiki](http://datamapper.org/), chat it up in
[#datamapper](irc://irc.freenode.net/#datamapper) and watch
[github commit messages](http://github.com/datamapper/dm-core/commits/master) for updates.
+
+[DataMapper_Resource]:http://www.yardoc.org/docs/datamapper-dm-core/DataMapper/Resource
View
@@ -8,8 +8,8 @@ created_at: Tue Dec 04 14:46:32 +1030 2007
{{ page.title }}
================
-The finder methods for DataMapper objects are defined in <%=
-doc('DataMapper::Repository') %>. They include `get()`, `all()`, `first()`
+The finder methods for DataMapper objects are defined in
+[DataMapper::Repository][DataMapper_Repository]. They include `get()`, `all()`, `first()`
Finder Methods
--------------
@@ -150,3 +150,5 @@ an integer of the number of records matching the every condition you pass in.
{% highlight ruby linenos %}
count = Zoo.count(:age.gt => 200) #=> 2
{% endhighlight %}
+
+[DataMapper_Repository]:http://www.yardoc.org/docs/datamapper-dm-core/DataMapper/Repository
View
@@ -15,7 +15,7 @@ Single Table Inheritance
Many ORMs support Single Table Inheritance and DataMapper is no different. In
order to declare a model for Single Table Inheritance, define a property with
-the data-type of <%= doc('Types::Discriminator') %>
+the data-type of [Types::Discriminator][Types_Discriminator].
{% highlight ruby linenos %}
class Person
@@ -37,8 +37,8 @@ class Daughter < Woman; end
{% endhighlight %}
-When DataMapper sees your `type` column declared as type <%=
-doc('Types::Discriminator') %>, it will automatically insert the class name of
+When DataMapper sees your `type` column declared as type
+[Types::Discriminator][Types_Discriminator], it will automatically insert the class name of
the object you've created and later instantiate that row as that class. It also
supports deep inheritance, so doing Woman.all will select all women, mothers,
and daughters (and deeper inherited classes if they exist).
@@ -49,8 +49,8 @@ Paranoia
Sometimes...most times...you don't _really_ want to destroy a row in the
database, you just want to mark it as deleted so that you can restore it later
if need be. This is aptly-named Paranoia and DataMapper has basic support for
-this baked right in. Just declare a property and assign it a type of <%=
-doc('Types::ParanoidDateTime') %> or <%= doc('Types::ParanoidBoolean') %>:
+this baked right in. Just declare a property and assign it a type of
+[Types::ParanoidDateTime][Types_ParanoidDateTime] or [Types::ParanoidBoolean][Types_ParanoidBoolean]:
{% highlight ruby linenos %}
property :deleted_at, ParanoidDateTime
@@ -108,3 +108,7 @@ zoo.exhibits.animals # retrieves all animals for all exhibits for that zoo
This has great potential for browsing collections of content, like browsing all
blog posts' comments by category or tag. At present, chaining beyond 2
associations is still experimental.
+
+[Types_Discriminator]:http://www.yardoc.org/docs/datamapper-dm-core/DataMapper/Types/Discriminator
+[Types_ParanoidDateTime]:http://www.yardoc.org/docs/datamapper-dm-core/DataMapper/Types/ParanoidDateTime
+[Types_ParanoidBoolean]:http://www.yardoc.org/docs/datamapper-dm-core/DataMapper/Types/ParanoidBoolean
@@ -102,9 +102,9 @@ a comprehensive true/false result for the entire walk. If anything returns
Working with Validation Errors
------------------------------
-If your validators find errors in your model, they will populate the <%=
-doc('Validate::ValidationErrors') %> object that is available through each of
-your models via calls to your model's `errors` method.
+If your validators find errors in your model, they will populate the
+[Validate::ValidationErrors][Validate_ValidationErrors] object that is available
+through each of your models via calls to your model's `errors` method.
{% highlight ruby linenos %}
my_account = Account.new(:name => "Jose")
@@ -368,3 +368,5 @@ properties or derived from the environment. To set these properties, a `before :
Be careful not to `save` your resource in these kinds of methods, or your
application will spin off into infinite trying to save your object while saving
your object.
+
+[Validate_ValidationErrors]:http://datamapper.rubyforge.org/dm-more/
View
@@ -61,8 +61,8 @@ You need make sure this is set before you define your models.
Define your models
------------------
-The Post model is going to need to be persistent, so we'll include <%=
-doc('DataMapper::Resource') %>. The convention with model names is to use the
+The Post model is going to need to be persistent, so we'll include
+[DataMapper::Resource][DataMapper_Resource]. The convention with model names is to use the
singular, not plural version...but that's just the convention, you can do
whatever you want.
@@ -170,3 +170,5 @@ You could also do:
{% highlight ruby %}
DataMapper.auto_migrate!
{% endhighlight %}
+
+[DataMapper_Resource]:http://www.yardoc.org/docs/datamapper-dm-core/DataMapper/Resource

0 comments on commit 221a787

Please sign in to comment.