Displaying 1 result from an estimated 1 matches for "downloadablefilecategory".
2007 Jun 12
1
Route Regex Requirement not working properly
...o get my routes to work properly. Here''s how I''m defining
one of my routes:
map.downloads '':category/downloads'', :controller => ''downloads'', :action
=> ''list_downloads_for_category'', :requirements => {:category =>
DownloadableFileCategory.category_regex}
And here''s the method definition for
DownloadableFileCategory.category_regex:
def self.category_regex
regex_str = ""
for category in DownloadableFileCategory.find(:all)
regex_str += category.category.downcase
regex_str += "|"
en...