[CommunityEngine] Page model has a magical find method

2013-03-18 Thread Dan Coutu
I see that the page model seems to have the ability to find a page by either id or a slug that's made up of a combination of id and parameterized title. However the page model provides no method for this extension of the find method and I haven't found any gem or plugin that seems to handle it

Re: [CommunityEngine] Page model has a magical find method

2013-03-18 Thread Bruno Bornsztein
There's really no magic to it: since the Page id parameter is coming in the form of 123-page-title-goes-here, Rails just calls #to_i on anything that comes into ActiveRecord#find, so that parameter just gets turned into 123. Actually, this should probably be updated to use friendly_id, the way