A Mess of Changes

Have checked a lot of stuff in in an unfinished state at the moment. Can’t make up my mind about things, but hadn’t done a checkin since yesterday.

I’ve moved what was previously called Asset to be the new Page object, and what was previously Page is now LegacyBehaviorPage. This was originally done because I thought single-table inheritance wasn’t giving me what I wanted (searching on a subclass wouldn’t return subclasses of that) – I think my problem was just that the subclasses hadn’t been created yet, so it didn’t know to search for them.

I’ve added in a BehaviorPage object, which should be pretty much a straight replacement for behavior. It’s got all the same methods, so it should be possible to just change existing behaviors to extend BehaviorPage instead of Behaviour::Base. I might move Page back to Asset and make this class the new Page.

Added a rough CommentablePage behavior using the new BehaviorPage style of behavior. Test for displaying comments are done, but still umming and ah-ing over how to handle the submission of comments. Should I register a new controller or should I have a behavior that handles comment submission. As silly as it might sound, I’m leaning towards the latter – I might make a fake child of a CommentablePage that is only returned by find_page_by_url.

Oh, and I added some logging to PageContext so that I get the full backtrace of errors during a radius tag render. Debugging is so annoying when “Wrong number of arguments(0 for 1)” embedded in a page is all you have to go on.