Major Streamlined::UI Refactoring
Posted by Stu Fri, 27 Jul 2007 22:35:22 GMT
In the course of fixing a bug, I bit off of significant refactoring I have wanted to do for a while. Instead of saying this:
# old way class PoetUI < Streamlined::UI # declarative settings end
You can now say this:
# new way Streamlined.ui_for(Poet) do # declarative settings end
The new syntax is more testable, since it does not rely on singleton methods and inheritance. It also makes it much easier to break the default 1-1 relationship between models and ui instances. The old syntax is still supported, via a bit of method_missing trickery. But I am sure there are some breakages, and I would like to deprecate the old syntax over time. Kick the tires and let me know if you have any problems.



