Yay! Congrats to Jens-Christian on creating the first (publicly
announced) 3rd party Rails plugin that uses the vendor/plugin
"architecture".
- Jamis
On Oct 17, 2005, at 4:14 PM, Jens-Christian Fischer wrote:
> In the name of "release early, release often" here''s my
first stab
> at solving the "inheritance" problem.
>
> Assume:
>
> class Foo < ActiveRecord::Base
> end
>
> class Bar < ActiveRecord::Base
> inherits_from :Foo
> end
>
> This gives all "bars" access to methods and attributes from the
> "foos".
>
> You can grab the code here: http://invisible.ch/projects/wiki
>
> This code is just the result of some playing around and is not
> feature complete. Most notably "find(..., :conditions => ["x =
?",
> value] ) will not work if "x" is in the superclass. I
don''t know if
> this can be solved without some major reworking of the find method.
> (I have started to play with the find method as can be seen in the
> source code - so far it does nothing)
>
> This will only work in edge rails, because it uses the new "vendors/
> plugin" feature.
>
> I''m sure, there are better ways to implement this, but for now it
> seems to do what it''s supposed to do. Feedback, criticism and
> patches gladly accepted.
>
> Jens-Christian
>
> --
> InVisible GmbH, Langgrütstrasse 172, 8047 Zürich
> Phone: +41 44 401 09 30
> http://www.invisible.ch http://not.invisible.ch
>
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>