This project is archived and is in readonly mode.

#4036 ✓resolved
Szymon Nowak

[PATCH] #controller_path returns empty string in Ruby 1.8.7

Reported by Szymon Nowak | February 22nd, 2010 @ 05:34 PM | in 3.0.2

Actually it returns an empty string in this particular code:

require 'rubygems'
require 'bundler'
require 'action_controller'

name = 'ExamplesController'
class_name = name.camelize
klass =
Object.const_set(class_name, klass)
controller =

=> "ExamplesController" in Ruby 1.8.7 and 1.9.1

p controller.controller_path
=> "" in Ruby 1.8.7
=> "examples" in Ruby 1.9.1

This problem occurs only in Rails 3.0 (I'm using master branch - that's why bundler is used here). In Rails 2.3.5 it works correctly.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

People watching this ticket


Referenced by