similar to: How to open a pdf file in new window

Displaying 20 results from an estimated 900 matches similar to: "How to open a pdf file in new window"

2006 Jan 20
2
Gruff image
Hi I want astackedBar graph in my project I want to give it negetive axis, scale, negetive values etc . How can I do that with gruff package? Thanks.. Sainaba -- Posted via http://www.ruby-forum.com/.
2006 Jan 23
3
Encrypt/ Decrypt password
Hi, I have user add/edit forms.While creating a user I tried the following method to encrypt password and stored the encrypted password in the table. def self.sha1(pass) Digest::SHA1.hexdigest("#{salt}--#{pass}--") end But when I try to edit the page I get the encrypted password in the password field instead of the decrypted password. Is there any method to decrypt
2006 Jan 23
4
Delete row without th eid field
Hi all, I have a table structure with me not having an id column. When I try to delete the row i get an error ''Unknown column "table.id"''. Can i do the action with any other method than destroy/delete? Or with the same method and any other conditions? Thanks. Sainaba. -- Posted via http://www.ruby-forum.com/.
2006 Jan 06
3
Error Handling
Hi, I am doing a project on invoice. For that I have to use a page both for crating new invoices and for updation of existing invoices. The problem is that when an error occures, I can''t maintain the same page for error correction. How can I redirect it from the controller ? Or can I display ruby errors before submit of the page in ruby? Thanks.. Sainaba. -- Posted via
2006 Jan 17
1
How to validate expiry date
Hi How can I do the validation of date expiry (if the date is less than today) in ruby.Can I do it using the validate method or other def in the model class? Thanks in advance, Sainaba. -- Posted via http://www.ruby-forum.com/.
2010 Apr 29
2
send_data => invalid byte sequence in US-ASCII
I''m trying to display a generated .png plot via send_data(), but it results in a server error "invalid byte sequence in US-ASCII" error. I''m pretty sure this means that I need to specify the encoding somewhere, but I haven''t been able to figure out where or how to do so. Some particulars: I''m running gnuplot through a pipe to generate a plot in .png
2008 Feb 07
6
Buffer flushing
Short question: is there way to tell EM to actually send data after send_data call? I''m building a file transferring app. I send Mashal.dump''ed metadata first, and then - the file contents (chunked). I found a silly bug: receive_data() gets marshalled metadata and the first chunk of the file in a single variable. Like that: c1.send_data("meta")
2008 Jan 06
5
Having very odd problems with UDP.
I am using eventmachine 0.8.1 on windows XP and am having very odd problems. This snippet of code gives the error that follows it. class EchoServer def receive_data data puts data send_data ">>>you sent: #{data}" if data =~ /quit/i puts "quitting" close_connection EventMachine::stop_event_loop end end end
2006 Jan 05
13
Date Validation
Hi, How can I validate date in model class Thanks. Sainaba. -- Posted via http://www.ruby-forum.com/.
2005 Mar 08
3
Extracting images from a DB
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I would like to extract an image BLOB from my database and display it alongside some other information on my ''edit'' page. I read the information here http://wiki.rubyonrails.com/rails/show/HowtoUploadFiles and that was really helpful. However, it still isn''t clear to me how I would get access to the image in my views if
2006 Jan 09
6
Rendering dynamic Gruff image (send_data)
Dears, Got a controller witch do a send_data for displaying a chart. like : send_data(g.to_blob, :filename => "any.png", :type => ''image/png'', :disposition=> ''inline'') I actually do a <img src="http://myhost:3000/stats/make_graph" /> Is there any way more clean to do that ? At minima don''t hardcode the beginning
2006 Oct 25
7
Sending a file *and* rendering a page
Anyone know how to send a file/data to the user agent (download it) using #send_file or #send_data, *and* render a new page in the same action? This just sends the file and doesn''t render the page: def gimme ... send_data(our_data, :filename => ''output.csv'', :disposition => ''attachment'') end And this will give a Double-Render error:
2006 Nov 03
6
How to send data,
Hello, First of all I''m new to working with sockets, so the problems I''m having are probably because of my lack of understanding. What I''m trying to accomplish is to create a mac os x client gui to ruby-debug. When a application that includes ruby-debug is started, it starts listening for 2 connections; 8989, 8990 The connection is made by calling the connectToApp
2008 Dec 16
3
Princely Plugin: get nil.size error
Hi All, I want to generate pdf with css. I am using princely plugin. This is code which I written def pdf prince = Prince.new() html_string = render_to_string(:template => ''/users/paid_invoice.pdf.erb'') send_data( prince.pdf_from_string(html_string), :filename => ''some_document.pdf'', :type =>
2006 May 22
2
Problem with send_data and csv file produced
hi, i did a search and couldn''t find wat''s the problem with my code... it seems everything is the same and the result is what i expected but i am not sure where went wrong.... using send_data function to send the csv file to the client, the file sending is successfully but when i opened the csv file, something is wrong... every statement got a "......" inverted
2006 Jul 05
1
send_data image
I''m trying to display an image in a view from MySQL, but I''m not sure where to put the send_data call. Any help would be great. :) -- Posted via http://www.ruby-forum.com/.
2005 Oct 17
4
How to send excel file to browser (spreadsheat 0.3.2)
hey, i want to generate an excel file and send it directly to the browser (without storing it to the harddisk). does anyone has any solution? thanks in advance this is my code: -------------------- def export_excel if @request.env[''HTTP_USER_AGENT''] =~ /msie/i @headers[''Pragma''] = '''' @headers[''Cache-Control''] =
2009 Jan 14
1
setting header in views?
currently iam using FasterCSV to render csv pages format.csv do csv_string = FasterCSV.generate do |csv| # header row csv << @query_result[0].keys @query_result.each do |x| csv << x.values end end #send it to the browser send_data csv_string, :type => ''text/csv;
2009 Nov 08
2
send_data with jpeg not working
I''m a newbie having trouble using send_data to send a jpeg file to the browser for display in an html img tag. This is the relevant code from my controller (photos_controller.rb): def retrieve @photo = Photo.find(params[:id]) send_data File.read(@photo.abs_img_path), :type => "image/ jpeg", :disposition => "inline" end def download @photo =
2009 Mar 14
2
Rails, lighttpd and the Expires header
I have a controller that serves up images from a different location from /public/images/ by using send_file or send_data on /media/thumbs/ 38 for example In lighttpd I have: expire.url = ( "/media/" => "access 10 years", "/stylesheets/" => "access 10 years" , "/javascripts/" => "access 10 years",