diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-08-24 12:43:43 -0300 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2010-08-24 12:43:43 -0300 |
commit | 4df19b3f27c93e0a3091c176536fa119ea03ebb7 (patch) | |
tree | c2917357dbb59b42dfaa4d9789d94a01be317358 /actionpack/lib | |
parent | 3519d61af9f6230354e6c09e4078d7fa0ddf1763 (diff) | |
download | rails-4df19b3f27c93e0a3091c176536fa119ea03ebb7.tar.gz rails-4df19b3f27c93e0a3091c176536fa119ea03ebb7.tar.bz2 rails-4df19b3f27c93e0a3091c176536fa119ea03ebb7.zip |
Allow actions which start with A-Za-z_ only
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/mapper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index 0c77183dc1..76c7ec35b9 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -726,7 +726,7 @@ module ActionDispatch path = options.delete(:path) action = args.first - if action && action.to_s =~ /^[\w_]+$/ + if action && action.to_s =~ /^[A-Za-z_]\w*$/ path = path_for_action(action, path) options[:action] ||= action options[:as] = name_for_action(action, options[:as]) |