Plans, Features and A Simplified Approach in Ruby on Rails

Carlos Gabaldon has a slick way of handling plan/feature matrices in this article on Plans, Features and Ruby DSL.

The approach is to encapsulate various features like “can have 15 open projects”, etc. into a ‘features’ table which can house the feature name, etc.

Features in RoR

This allows you to do things like:

if some_model.has_feature?(:can_send_foo)
  # send the foo
end

Nice!

You can Bookmark this entry on del.icio.usbookmark this, digg this entrydigg this or check the See this page in technoraticosmos


Shanti A. Braford blogs here.

If you really want to know, just read this.



  

Powered by FeedBlitz