Feeds:
Posts
Comments

Archive for May, 2008

Classy Inheritance

So depends_on graduated to a project called Classy Inheritance. Why the name difference? Well depends_on represents just one type of relationship. I expect other relationships to be added as needs arise. One such method I could see is “composed_of”, where the object wouldn’t be required.
Lockdown will be using Classy Inheritance for [...]

Read Full Post »

depends_on update(2)

This update allows for non-polymorphic associations. For instance a user belongs_to a profile. To define this association add the following to the User model:
depends_on :profile, :attrs => [:first_name, :last_name, :email]
Notice an “:as” option has not been passed because this isn’t a polymorphic association. So instead of adding the has_one call, a belongs_to [...]

Read Full Post »

depends_on update

I’ve updated the code for depends_on.
This update adds a dynamic method, so if you had the call:
depends_on :content, :attrs => [:name, :url ], :as => :presentable
Then you would get a “find_with_content” class method that does the :include for you.

Read Full Post »

git checkout

This definitely falls in the duh! category:
If you delete a file and want to restore it to the trunk/master version, for subversion I would do:
svn update
to do the same with git:
git checkout <file>
Seems like this should have been obvious, but I guess I was expecting to find an update or restore or some other git [...]

Read Full Post »

depends_on

For one of my projects I had the need for a polymorphic association in which one object required the existence of the other. I had written a specific version of this, but decided it could easily be abstracted. I didn’t go with the built in ActiveRecord polymorphic features as I wanted to strip [...]

Read Full Post »

Stage Update: 0.4.0

This release addresses the use of namespaces such as “admin”. This release is targeted at Rails only.
For more information on Stage check out the RubyForge site.

Read Full Post »

Git and Tagging

Just a quick personal note on how to tag so I don’t have to look it up again. I’m not sure if this is right.?
git tag -a rel_0.0.0git push –tags

Read Full Post »

Announcing Lockdown

If you don’t care about how Lockdown came to be and just want to read about how it works, go to the RubyForge site.
Over the past few years, I have been refining a security system for RubyOnRails. I’ve used it in every Rails app I’ve ever written. However there aren’t many similarities between [...]

Read Full Post »