Forum: Ruby on Rails undefined method `scaffold' for #<LocationsController:0xb7a9

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Phillip Novess (Guest)
on 2006-04-03 23:33
(Received via mailing list)
Would anybody know why I get this error from this bit of code:


class LocationsController < ApplicationController

   def index
     scaffold :locations
   end

end



This is the way that is demonstrated in the screencast for creating a
quick scaffold. I have done this before. However, I come back to
working with Ruby after about a month on something else and now it
gives this error.

Any thoughts?

Thanks,
phill
Bill W. (Guest)
on 2006-04-03 23:55
(Received via mailing list)
Hi Phillip,

I'm sure I'd screw up the explanation of why, and hope someone who knows
more will illuminate for both of us, but I believe the scaffold
directive
needs to go outside your action methods like so.

class LocationsController < ApplicationController
  scaffold :locations

  def index
    # produce data for index.rhtml to present
  end

end
----- Original Message -----
From: "Phillip Novess" <removed_email_address@domain.invalid>
To: <removed_email_address@domain.invalid>
Sent: 2006-04-03 2:31 PM
Subject: [Rails] undefined method `scaffold'
for#<LocationsController:0xb7a9e858>
Phillip Novess (Guest)
on 2006-04-04 02:04
(Received via mailing list)
Thanks that was it.  How obvious?

Thanks,
Phill

On Apr 3, 2006, at 1:36 PM, Bill W. wrote:

Hi Phillip,

I'm sure I'd screw up the explanation of why, and hope someone who knows
more will illuminate for both of us, but I believe the scaffold
directive
needs to go outside your action methods like so.

class LocationsController < ApplicationController
   scaffold :locations

   def index
     # produce data for index.rhtml to present
   end

end
----- Original Message -----
From: "Phillip Novess" <removed_email_address@domain.invalid>
To: <removed_email_address@domain.invalid>
Sent: 2006-04-03 2:31 PM
Subject: [Rails] undefined method `scaffold'
for#<LocationsController:0xb7a9e858>


>
> phill
>
> _______________________________________________
> Rails mailing list
> removed_email_address@domain.invalid
> http://lists.rubyonrails.org/mailman/listinfo/rails
_______________________________________________
Rails mailing list
removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails
This topic is locked and can not be replied to.