similar to: derirect web page to file

Displaying 20 results from an estimated 1000 matches similar to: "derirect web page to file"

2006 Jun 14
2
Simple FileUtils question
Hi, I have a quick question. I am trying to create folders dinamically using FileUtils.mkdir, the problem is that if the folder already exist it gives me an error. Does anyone know if there are any options to mkdir that would let me overwrite the already existing directory? I just need to create a folder with the same name everytime. Any other solution you might suggest? Thanks. -- Posted
2008 Feb 19
3
render_to_string in a controller test?
Hi all, I know that in general, view and controller tests should be isolated, such that controller specs don''t test views etc. However, I think I''ve run into a situation that might be an exception. My controller uses render_to_string to produce a chunk of HTML that it passes to a model to be processed. The controller then redirects the user to a different page. The
2007 Apr 19
4
render_to_string in a model ?
I have a batch job that will call script/runner, I would like in this call to create html formated email and save it to the database. This is easy enough in a controller with yournewhost.email = render_to_string :action => "email_newhost_ready", :layout => false But render_to_string is only available in controller action pack, is there a easy way to render_to_string in a Model? Or
2005 Oct 27
2
Ajax.Updater to replace element, not the content
Is there something equivalent to Ajax.Updater to replace the element, intead of replacing it''s content ? An option to Updater, or another function ?
2002 Oct 01
1
Default policy question
Hi list, I have a local dns cache listening on my shorewall''s locahost, i dont want to allow others hosts in my network to access my local cache, so, i have the following question: what''s the feault policy for fw -> fw access?, do i need a rule to ACCEPT from fw to fw tcp port 53 ? or i need to put localhost to localhost intead of fw to fw ? Thanks in advance, Miguel
2018 May 21
1
[PATCH 21/33] drm/nouveau: use match_string() helper
match_string() returns the index of an array for a matching string, which can be used intead of open coded variant. Cc: Ben Skeggs <bskeggs at redhat.com> Cc: David Airlie <airlied at linux.ie> Cc: dri-devel at lists.freedesktop.org Cc: nouveau at lists.freedesktop.org Signed-off-by: Yisheng Xie <xieyisheng1 at huawei.com> --- drivers/gpu/drm/nouveau/dispnv04/tvnv17.c | 13
2017 Apr 02
1
Getting error on port 995
Bhushan Bhosale writes: > I'm getting issue with port 995 by using Microsoft Outlook 2016 only. > The error on Microsoft Outlook showing "Your server does not support > the connection encryption type. Try changing the encryption method". > The error is only who is using Microsoft outlook2016. Kindly help. Help us help you. Please include output of "dovecot
2004 Mar 25
1
Samba 3, winbind, win2k AD: Kerberos question
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi folks, after a little head banging, I got winbind chatting with the domain control ( win2k server ) by hard coding my realm info into krb5.conf. My question is this: Is there a cleaner, more fault tolerant method than this? I googled, and read about dns srv records being used ( intead of hardcoding ), which I understand win2k uses to begin with,
2002 Apr 08
1
factor labels in model.frame
Hello, model.frame changes the factor labels when na.action = na.omit. > f <- gl(3, 2, 6, paste('m', 1:3, sep = '')) > r <- c(NA, NA, 3:6) > mf <- model.frame(~ r + f, na.action = na.omit) > mf r f 3 3 m1 4 4 m1 5 5 m2 6 6 m2 But it seems like it should be this > mf r f 3 3 m2 4 4 m2 5 5 m3 6 6 m3 intead. How do I get the second mf? Thanks a lot,
2007 Nov 30
5
render_to_string in an after filter
I''m using render_to_string in an after_filter, which renders a partial that is sent to a web service. Here''s the code: class MyController < ApplicationController after_filter :post_to_webservice def show # show logic end def post_to_webservice stuff = render_to_string :partial => ''stuff'' webservice_post(stuff) end I get a DoubleRenderError in the
2006 Mar 10
3
Searching database using foriegn keys
I''ve read a lot about the ORM magic of Active Record which allows you to address a foriegn key object directly... e.g. I have a books and people table where books has a column called person_id If I get myself a Book object called mybook I get to the person object associated with this book by saying book.person which is awesome and I love it. My question, how can I say "Go
2006 May 26
8
calling render_to_string outside of controller
How can I call render_to_string outside of a controller. I''m stuck on this. I''ve nearly got my plugin finished but I can''t seem to get this to work. The method is in ActionController::Base but it is protected. -- Posted via http://www.ruby-forum.com/.
2007 Nov 25
2
Fwd: Render_to_string from a worker
Hi, I am trying to generate a PDF from within a worker using PDF::Writer. In my controller I use render_to_string to create the pdf file however from what I understand render_to_string can only be used from a controller. Does anybody have any suggestions how I might be able to replicate this functionality in a worker? -- thanks, Felix -------------- next part -------------- An HTML attachment
2012 May 28
1
rendering a partial inside another using render_to_string and (:formats) in controller
I want to clean my code by moving the duplicated lines : partial = render_to_string( :partial => "#{file}", :formats => [:html] ) to the pagination_partials function. ================================================= WORKING CODE: ================================================= def render_format_search_partial(file, options={}) # TODO remove this line to use the one
2014 Sep 30
4
[PATCH 1/2] appliance: Use dhclient instead of hard-coding IP address of appliance.
qemu in SLIRP mode offers DHCP services to the appliance. We don't use them, but use a fixed IP address intead. This changes the appliance to get its IP address using DHCP. Note: This is only used when the network is enabled. dhclient is somewhat slower, but the penalty (a few seconds) is only paid for network users. We could consider using the faster systemd dhcp client instead. ---
2006 Jul 11
1
Aggregate Controllers
Hi, I''m developing a dashboard like page and basically want to combine the result of multiple actions on a page. I''ve done this so far: def index r1 = render_to_string :action => "action1" r2 = render_to_string :action => "action2" render :text => r1+r2 end This works, but now I want to render from other controllers and this is where
2010 Mar 17
3
rails+prawnto: setting :type to :prawn in a #render_to_string call not working
Hello, my question is rails related though it is also somewhat specific to the prawnto plugin (installed latest version as of 2010-03-15). I would ask on a prawnto forum/list if I knew where one was. Anyhow, I''m using rails 2.3.5 (with ruby 1.8.6 patchlevel 111) in an app that is successfully using the prawnto gem (with the prawn gem version 0.7.1). I''ve got a a
2006 Feb 20
3
Background work
Greetings, I''ve got a rails app which is basically an admin interface to a xml dataset. Currently I''ve got rails rigged to call a function to spit the entire dataset to file with every change. This would actually be ok, its fairly infrequently updated, but when the dataset grows large the user sits there waiting for it to dump with no feedback as to whats going on. Oh yes,
2011 Mar 06
2
render_views and render_to_string
Hey guys. One of my controller actions uses #render_to_string to send back a JSON response. When I try to spec this, Ruby raises a NoMethodError, saying that #render_to_string doesn''t exist in my controller action. Here''s the controller action, spec, and output: http://pastie.org/1640962 Any idea what I''m doing wrong? Thanks, Nick -------------- next part
2013 Nov 14
2
[PATCH] virtio-net: mergeable buffer size should include virtio-net header
Commit 2613af0ed18a ("virtio_net: migrate mergeable rx buffers to page frag allocators") changed the mergeable receive buffer size from PAGE_SIZE to MTU-size. However, the merge buffer size does not take into account the size of the virtio-net header. Consequently, packets that are MTU-size will take two buffers intead of one (to store the virtio-net header), substantially decreasing the