Methods not found

Web page throw: ‘undefined method `find’ for Forum:Module’

Anything method is not found in my controller, all, find, wherever I
define de action in routes, it not work.

route.rb:
root :controller => ‘forums’, :action => ‘show’

controller:
class ForumsController < ApplicationController
def index
@forums = Forum.all
end

model:
class Forum < ActiveRecord::Base
#attr_accessible :nome, :description
has_many :topics, :dependent => :destroy
end

I’ve used nifty to create all application.

On Tue, Sep 13, 2011 at 12:19, Angelo Farias
[email protected] wrote:

Web page throw: ‘undefined method `find’ for Forum:Module’

Anything method is not found in my controller, all, find, wherever I define de
action in routes, it not work.

route.rb:
root :controller => ‘forums’, :action => ‘show’

Show, not index? If you do indeed mean show, show us what the
controller does for show.

-Dave

On Tue, Sep 13, 2011 at 11:29 PM, Dave A.
[email protected] wrote:

Show, not index? If you do indeed mean show, show us what the
controller does for show.

Better: Show it to the Rails community, one forum over.


Phillip G.

gplus.to/phgaw | twitter.com/phgaw

A method of solution is perfect if we can forsee from the start,
and even prove, that following that method we shall attain our aim.
– Leibniz

Another methods not work if a redirect to new or index…

controller forum:
class ForumsController < ApplicationController
def index
@forums = Forum.all
end

def show
@forum = Forum.find(params[:id])
end

def new
@forum = Forum.new
end

Phillip, I understand, I will looking for a rails community, at google I
couldn’t find any good solution.

Angelo

-----Mensagem Original-----
From: Phillip G.
Sent: Tuesday, September 13, 2011 6:49 PM
To: ruby-talk ML
Subject: Re: Methods not found

On Tue, Sep 13, 2011 at 11:29 PM, Dave A.
[email protected] wrote:

Show, not index? If you do indeed mean show, show us what the
controller does for show.

Better: Show it to the Rails community, one forum over.


Phillip G.

gplus.to/phgaw | twitter.com/phgaw

A method of solution is perfect if we can forsee from the start,
and even prove, that following that method we shall attain our aim.
– Leibniz