ROR 2.0 & undefined method `table_name'

Hi all,

I’ve got stuck with this. Here’s the error message:
NoMethodError in Account#index

Showing account/index.rhtml where line #4 raised:

undefined method `table_name’ for Upload:Class
Extracted source (around line #4):

1:

My account


2:
3: Login name: <%= current_user.login %>

4: Files uploaded: <%= current_user.uploads.find(:all).count %>
5:

6: <%= render :partial => ‘layouts/menu’ %>

its a basic acts_as_authenticated user model with has_many :uploads
attribute
any suggestions on how to fix this?

A backtrace would be really awesome, along with the files from the app
that it points to.

I got that error too (but in Rails 1.2.3)

http://pastie.org/139900

I only added line7 in user_controller to have logs. The app works
perfectly without it. And I also tried dropping/migrating the DB.

On Jan 16, 2008, at 10:23 PM, riskyhm wrote:

I got that error too (but in Rails 1.2.3)

http://pastie.org/139900

I only added line7 in user_controller to have logs. The app works
perfectly without it. And I also tried dropping/migrating the DB.

Look at the message. You have a naming conflict between WEBrick::Log
and the Log class you defined. Can you use WoodenLogs or something
like that?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs