Aha. <light bulb goes on.> Thanks Fred, this makes sense. Appreciate it.
On Feb 24, 7:12 pm, Frederick Cheung <[email protected]> wrote: > On Feb 24, 10:00 pm, Brian Piercy <[email protected]> wrote: > > > > > Guys & gals, > > > I'm also learning RoR (using v2.3.4). I've got a basic scaffold > > working for image file creation, and - to a point - image file > > display. > > > The send_data function is working in my controller - no problem. The > > model code is able to parse the uploaded file construct too. > > > def show > > @image = Image.find(params[:id]) > > send_data(@image.binary_data, :type => > > @image.content_type, :disposition=>"inline") > > end > > > The issue with my output page, specifically "show". All attempts to > > render the page, result in *only* the image (.jpg, .png, ... format > > unimportant) being rendered. No other HTML makes it to the browser. > > This controller action will only ever send a chunk of image data to a > browser. If you wanted that image to be served on a page then you > would need a separate page (server by a different action (and/or > controller) that contained an img tag whose src points at the action > you've pasted above > > Fred > > > > > I've tried code variants with <% image_tag .... %> to no avail. > > > Ideas? I'd like to keep the remainder of my hair over this one. > > > -Brian -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

