Created
February 25, 2012 13:27
-
-
Save matenia/1908485 to your computer and use it in GitHub Desktop.
Hack for FriendlyId 4.x - Access Slug table within the app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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