That's excellent! I'm thinking that it makes sense to use it in a few other models as well. Let me review the code and come with a list.
On Thursday, March 21, 2013 8:47:44 AM UTC-4, Bruno wrote: > > Hi Dan, > It's already incorporated into ce. Check out the user model: > https://github.com/bborn/communityengine/blob/master/app/models/user.rb#L13 > > > On Wed, Mar 20, 2013 at 10:43 PM, Dan Coutu <co...@snowy-owl.com<javascript:> > > wrote: > >> I looked further into friendly_id and it does support the ability to >> specify your own rules for creating and maintaining the slugs. Given that >> it also provides automated url creation that uses slugs instead of numeric >> id values I'd say that this gem is a big win and really ought to be >> incorporated into CE. The flexibility of friendly_id is very impressive. >> >> Dan >> >> >> On Monday, March 18, 2013 11:51:11 AM UTC-4, Dan Coutu wrote: >>> >>> 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 >>> either. >>> >>> The reason that this is important to me is that I want to be able to use >>> a type of slug that doesn't rely on either the id or the title so that I >>> can readily create links to static pages based on a slug value that won't >>> change even if the page title or id does change. (The id would change if >>> the original page was deleted and a new one created, or if the slug on the >>> original was removed and assigned to a different page.) Examples of such >>> pages are: About Us, Privacy Policy, Terms and Conditions. >>> >>> What I'm really asking here is if anyone knows how to override the find >>> method for pages so that it supports both the current lookup as well as my >>> own slug lookup. I'm a bit reluctant to just declare an override in my >>> local page model without first seeing what the current code looks like, so >>> that I don't make a mess of things. >>> >>> Dan >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "CommunityEngine" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to communityengi...@googlegroups.com <javascript:>. >> To post to this group, send email to communi...@googlegroups.com<javascript:> >> . >> Visit this group at http://groups.google.com/group/communityengine?hl=en. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > -- You received this message because you are subscribed to the Google Groups "CommunityEngine" group. To unsubscribe from this group and stop receiving emails from it, send an email to communityengine+unsubscr...@googlegroups.com. To post to this group, send email to communityengine@googlegroups.com. Visit this group at http://groups.google.com/group/communityengine?hl=en. For more options, visit https://groups.google.com/groups/opt_out.