Open dhampik opened 9 years ago
Fix it please, we really need this case :)
Can you post detailed workflow to reproduce bug?
For me it is work fine. I use custom haml_bootstrap
templates in my project. And I check customisation of erb
templates.
From Gemfile.lock
:
rails (4.2.1)
rails-admin-scaffold (0.1.0)
Try to add erb templates and generate scaffold.
For me it is work correct. My actions: into console:
> mkdir lib/templates/admin/scaffold_controller/views/erb
> cp ~/.rvm/gems/ruby-2.2.2@GEMSET/gems/rails-admin-scaffold-0.1.0/lib/generators/admin/scaffold_controller/templates/views/erb/* lib/templates/admin/scaffold_controller/views/erb
in all templates add as first line foo
into console:
> rails g admin:scaffold_controller foo
=>
...
create app/views/admin/foos/index.html.erb
...
I check generated files and they contain foo
as first line.
If I call rails g scaffold model_name
it should not take your custom templates because it is use another generator. You should check rails docs about scaffold templates customisation. It says:
If you generate another resource, you can see that we get exactly the same result! This is useful if you want to customize your scaffold templates and/or layout by just creating edit.html.erb, index.html.erb and so on inside lib/templates/erb/scaffold.
Can u archive me your app an send to pangodfather@Gmail.com Thank u
I created repo on github - https://github.com/maslenkov/templates_example
Thank u. So for u i need to configurate my rails app correctly?
I think, this is a problem with paths to templates. I could be wrong.
I can record some screencast if u need
Yes. It is ok. I send you email.
its was my mistake. Its important to call like index.html.erb.erb (erb.erb) now for me its work fine. Thanks.
According to report in comment on my blog, generator templates customization does not work as described in readme:
Should check it and fix it.