Is it potentially dangerous to use an ActiveRecord model in routes.rb? Here's a line from our routes.rb file: > map.resources :registrations, :requirements => { :id => User::USERNAME_REGEXP > } Registration#to_param returns the User's username. User::USERNAME_REGEXP is just a regex that matches one or more valid username characters.
This route works as expected, but my concern is that using an ActiveRecord model in the routes file is loading it prematurely and could cause problems somehow. This is all in Rails 2.3.8, REE 1.8.7 2010.02. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.