Has anybody found out how to deal with unknown respond_to''s? for example: respond_to do |format| format.html # show.rhtml format.xml { head :status => :method_not_allowed } format.rss { head :status => :method_not_allowed } format.atom { head :status => :method_not_allowed } will deal well with predetermined types (html, xml, rss, atom) but I''d like to respond appropriately to say ''format.jpg''. any thoughts? Cheers, Jodi General Partner The nNovation Group inc. www.nnovation.ca/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 -~----------~----~----~----~------~----~------~--~---
On 2/9/07, Jodi Showers <jodi-BOB1p6JRLoAV+D8aMU/kSg@public.gmane.org> wrote:> > Has anybody found out how to deal with unknown respond_to''s? > > for example: > > respond_to do |format| > format.html # show.rhtml > format.xml { head :status => :method_not_allowed } > format.rss { head :status => :method_not_allowed } > format.atom { head :status => :method_not_allowed } > > will deal well with predetermined types (html, xml, rss, atom) > > but I''d like to respond appropriately to say ''format.jpg''. > > any thoughts?Create your own mime types. Topfunky shows you how -- http://nubyonrails.com/articles/2006/12/18/dynamic-graphics-with-rails-1-2 -- Rick Olson http://weblog.techno-weenie.net http://mephistoblog.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 -~----------~----~----~----~------~----~------~--~---
On 9-Feb-07, at 3:02 PM, Rick Olson wrote:> > On 2/9/07, Jodi Showers <jodi-BOB1p6JRLoAV+D8aMU/kSg@public.gmane.org> wrote: >> >> Has anybody found out how to deal with unknown respond_to''s? >> >> for example: >> >> respond_to do |format| >> format.html # show.rhtml >> format.xml { head :status => :method_not_allowed } >> format.rss { head :status => :method_not_allowed } >> format.atom { head :status => :method_not_allowed } >> >> will deal well with predetermined types (html, xml, rss, atom) >> >> but I''d like to respond appropriately to say ''format.jpg''. >> >> any thoughts? > > Create your own mime types. Topfunky shows you how -- > http://nubyonrails.com/articles/2006/12/18/dynamic-graphics-with- > rails-1-2Thanx Rick - but I''m trying to handled edge cases - mime types asked for, but application doesn'' t handle. intentionally. make sense? J --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---