From jfrisby at mrjoy.com Wed Mar 21 21:59:22 2007 From: jfrisby at mrjoy.com (Frisby Jon) Date: Wed, 21 Mar 2007 18:59:22 -0700 Subject: [Masterview-users] Found a bug in gen_replace, and have a couple how-to questions... Message-ID: First, the bug. In parser.rb, this: def generate_replace(value) @renderer.append_raw ERB_EVAL_START+value+ERB_EVAL_END end Should be: def generate_replace(value) @renderer.append_raw ERB_CONTENT_START+value+ERB_EVAL_END end In order to behave as documented at: http://masterview.org/directives.html#mv_gen_replace Second, a how-to question. If I have in-line CSS, like so: How do I abstract out the URL in there so that it works for both the designer and when used through Rails? Third, another how-to question. How do I make something like this work: go to home page Right now, it's choking out pretty hard by generating code like so: <%= link_to( { '<%= image_tag( 'home.gif', :alt => "go to home page", :height => 21, :id => "home", :width => 21 ) %>' }, :action => 'index' ) %> -JF From jeff.barczewski at gmail.com Thu Mar 22 11:29:56 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Thu, 22 Mar 2007 10:29:56 -0500 Subject: [Masterview-users] Found a bug in gen_replace, and have a couple how-to questions... In-Reply-To: References: Message-ID: <19cda190703220829o484bf886tc52c785eef961394@mail.gmail.com> On 3/21/07, Frisby Jon wrote: > > First, the bug. In parser.rb, this: > def generate_replace(value) > @renderer.append_raw ERB_EVAL_START+value+ERB_EVAL_END > end > > Should be: > def generate_replace(value) > @renderer.append_raw ERB_CONTENT_START+value+ERB_EVAL_END > end > > In order to behave as documented at: > http://masterview.org/directives.html#mv_gen_replace Thanks Jon. I will add some tests around this and make the fix. Second, a how-to question. If I have in-line CSS, like so: > > > How do I abstract out the URL in there so that it works for both the > designer and when used through Rails? Well we currently have this type of functionality for external css, but sounds like we do need to consider additional options for both internal styles and styles with images. Let me think about it and see what I can come up with. Third, another how-to question. How do I make something like this work: > > src="../../../public/images/home.gif" mv:image_tag="home.gif" > width="21" height="21" id="home" alt="go to home page" /> > > Right now, it's choking out pretty hard by generating code like so: > > <%= link_to( { '<%= image_tag( 'home.gif', :alt => "go to home > page", :height => 21, :id => "home", :width => 21 ) %>' }, :action => > 'index' ) %> > > I see what you mean. We need a way to accomodate things besides just text since images are a common thing used for links too. I'll take a look at this too. Thanks for the bug fix and feedback. I'll see what I can do. Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070322/da6043b4/attachment-0001.html From jeff.barczewski at gmail.com Thu Mar 22 14:11:07 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Thu, 22 Mar 2007 13:11:07 -0500 Subject: [Masterview-users] Found a bug in gen_replace - fixed in trunk Message-ID: <19cda190703221111g67a92925xa75ebc930b77b380@mail.gmail.com> On 3/21/07, Frisby Jon wrote: > > First, the bug. In parser.rb, this: > def generate_replace(value) > @renderer.append_raw ERB_EVAL_START+value+ERB_EVAL_END > end > > Should be: > def generate_replace(value) > @renderer.append_raw ERB_CONTENT_START+value+ERB_EVAL_END > end > > In order to behave as documented at: > http://masterview.org/directives.html#mv_gen_replace > > I have added a couple tests and patched mv:gen_replace to use <%= %> as it should have rather than <% %> The code is checked into the trunk at svn://rubyforge.org/var/svn/masterview/trunk/masterview and will be rolled up into a new gem (0.3.3) when we have a few more items in there for a release. Thanks to Jon for identifying the problem! Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070322/a720bf9b/attachment.html From rajlenin at gmail.com Thu Mar 22 21:57:31 2007 From: rajlenin at gmail.com (Rajavel Lenin) Date: Thu, 22 Mar 2007 18:57:31 -0700 Subject: [Masterview-users] Bug in mv:form - not creating multipart Message-ID: <002601c76cee$9f102480$06001fac@homedesktop> For a template like this:

Upload File:

It generates the .rhtml like this: <%= form_tag( { :action=>'upload' }, :method => "post" ) %>

Upload File:

By not adding :multipart=>true to the form_tag . I am a new user to Rails/Ruby/Masterview and it took me almost a day to figure out this bug. Thanks, Raj -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070322/300f9cc0/attachment.html From jeff.barczewski at gmail.com Fri Mar 23 12:07:36 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Fri, 23 Mar 2007 11:07:36 -0500 Subject: [Masterview-users] Bug in mv:form - not creating multipart In-Reply-To: <002601c76cee$9f102480$06001fac@homedesktop> References: <002601c76cee$9f102480$06001fac@homedesktop> Message-ID: <19cda190703230907x7a933cf4tbd9bb6c3b5cb21c5@mail.gmail.com> On 3/22/07, Rajavel Lenin wrote: > > For a template like this: > > > >
enctype="multipart/form-data"> > >

Upload File:
> >

> >

> >
> > > > It generates the .rhtml like this: > > > > <%= form_tag( { :action=>'upload' }, :method => "post" ) %> > >

Upload File:
> >

> >

> > > > > > By not adding :multipart=>true to the form_tag . > I am a new user to Rails/Ruby/Masterview and it took me almost a day to > figure out this bug. > Thanks for reporting this Raj. I will make the change and add some tests around it. In tracking this down and reporting it, you will save others from the same problem, so thank you for taking the time. I will post up the change as soon as it is ready. Blessings, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070323/d59db869/attachment.html From rajlenin at gmail.com Fri Mar 23 18:28:36 2007 From: rajlenin at gmail.com (Rajavel Lenin) Date: Fri, 23 Mar 2007 15:28:36 -0700 Subject: [Masterview-users] Bug in mv:stylesheet_link Message-ID: <000f01c76d9a$9a1950d0$06001fac@homedesktop> becomes <%= stylesheet_link_tag %> Instead of <%= stylesheet_link_tag( 'style.css' ) %> as mentioned in the document -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070323/9f737e29/attachment.html From rajlenin at gmail.com Fri Mar 23 18:33:58 2007 From: rajlenin at gmail.com (Rajavel Lenin) Date: Fri, 23 Mar 2007 15:33:58 -0700 Subject: [Masterview-users] Bug in mv:submit Message-ID: <001401c76d9b$5a3fd640$06001fac@homedesktop> Becomes <%= submit_tag( 'image', :id => "submit" ) %> Isn't supposed to pass other parameters(type,src) as options to submit_tag? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070323/4c872624/attachment.html From jeff.barczewski at gmail.com Sat Mar 24 18:33:54 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Sat, 24 Mar 2007 16:33:54 -0600 Subject: [Masterview-users] Bug in mv:submit In-Reply-To: <001401c76d9b$5a3fd640$06001fac@homedesktop> References: <001401c76d9b$5a3fd640$06001fac@homedesktop> Message-ID: <19cda190703241533i3a8fddd9h9a21485047af5eb1@mail.gmail.com> On 3/23/07, Rajavel Lenin wrote: > > src="../../../public/images/submit.jpg" value="image" mv:submit="" /> > > > > Becomes > > > > <%= submit_tag( 'image', :id => "submit" ) %> > > > > Isn't supposed to pass other parameters(type,src) as options to > submit_tag? > Thanks Rajavel. I will take a closer look at it. I should be able to tackle this and the other bugs tomorrow. Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070324/313675f3/attachment-0001.html From jeff.barczewski at gmail.com Sat Mar 24 18:35:08 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Sat, 24 Mar 2007 16:35:08 -0600 Subject: [Masterview-users] Bug in mv:stylesheet_link In-Reply-To: <000f01c76d9a$9a1950d0$06001fac@homedesktop> References: <000f01c76d9a$9a1950d0$06001fac@homedesktop> Message-ID: <19cda190703241535u243973cdw8071168a3786873d@mail.gmail.com> On 3/23/07, Rajavel Lenin wrote: > > type="text/css" mv:stylesheet_link=" " /> > > > > becomes > > > > <%= stylesheet_link_tag %> > > > > Instead of > > > > <%= stylesheet_link_tag( 'style.css' ) %> as mentioned in the document > Will address this one too. Thanks for posting. Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070324/0adfa118/attachment.html From ed.howland at gmail.com Mon Mar 26 11:25:33 2007 From: ed.howland at gmail.com (Ed Howland) Date: Mon, 26 Mar 2007 10:25:33 -0500 Subject: [Masterview-users] Configure admin pages to allow access from non-localhost Message-ID: <3df642dd0703260825i7c93c958y16ef790880f0633d@mail.gmail.com> The documentation on the website says: Built-in local machine check (local_request?) Defines custom MV Admin authorization method and module. Automatically loads app/masterview/admin_auth_mixin.rb if present. config.admin_auth_mixin = { :file => 'admin_auth_mixin', # require file in app/masterview :file_loc => nil # :RAILS_ROOT or root dir path for alt load load :module => :MasterViewAdminAuthMixin, # mixin module name } see examples/rails_app_admin_auth/auth_local_request_mixin.rb for more details But this file doesn't exist in my examples folder. What should admin_auth_mixin do to allow access from non-local hosts? Thanks Ed -- Ed Howland http://greenprogrammer.blogspot.com From jeff.barczewski at gmail.com Mon Mar 26 15:06:59 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Mon, 26 Mar 2007 13:06:59 -0600 Subject: [Masterview-users] Bug in mv:submit In-Reply-To: <001401c76d9b$5a3fd640$06001fac@homedesktop> References: <001401c76d9b$5a3fd640$06001fac@homedesktop> Message-ID: <19cda190703261206k7161058aga3eef8733970f5e4@mail.gmail.com> On 3/23/07, Rajavel Lenin wrote: > > src="../../../public/images/submit.jpg" value="image" mv:submit="" /> > > > > Becomes > > > > <%= submit_tag( 'image', :id => "submit" ) %> > > > > Isn't supposed to pass other parameters(type,src) as options to > submit_tag? > Actually after looking closer at what you were asking the submit tag will not pass other attributes in as parameters because from what I can tell the rails submit_tag helper doesn't support additional things like images from looking at the documentation and related source. However you could simply just use a button with image and some javascript do accomplish what you were wanting. It would be nice to have a directive to do this though, so I'll also make a note that we need to add this to the todo list of new directives. Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070326/ffa2ae72/attachment.html From jeff.barczewski at gmail.com Mon Mar 26 15:12:02 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Mon, 26 Mar 2007 13:12:02 -0600 Subject: [Masterview-users] Bug in mv:form - not creating multipart In-Reply-To: <002601c76cee$9f102480$06001fac@homedesktop> References: <002601c76cee$9f102480$06001fac@homedesktop> Message-ID: <19cda190703261212s75f52f91r838d214dac3025f2@mail.gmail.com> On 3/22/07, Rajavel Lenin wrote: > > For a template like this: > > > >
enctype="multipart/form-data"> > >

Upload File:
> >

> >

> >
> > > > It generates the .rhtml like this: > > > > <%= form_tag( { :action=>'upload' }, :method => "post" ) %> > >

Upload File:
> >

> >

> > > > > > By not adding :multipart=>true to the form_tag . > > > > I am a new user to Rails/Ruby/Masterview and it took me almost a day to > figure out this bug. > > > > Thanks, > > Raj > The fix for this is checked into the subversion trunk so you can check it out with subversion now svn://rubyforge.org/var/svn/masterview/trunk/masterview I will plan to do a gem build and formal release sometime later this week. Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070326/cae5da01/attachment.html From jeff.barczewski at gmail.com Mon Mar 26 15:14:10 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Mon, 26 Mar 2007 13:14:10 -0600 Subject: [Masterview-users] Bug in mv:stylesheet_link In-Reply-To: <000f01c76d9a$9a1950d0$06001fac@homedesktop> References: <000f01c76d9a$9a1950d0$06001fac@homedesktop> Message-ID: <19cda190703261214o6d37b311le4e4f8f369d23c93@mail.gmail.com> On 3/23/07, Rajavel Lenin wrote: > > type="text/css" mv:stylesheet_link=" " /> > > > > becomes > > > > <%= stylesheet_link_tag %> > > > > Instead of > > > > <%= stylesheet_link_tag( 'style.css' ) %> as mentioned in the document > The code was looking at the src attribute rather than the href attribute as it should have been. I have corrected the tests and code. The fix for this is checked into the subversion trunk so you can check it out with subversion now svn://rubyforge.org/var/svn/masterview/trunk/masterview I will plan to do a gem build and formal release sometime later this week. Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070326/d19f8878/attachment.html From jeff.barczewski at gmail.com Mon Mar 26 15:20:02 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Mon, 26 Mar 2007 13:20:02 -0600 Subject: [Masterview-users] Configure admin pages to allow access from non-localhost In-Reply-To: <3df642dd0703260825i7c93c958y16ef790880f0633d@mail.gmail.com> References: <3df642dd0703260825i7c93c958y16ef790880f0633d@mail.gmail.com> Message-ID: <19cda190703261220i5144b674w4fa10d8996a7c349@mail.gmail.com> On 3/26/07, Ed Howland wrote: > > The documentation on the website says: > > Built-in local machine check (local_request?) Defines custom MV Admin > authorization method and module. > Automatically loads app/masterview/admin_auth_mixin.rb if present. > > config.admin_auth_mixin = { > :file => 'admin_auth_mixin', # require file in app/masterview > :file_loc => nil # :RAILS_ROOT or root dir path for alt load load > :module => :MasterViewAdminAuthMixin, # mixin module name > } > > see examples/rails_app_admin_auth/auth_local_request_mixin.rb for > more details > > But this file doesn't exist in my examples folder. I have to check the build to see you are not getting the file. What should admin_auth_mixin do to allow access from non-local hosts? > > The file is attached. Let me know if you need any additional info. You can basically change out the logic in allow_access? to do whatever checking you want. It is mixed into to the controller so it has access to all of the controller's data. Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070326/08320e5c/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: admin_auth_mixin.rb Type: application/octet-stream Size: 1652 bytes Desc: not available Url : http://rubyforge.org/pipermail/masterview-users/attachments/20070326/08320e5c/attachment-0001.obj