Skip to content
This repository was archived by the owner on Feb 9, 2019. It is now read-only.

Commit 357e1a4

Browse files
committed
Merge pull request #14 from MitchellGeere/patch-1
Changed the example in the filter it was wrong
2 parents 57674f7 + 9f3c3fd commit 357e1a4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.textile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,10 @@ So in our example where we have the @title@ attribute in the @Post@ model, we ca
189189
@posts = BLogPost.where("title = 'test'")
190190
</pre>
191191

192-
Instead we need to reference predecessor attributes by the predecessors database-table, like so:
192+
Instead we need to join the predecessor attributes by its association, like so:
193193

194194
<pre>
195-
@posts = BlogPost.where("posts.title = 'test'")
195+
@posts = BlogPost.joins(:predecessor).where("posts.title = 'test'")
196196
</pre>
197197

198198
Behind the scenes, heritage works just like a simple ActiveRecord association, so it makes sense.
@@ -228,4 +228,4 @@ http://techspry.com/ruby_and_rails/multiple-table-inheritance-in-rails-3/
228228

229229
h2. License
230230

231-
<a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-sa/3.0/88x31.png" /></a><br /><span xmlns:dct="http://purl.org/dc/terms/" href="http://purl.org/dc/dcmitype/InteractiveResource" property="dct:title" rel="dct:type">Heritage</span> by <a xmlns:cc="http://creativecommons.org/ns#" href="https://github.com/BenjaminMedia/Heritage" property="cc:attributionName" rel="cc:attributionURL">Thomas Dippel @ Benjamin Media A/S</a> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-ShareAlike 3.0 Unported License</a>.<br />Based on a work at <a xmlns:dct="http://purl.org/dc/terms/" href="http://techspry.com/ruby_and_rails/multiple-table-inheritance-in-rails-3/" rel="dct:source">techspry.com</a>
231+
<a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-sa/3.0/88x31.png" /></a><br /><span xmlns:dct="http://purl.org/dc/terms/" href="http://purl.org/dc/dcmitype/InteractiveResource" property="dct:title" rel="dct:type">Heritage</span> by <a xmlns:cc="http://creativecommons.org/ns#" href="https://github.com/BenjaminMedia/Heritage" property="cc:attributionName" rel="cc:attributionURL">Thomas Dippel @ Benjamin Media A/S</a> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-ShareAlike 3.0 Unported License</a>.<br />Based on a work at <a xmlns:dct="http://purl.org/dc/terms/" href="http://techspry.com/ruby_and_rails/multiple-table-inheritance-in-rails-3/" rel="dct:source">techspry.com</a>

0 commit comments

Comments
 (0)