diff options
Diffstat (limited to 'actionpack/lib/action_view/base.rb')
-rw-r--r-- | actionpack/lib/action_view/base.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb index 4869f8f555..4004ad3326 100644 --- a/actionpack/lib/action_view/base.rb +++ b/actionpack/lib/action_view/base.rb @@ -304,8 +304,9 @@ module ActionView #:nodoc: i = file_name.index(@base_path) l = @base_path.length s_file_name = i ? file_name[i+l+1,file_name.length-l-1] : file_name - s_file_name.gsub!(/\/|:/, '_') - s_file_name.sub!(/.rhtml/,'') + s_file_name.sub!(/.rhtml$/,'') + s_file_name.tr!('/:-', '_') + s_file_name.gsub!(/[^a-zA-Z0-9_]/){|s| s[0].to_s} erb_name += s_file_name else @@erb_count += 1 |