Skip to content

Instantly share code, notes, and snippets.

@matenia
Created February 25, 2012 13:27
Show Gist options
  • Save matenia/1908485 to your computer and use it in GitHub Desktop.
Save matenia/1908485 to your computer and use it in GitHub Desktop.
Hack for FriendlyId 4.x - Access Slug table within the app
# loaded into config/initializers/slug_table_access.rb
### HACK TO LOAD SLUG TABLE ACCESS
# required for use with path constraints in routes
autoload :Slug, 'friendly_id/slug'
# Access Slug table via FriendlyId::Slug
# NOTE: In FriendlyId 3.x the Slug model is available within your app
# This is a hack for FriendlyId 4.x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment