Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Cannot use table tables

#1292

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.

Reported by mojoyoyo · October 30th, 2008 @ 12:35 AM

State: wontfix
Milestone: 2.x
Assigned to: nobody
Importance: none

Activity

  1. Frederick Cheung
    Frederick Cheung

    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

    December 10th, 2008 @ 01:22 PM

  2. josh
    josh
    • State changed from new to wontfix

    Fred is right, you need to use ::Table in that case.

    December 15th, 2008 @ 09:13 PM