search for: category_regex

Displaying 1 result from an estimated 1 matches for "category_regex".

2007 Jun 12
1
Route Regex Requirement not working properly
...roperly. 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 += "|" end Regexp.n...