You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ruby on Rails: Talk
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.