473,326 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Can't pull up relation of table ending in 's'

I have a table called 'Wbs'. I've generate the controller which works fine when executing from the command line.

Example:

Expand|Select|Wrap|Line Numbers
  1. irb>Wbs <enter> 
  2.  
  3. Wbs(id: integer, description: string, project_id: integer, wbs_no: string, published: boolean, created_at: datetime, updated_at: datetime))
  4.  
The problem is when I attempt to return all Wbs objects for a given project. Rails removes the 's' from wbs and tries to make a call to a method called "Project::Wb" instead of "Project::Wbs".

Example:

Expand|Select|Wrap|Line Numbers
  1. irb>Projects.first.wbs   
  2.  
  3. Project Load (0.4ms)  SELECT "projects".* FROM "projects" LIMIT 1
  4. NameError: uninitialized constant Project::Wb
  5.  
I do have belong_to and has_many set in their respective models.

How can I resolve this issue?
Jul 3 '12 #1
0 1741

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: §Þ¦w | last post by:
How can i get the table height by Javascript
20
by: Tyler Carver | last post by:
I would like to do something that seems so basic with two div's but I don't think it can be done. Tables can do it in a snap. I was convinced that css was the way to go for layout but without...
1
by: Ed L. | last post by:
What does this mean? WARNING: Rel pg_class: TID 17/13: InsertTransactionInProgress 106004881 - can't shrink relation ---------------------------(end of broadcast)---------------------------...
4
by: realjacky | last post by:
How can i copy a table to a new table(structure and data) with primary key remain i have try to use Select * into table from old_table However, i dont have any primary key which old_table have...
2
by: henryhcface | last post by:
now i have a question, because in our project some tables have too records ,so the speed of the run application is very slow , we plan to use partition table. but what can we do ? the...
1
by: noorulahilah | last post by:
How can i create the table through coding in access? And how can i connect with vb. Suppose "db" is database variable. "stu1" is already existing table name. Now i want to create table "stu2"...
1
by: abhilash12 | last post by:
how can resizing html header table
0
by: DR | last post by:
I have a CLR function thet returns IEnumberable (a table) and it has a FillRow function. I am returning 10,000 integers from this function. Is there any way that I can preallocate the resulting...
2
by: annamalainagarajan | last post by:
hi genius, i am using a ms-access database as a back-end and front-end as a vb6. now i want use as a ms-access as multiuser database, so i create the client database as linked tables of server...
1
by: Esmi | last post by:
I am developing an application in Ms Excel 2003 that has a feature to update records in Ms Access. The problem is the table name I am trying to update contains a space and whenever I run the below...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.