[Rails] Re: generate scaffold not generating views

José Bonnet jbonnet at ptinovacao.pt
Thu Apr 20 21:03:58 GMT 2006


Hi, Adam!
Just did it:
1. removed .../views/admin
2. jbonnet$ ./script/generate scaffold Product Admin
       exists  app/controllers/
       exists  app/helpers/
       create  app/views/admin
       exists  test/functional/
   dependency  model
       exists    app/models/
       exists    test/unit/
       exists    test/fixtures/
       create    app/models/product.rb
    identical    test/unit/product_test.rb
    identical    test/fixtures/products.yml

That is, files in ../views/admin don't get generated.
I'm using the following versions:
jbonnet$ rails -v
Rails 1.1.2
jbonnet$ ruby -v
ruby 1.8.2 (2004-12-25) [powerpc-darwin8.0]

thanks,
jb
On Apr 20, 2006, at 8:01 PM, Adam Bloom wrote:

>> Yes, I've generated the model (product) and the controller (admin).
>
> I'm not sure what you mean by this, but if you mean that you've done:
>
> ./script/generate controller Admin
>
> When you generate a controller it creates an empty /view/<controller
> name> folder that won't be overwritten by future generates. Whereas if
> you do:
>
> ./script/generate scaffold Product Admin
>
> It creates a controller, a model, and the /view/admin files.
>
> -- 
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Rails mailing list
> Rails at lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails



More information about the Rails mailing list