This project is archived and is in readonly mode.
Cannot use table tables
Reported by mojoyoyo | October 30th, 2008 @ 12:35 AM | in 2.x
With scripts... Migration: create a database table called "tables". Model: create a model, table.rb. Controller: create a controller, tables_controller.rb
In the controller method create(), if you try to create an entry in the tables table by issuing (at first) @table = Table.new (for example) it does not resolve correctly to the correct (user) "Table" but I am supposing to some internal structure "Table" and you will get a wrong number of parameters error.
Curiously, if you start script/console, and type @table = Table.new it will resolve correctly.
Comments and changes to this ticket
-
Frederick Cheung December 10th, 2008 @ 01:22 PM
Well this doesn't sound like a great idea, but if the problem is that it's not picking up the top level Table constant then you should be able to use ::Table
-
josh December 15th, 2008 @ 09:13 PM
- State changed from new to wontfix
Fred is right, you need to use ::Table in that case.
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="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>