Jeff Barczewski
2006-Aug-16 16:43 UTC
[Masterview-users] rake command for viewing rhtml and how I found safe_load_path Re: Update on progress for MasterView admin pages, rails 1.1.6 compatibility 8/16/06
On 8/16/06, Ed Howland <ed.howland at gmail.com> wrote:> > Jeff, how did you discover safe_load_path? On a list or rummaging > aound in the Rails source? >I went to the ruby on rails source tree and found the diff between 1.1.4 and 1.1.5 (where they started making the security changes). With that lead I then I went into the gem code to read it in context and see what it was doing. So far I find that the code is the quickest way to figure out what rails is doing, occasionally I will stumble across something in the mailing lists, however its hit or miss. And the code never lies :-) so I can always go in there and see exactly what it is doing. I find that this is extremely valuable.> > I liked the ability of using the MV Admin pages to view the resultant > .rhtml output. Is there any way to still see them using the rake > tasks? ThanksYes, there is a rake task to do this from command line rake -T will give you a complete list of mv tasks. look for the ones prefixed with mv: to do the view rhtml you would do this rake mv:view_rhtml RHTML=product/_form.rhtml (substitute product/_form.rhtml with whatever you are wanting to see rhtml for). Best regards, Jeff
Ed Howland
2006-Aug-17 20:41 UTC
[Masterview-users] rake command for viewing rhtml and how I found safe_load_path Re: Update on progress for MasterView admin pages, rails 1.1.6 compatibility 8/16/06
On 8/16/06, Jeff Barczewski <jeff.barczewski at gmail.com> wrote:> to do the view rhtml you would do this > > rake mv:view_rhtml RHTML=product/_form.rhtml > (substitute product/_form.rhtml with whatever you are wanting to see rhtml for). > > Best regards, >Jeff, for rake mv:view_rhtml, only the following worked: Any generated file name with the regular path, as in : controller/action.rhtml layouts/standard.rhtml None of the partials seemed to work: controller/_partial_view.rhtml partials/_collection_table.rhtml Could there be a problem parsing the file path if there is a leading ''_'' in the file name? Ed -- Ed Howland http://greenprogrammer.blogspot.com
Jeff Barczewski
2006-Aug-18 20:40 UTC
[Masterview-users] rake command for viewing rhtml and how I found safe_load_path Re: Update on progress for MasterView admin pages, rails 1.1.6 compatibility 8/16/06
Ed, yes the partials should work just the same, the actual name of the partial would have an underscore like you indicated so it would be something like rake mv:view_rhtml RHTML=controller/_partial_view.rhtml The name would be the same as what comes out in the list display which is rake mv:list (basically the relative path of the rhtml file, including underscore for partials). Note that in the render command the partial is not used, but the actual file name it is added in. render :partial => ''foo/bar'' uses foo/_bar.rhtml for the filename and that is what you would use to view_rhtml with rake mv:view_rhtml RHTML=foo/_bar.rhtml I''ll double check the code for this, but I do remember testing those scenarios. PS. I just about got the fix for rails 1.1.6, but found out that one of my client''s sites was having problems because of the rails upgrade (not masterview problem). So I spent the last several days upgrading and debugging those packages. Joy, joy. But, I am in the home stretch with that and then I''ll get back to the fix for admin pages. I believe I have it all coded, just need to test it. Jeff On 8/17/06, Ed Howland <ed.howland at gmail.com> wrote:> On 8/16/06, Jeff Barczewski <jeff.barczewski at gmail.com> wrote: > > to do the view rhtml you would do this > > > > rake mv:view_rhtml RHTML=product/_form.rhtml > > (substitute product/_form.rhtml with whatever you are wanting to see rhtml for). > > > > Best regards, > > > > Jeff, for rake mv:view_rhtml, only the following worked: > Any generated file name with the regular path, as in : > controller/action.rhtml > layouts/standard.rhtml > > None of the partials seemed to work: > controller/_partial_view.rhtml > partials/_collection_table.rhtml > > > Could there be a problem parsing the file path if there is a leading > ''_'' in the file name? > > Ed > > -- > Ed Howland > http://greenprogrammer.blogspot.com > _______________________________________________ > Masterview-users mailing list > Masterview-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/masterview-users >