website/index.html in classy-inheritance-0.1.0 vs website/index.html in classy-inheritance-0.1.1
- old
+ new
@@ -3,11 +3,11 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<link rel="stylesheet" href="stylesheets/screen.css" type="text/css" media="screen" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
- classy inheritance
+ Classy Inheritance
</title>
<script src="javascripts/rounded_corners_lite.inc.js" type="text/javascript"></script>
<style>
</style>
@@ -28,114 +28,102 @@
</script>
</head>
<body>
<div id="main">
- <h1>classy inheritance</h1>
- <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/classy-inheritance"; return false'>
+ <h1>Classy Inheritance</h1>
+ <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/classyinherit"; return false'>
<p>Get Version</p>
- <a href="http://rubyforge.org/projects/classy-inheritance" class="numbers">0.1.0</a>
+ <a href="http://rubyforge.org/projects/classyinherit" class="numbers">0.1.1</a>
</div>
- <h1>→ ‘classy-inheritance’</h1>
+ <p><i>“You stay classy, inheritance” – Gibson</i></p>
<h2>What</h2>
- <h2>Installing</h2>
+ <p>For now, Classy Inheritance adds a depends_on class method to your ActiveRecord model so that you can define requisite objects.
+More functionality coming for optional relationships.</p>
- <p><pre class='syntax'><span class="ident">sudo</span> <span class="ident">gem</span> <span class="ident">install</span> <span class="ident">classy</span><span class="punct">-</span><span class="ident">inheritance</span></pre></p>
+You can define the relationship to be polymorphic:
+<pre>
+class Picture < ActiveRecord::Base
+ depends_on :image, :attrs => [:filename, :height, :width], :as => "imageable"
+end
+</pre>
+ <p>This will look for “imageable_type” and “imageable_id” on the images table add set them accordingly.</p>
- <h2>The basics</h2>
+Or you can define a standard belongs_to relationship:
+<pre>
+class User < ActiveRecord::Base
+ depends_on :profile, :attrs => [:first_name, :last_name, :email]
+end
+</pre>
- <h2>Demonstration of usage</h2>
+ <h3>What does it do for me?</h3>
- <h2>Forum</h2>
+ <p>Well, for starters you get pass-through methods added to your model. So, in the above User example you would get the following:</p>
- <p><a href="http://groups.google.com/group/classy-inheritance">http://groups.google.com/group/classy-inheritance</a></p>
+<pre>
+ @user.first_name
+ @user.last_name
+ @user.email
+ @user.first_name=
+ @user.last_name=
+ @user.email=
+</pre>
+ <p>This means you can use these attributes on your form and in your controller instead of having to worry about creating/updating a separate Profile model.</p>
- <p><span class="caps">TODO</span> – create Google Group – classy-inheritance</p>
+ <p>For the above example, you’ll also get a “find_with_profile” class method that will do the :include => :profile addition to your find call for you.</p>
- <h2>How to submit patches</h2>
+ <h2>Installing</h2>
- <p>Read the <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/">8 steps for fixing other people’s code</a> and for section <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups">8b: Submit patch to Google Groups</a>, use the Google Group above.</p>
+<pre>
+$ sudo gem install classy-inheritance
- <p><span class="caps">TODO</span> – pick <span class="caps">SVN</span> or Git instructions</p>
+# in environment.rb add:
+require "classy-inheritance"
+</pre>
- <p>The trunk repository is <code>svn://rubyforge.org/var/svn/classy-inheritance/trunk</code> for anonymous access.</p>
+ <h2>How to submit patches</h2>
- <p><span class="caps">OOOORRRR</span></p>
+ <p>The Clone <span class="caps">URL</span>: git://github.com/stonean/classy-inheritance.git</p>
- <p>You can fetch the source from either:</p>
+ <p>Read the <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/">8 steps for fixing other people’s code</a> and for section <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups">8b: Submit patch to Google Groups</a>, use the Google Group above.</p>
- <ul>
- <li>rubyforge: <span class="caps">MISSING IN ACTION</span></li>
- </ul>
+ <p>I’m new to git and this whole opensource project admin gig, so please be patient with my stumbling around.</p>
- <p><span class="caps">TODO</span> – You can not created a RubyForge project, OR have not run <code>rubyforge config</code>
-yet to refresh your local rubyforge data with this projects’ id information.</p>
-
-
- <p>When you do this, this message will magically disappear!</p>
-
-
- <p>Or you can hack website/index.txt and make it all go away!!</p>
-
-
- <ul>
- <li>github: <a href="http://github.com/GITHUB_USERNAME/classy-inheritance/tree/master">http://github.com/GITHUB_USERNAME/classy-inheritance/tree/master</a></li>
- </ul>
-
-
-<pre>git clone git://github.com/GITHUB_USERNAME/classy-inheritance.git</pre>
-
- <p><span class="caps">TODO</span> – add “github_username: username” to ~/.rubyforge/user-config.yml and newgem will reuse it for future projects.</p>
-
-
- <ul>
- <li>gitorious: <a href="git://gitorious.org/classy-inheritance/mainline.git">git://gitorious.org/classy-inheritance/mainline.git</a></li>
- </ul>
-
-
-<pre>git clone git://gitorious.org/classy-inheritance/mainline.git</pre>
-
- <h3>Build and test instructions</h3>
-
-
-<pre>cd classy-inheritance
-rake test
-rake install_gem</pre>
-
<h2>License</h2>
<p>This code is free to use under the terms of the <span class="caps">MIT</span> license.</p>
-
-
- <h2>Contact</h2>
-
-
- <p>Comments are welcome. Send an email to <a href="mailto:FIXME"><span class="caps">FIXME</span> full name</a> email via the <a href="http://groups.google.com/group/classy-inheritance">forum</a></p>
<p class="coda">
- <a href="FIXME email">FIXME full name</a>, 29th May 2008<br>
+ <a href="http://blog.stonean.com">Andrew Stone</a>, 29th May 2008<br>
Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
</p>
</div>
-
-<!-- insert site tracking codes here, like Google Urchin -->
+<script type="text/javascript">
+ var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+ document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+</script>
+<script type="text/javascript">
+ var pageTracker = _gat._getTracker("UA-4555592-1");
+ pageTracker._initData();
+ pageTracker._trackPageview();
+</script>
</body>
</html>