On 2/20/07, <b class="gmail_sendername">Lea Viljanen</b> &lt;<a href="mailto:Lea.Viljanen@iki.fi">Lea.Viljanen@iki.fi</a>&gt; wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Why are the Masterview HTML templates empty after the following sequence:<br><br>lea@migrox:~/src/swaram/app$ cd ..<br>lea@migrox:~/src/swaram$ script/generate masterview license admin<br>Initializing MasterView configuration (2007-02-20 15:09)
<br>Program name = script/generate<br>&nbsp;&nbsp;dependency&nbsp;&nbsp;model<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exists&nbsp;&nbsp;&nbsp;&nbsp;app/models/<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exists&nbsp;&nbsp;&nbsp;&nbsp;test/unit/<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exists&nbsp;&nbsp;&nbsp;&nbsp;test/fixtures/<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;skip&nbsp;&nbsp;&nbsp;&nbsp;app/models/license.rb<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;skip&nbsp;&nbsp;&nbsp;&nbsp;test/unit/license_test.rb
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;skip&nbsp;&nbsp;&nbsp;&nbsp;test/fixtures/licenses.yml<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exists&nbsp;&nbsp;app/controllers/<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exists&nbsp;&nbsp;app/helpers/<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exists&nbsp;&nbsp;app/views/admin<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exists&nbsp;&nbsp;public/stylesheets/masterview<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exists&nbsp;&nbsp;app/masterview
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exists&nbsp;&nbsp;app/masterview/extra<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exists&nbsp;&nbsp;test/functional/<br>overwrite app/controllers/admin_controller.rb? [Ynaqd] n<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;skip&nbsp;&nbsp;app/controllers/admin_controller.rb<br>overwrite test/functional/admin_controller_test.rb? [Ynaqd] n
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;skip&nbsp;&nbsp;test/functional/admin_controller_test.rb<br>&nbsp;&nbsp; identical&nbsp;&nbsp;app/helpers/admin_helper.rb<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create&nbsp;&nbsp;admin/list.html<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create&nbsp;&nbsp;admin/destroy.html<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create&nbsp;&nbsp;admin/show.html<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create&nbsp;&nbsp;admin/new.html
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;create&nbsp;&nbsp;admin/edit.html<br>&nbsp;&nbsp; identical&nbsp;&nbsp;public/stylesheets/masterview/style.css<br>overwrite public/stylesheets/masterview/sidebox.css? [Ynaqd] n<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;skip&nbsp;&nbsp;public/stylesheets/masterview/sidebox.css<br>overwrite public/stylesheets/masterview/color-
scheme.css? [Ynaqd] n<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;skip&nbsp;&nbsp;public/stylesheets/masterview/color-scheme.css<br>&nbsp;&nbsp; identical&nbsp;&nbsp;app/masterview/extra/mvpreview.js<br>&nbsp;&nbsp; identical&nbsp;&nbsp;app/masterview/extra/show_only_new.css<br>&nbsp;&nbsp; identical&nbsp;&nbsp;app/masterview/extra/show_only_edit.css
<br>&nbsp;&nbsp; identical&nbsp;&nbsp;app/masterview/extra/show_only_show.css<br>&nbsp;&nbsp; identical&nbsp;&nbsp;app/masterview/extra/show_only_list.css<br>&nbsp;&nbsp; identical&nbsp;&nbsp;app/masterview/extra/show_only_destroy.css<br>lea@migrox:~/src/swaram$<br>lea@migrox:~/src/swaram$ cd app/views/admin/
<br>lea@migrox:~/src/swaram/app/views/admin$ ls -al<br>total 120<br>drwxr-xr-x&nbsp;&nbsp;4 lea lea 4096 2007-02-20 15:09 .<br>drwxr-xr-x 12 lea lea 4096 2007-02-17 00:13 ..<br>-rw-r--r--&nbsp;&nbsp;1 lea lea&nbsp;&nbsp;&nbsp;&nbsp;0 2007-02-20 15:09 destroy.html
<br>-rw-r--r--&nbsp;&nbsp;1 lea lea&nbsp;&nbsp;&nbsp;&nbsp;0 2007-02-20 15:09 edit.html<br>...<br><br>To recap, I am in the process of converting an existing application to<br>use Masterview, so I actually do have a model called license and a<br>controller called admin. And no, I&#39;m not willing to totally overwrite
<br>them, just generate the HTML, thank you.<br><br>With the previous two controllers I converted, I just copied the<br>existing HTML files using the Admin GUI without using the generator, so<br>I haven&#39;t had this particular problem before. Or is it intended that the
<br>generator is used only when running MV for the first time and then<br>everything is copied through the admin web? If so, a hint towards this<br>in the documentation would be nice.<br><br>--<br>Lea &#39;LadyBug&#39; Viljanen&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Independent security consultant.
<br><a href="mailto:ladybug@iki.fi">ladybug@iki.fi</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.lavsecurity.fi/">http://www.lavsecurity.fi/</a><br><br></blockquote></div><br>Lea, <br><br>The generator is designed to get a person up and running as quickly as possible with a CRUD application in MasterView. It can be run with an existing project or a new project. However like you said, if you already have a working controller and model, then you will probably want to tell the generator to not override those files.
<br><br>You will want to make sure that&nbsp; your controller method names match up with the templates being generated (both name wise and that the appropriate instance variables are being created for the views to use). <br><br>
Another thing you could do to help this process is to create another&nbsp; rails app and generate it there to see what the controller it creates looks like and you can then update yours appropriately. Alternatively you can update the views.
<br><br>The generator isn&#39;t the only way to proceed, though it is one of the quickest. The other option is to simply take some html representing what you want to end up with and then sprinkly the MasterView directives into it, to make it real. We are planning to prepare more info and videos about how to do this second process.
<br><br>I hope this helps some. If you have trouble we&#39;ll try to help however we can.<br><br>Blessings,<br><br>Jeff<br><br><br><br>