I am looking for a replacement for the static scaffolding of Rails
1.2.x.
Rails 2.x has stopped proving the scaffolding.
Specifically I want to generate a controller from an existing model and
I want to have and freeze the code. Basically I just want to generate a
scaffold on which I am going to build my app (back and frontend). It is
also an example of code (I am still a newbie).
In 1.2.x the command was :
script/generate scaffold post blog/post
I quickly checked active_scaffold and streamlined. But I am not sure
they allow accessing the actual view code (rhtml/rjs/ruby), do they ?
Is static scaffolding completely deprecated, for everybody ?
H
--
Posted via http://www.ruby-forum.com/.
From what I understood it is not possible but I want to be sure.
H
Michael Slater wrote:
> scaffold in Rails 2.0 is what was called scaffold_resource in Rails
> 1.2.x. It generates a static scaffold using RESTful design.
>
> Michael Slater
> www.BuildingWebApps.com
--
Posted via http://www.ruby-forum.com/.
H
AndyV wrote:
> Yes, you can. script/generate scaffold MyModel --skip-migration
>
> Include --skip-migration to bypass the migration generation (you won't
> need it since you've already got the model). This will give you the
> scaffold but the views themselves may not auto-populate with the
> fields.
>
> You could also "script/generate controller MyModelsController index
> show new create edit update delete" This definitely will not get the
> auto-layout stuff, but it will stub things out for you. If you do
> this you'll need to add your own map.resources statement to routes.rb.
>
>
> HTH,
> AndyV
>
> On Feb 9, 7:01 am, Harry Seldon <rails-mailing-l...@andreas-s.net>
--
Posted via http://www.ruby-forum.com/.
Thanks a lot.
H
Brian Hogan wrote:
> Well, if you just want the forms, I made a generator to make that
> available
> in Rails 2.0
>
> gem install scaffold_form_generator
>
> See this for more info:
>
> http://scaffoldform.rubyforge.org/
>
> It does NOT generate controllers... just the views for new and edit,
> along
> with the partial.
>
> On Sun, Feb 10, 2008 at 4:22 PM, Harry Seldon <
--
Posted via http://www.ruby-forum.com/.