Dear friends
i have used send_file method to display my html file which is in my
local server not in rails's public folder

<% @file_path = "#[email protected]_path}/#{profile.file_path}" %>

<%= link_to image_tag("configure.png",:title => "view profile"),{:action
=> "open_file",:file_path => @file_path},{:target => '_new'} %>

def open_file
#--------------
@backup = ProfileBackup.find(:first)
  unlless @backup.nil? and params[:file_path].nil?
    file_path = params[:file_path]
    if File.exists?("#{file_path}")
      render :file => "#{file_path}", :layout => false
    end
   end
end

this works fine and open the file in the browser.
but still it has not shown the image in the file.
that image also in tat file path .
but it has not shown the image...
any helps
-- 
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 [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.


Reply via email to