I am trying to experiment with a plugin that uses a .rjpg template to generate an image rendered by rmagick. All seems well, but the file is rendering with application.rhtml layout around it. And considering the data is binary image data, this is obviously not what I want. So I have this in my plugins init.rb: ActionController::Base.exempt_from_layout ''rjpg'' but it has no effect. I also tried using :rjpg and /\.rjpg$/ to no avail. I tried putting the call to exempt_from_layout in my environment.rb, and in the controller that is calling this template, but no matter what it still renders with a layout. The only way I can suppress the layout is explicitly telling the layout not to render inside my action: def foo @image = Image.find(1) render :layout => false end This seems like a silly requirement, especially since expempt_from_layout is supposed to work with edge/1.2. I have tested both version and cannot get the layout to be ignored for the render. Anyone used exempt_from_layout successfully? What am I doing wrong here. Thanks in advance, -Alex --- http://beautifulpixel.com -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Alex Wayne wrote:> So I have this in my plugins init.rb: > > ActionController::Base.exempt_from_layout ''rjpg'' > > but it has no effect.Bump. I suppose I need to figure out how to create a test case for this and submit a ticket. --- http://beautifulpixel.com -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> Alex Wayne wrote: > >> So I have this in my plugins init.rb: >> >> ActionController::Base.exempt_from_layout ''rjpg''Tip: Go with PNG, for various technical and political reasons which I have not researched but am certain exist... -- Phlip http://www.greencheese.us/ZeekLand <-- NOT a blog!!! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Phlip wrote:>> Alex Wayne wrote: >> >>> So I have this in my plugins init.rb: >>> >>> ActionController::Base.exempt_from_layout ''rjpg'' > > Tip: Go with PNG, for various technical and political reasons which I > have > not researched but am certain exist... > > -- > Phlip > http://www.greencheese.us/ZeekLand <-- NOT a blog!!!PNGs are awesome. But they are either 8-bit and small in filesize, or they are full color and large in filesize. JPEG''s represent a good balance between filesize and image fidelity that PNG still can''t match for photographic data. But this discussion is really outside the scope of my question here. I am simply trying to learn to write template handlers. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Since I am 90% sure this is a legitimate bug, I have created a ticket with a failing test. If anyone has any solutions for this problem, propose a patch and lets get this fixed! http://dev.rubyonrails.org/ticket/6742 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---