Is scaffold no longer valid in the Controller definition?
-
22-07-2019 - |
Question
class AdminController < ApplicationController
scaffold :album
end
In a Rails 1.1.6 tutorial I was instructed to put the code "scaffold :album" inside my admin controller. This is a music application containing a model called "Album".
This generated an error saying that scaffold is not a valid method.
Is this a deprecated/obsolete syntax in the more recent versions of Rails?
I was expecting this to generate all of the appropriate generic CRUD scaffolding for my Album Model.
Solution
The scaffold
method was deprecated in Rails 2. See Why did Ruby on Rails deprecate the scaffold method
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow