Questions Recently Asked by Don Miguel de los Platanos /users/recently_asked/11 Questions Recently Asked by Don Miguel de los Platanos Wed, 07 Jan 2009 14:59:19 -0800 $5.00 - I want to use ActionMailer outside of Rails. Whats the best way of accomplish... http://www.guruza.com/question/421/reward-5.00 I want to use ActionMailer outside of Rails. Whats the best way of accomplishing this? Tue, 03 Oct 2006 09:41:03 -0700 $5.00 - I want to save ruby code inside a database, retrieve it and execute it. Is it... http://www.guruza.com/question/408/reward-5.00 I want to save ruby code inside a database, retrieve it and execute it. Is it possible to execute a string returned by the database as ruby code? Thu, 14 Sep 2006 17:33:54 -0700 $20.00 - *Rails Output Streaming* I am revisiting this again because I am in a situat... http://www.guruza.com/question/358/reward-20.00 *Rails Output Streaming* I am revisiting this again because I am in a situation where I need output streaming. Rails has two methods that utilize streaming (send_data, send_file) I've modified this to meet my needs, along with the help of people on the mailinglist. However the code below which should work, does not provide output streaming. I know in the past output streaming has worked within rails, I am wondering if in a current release it has been broken. Whatever the case is, I need to determine why I cannot get the output streaming mechanism in rails to work. I'm using lighttpd on fc5. I've used mongrel with the same results. class TestController < ApplicationController def index render :text => Proc.new { |resp, out| out.puts 'start' out.flush 10.times do out.puts '.' out.flush sleep 1 end out.puts 'done' } end end Tue, 29 Aug 2006 14:02:10 -0700 $5.00 - Validating Multiple Models The problem is that when I use error_messages_f... http://www.guruza.com/question/321/reward-5.00 Validating Multiple Models The problem is that when I use error_messages_for to display validation errors for two models, only the parent model's validation is displayed and not for the relationships. Example. class Resource < ActiveRecord::Base has_one :setting end class Setting < ActiveRecord::Base belongs_to :resource end If I do: @resource = Resource.new @resource.settings = Settings.new @resource.save! Only Resource's validation shows up and not Setting's. Is there anyway that I can validate the relationships of a model? *ANSWER* "if model1.valid? and model2.valid? and model3.valid? save model data" Wed, 16 Aug 2006 11:14:30 -0700 $4.00 - Is there a rails equivalence to out.flush() in java? I have an activerecord r... http://www.guruza.com/question/301/reward-4.00 Is there a rails equivalence to out.flush() in java? I have an activerecord resultset that is quite large. However I don't want to wait till the query is done to display all of the results. I would like to display the results as they come in. I need someway to flush the outputstream so that it constantly writes the results to the browser. Is this possible? Tue, 08 Aug 2006 08:21:48 -0700 $5.00 - Problems with Asynchronous Ajax requests. I have an onload() function that ca... http://www.guruza.com/question/281/reward-5.00 Problems with Asynchronous Ajax requests. I have an onload() function that calls a simple javascript method that just executes multiple ajax requests. function search() { new Ajax.Request('/main/search/1', {asynchronous:true, evalScripts:true}); new Ajax.Request('/main/search/2', {asynchronous:true, evalScripts:true}); new Ajax.Request('/main/search/3', {asynchronous:true, evalScripts:true}); new Ajax.Request('/main/search/4', {asynchronous:true, evalScripts:true}); } The problem is that when say the first request hangs, the other request pause and wait till the first request is finish. I was under the impression that the other requests would be fulfilled regardless since each request is a new request to the server. I need to be able to have a request sit and not affect the other request. I am using webbrick right now in development mode as my webserver. What am I doing wrong? **UPDATE** The HTTP/1.1 spec does not provide any guidelines on the ideal number of requests to pipeline. It does, however, suggest a limit of no more than 2 keep-alive connections per server. Thu, 27 Jul 2006 18:21:08 -0700 $10.00 - I have a rails app that runs an nmap scan on a host and reports the response ... http://www.guruza.com/question/279/reward-10.00 I have a rails app that runs an nmap scan on a host and reports the response via ajax. I use backtick to run nmap via my controller. What I've noticed is that if the nmap scan takes a while (say about 2 minutes), rails will block all request until the shell command finishes executing. My question is if there is a more effecient way to run shell commands via rails? Will I have to thread the nmap scan so the rails controller doesn't block until it receives a response? Thu, 27 Jul 2006 12:04:06 -0700 $5.00 - How can I do an OnClick call using AJAX and Ruby on Rails? I have an applicat... http://www.guruza.com/question/250/reward-5.00 How can I do an OnClick call using AJAX and Ruby on Rails? I have an application that allows you to ping an ip address by clicking on a link called 'ping'. When you click on it, the ping results get set inside a div tag. This works just as intended, however I would like the ping link to become unclickable and for the text to be changed to 'Pinging'. The problem is when I do the ajax call, the link gets updated at the same time as the div does. My intention is to prevent users from clicking on the link more then once, so by updating the link they can see that an operation is occuring in the background. In my mind I envision that the onclick would update the text of the link and commit the ajax call that would update the results div, does this sound right at all? Wed, 19 Jul 2006 05:48:51 -0700 $5.00 - What support does ruby have for internationalization? I have heard that ruby ... http://www.guruza.com/question/167/reward-5.00 What support does ruby have for internationalization? I have heard that ruby on rails doesn't support a large amount of character sets. I am in the midst of rolling out a international application and need to ofcourse make sure that rails can support every character set possible. Some I need initially are UTF8, Big 5, Shift JIS. Can rails handle this? Fri, 30 Jun 2006 07:19:54 -0700 $1.00 - Whats the proper way to render partials, with :collection or :locals? http://www.guruza.com/question/148/reward-1.00 Whats the proper way to render partials, with :collection or :locals? Thu, 29 Jun 2006 20:10:58 -0700 $1.00 - I get this error when using a partial undefined method `each_with_index' http://www.guruza.com/question/147/reward-1.00 I get this error when using a partial undefined method `each_with_index' Thu, 29 Jun 2006 20:03:03 -0700 $5.00 - Whats the best way of handling invalid records when using Rails find method? http://www.guruza.com/question/143/reward-5.00 Whats the best way of handling invalid records when using Rails find method? Thu, 29 Jun 2006 19:00:02 -0700 $5.00 - How do I setup authentication with Webrick? http://www.guruza.com/question/114/reward-5.00 How do I setup authentication with Webrick? Sun, 25 Jun 2006 12:46:59 -0700 $1.00 - How do I get the controllers current action name attrible and display it in m... http://www.guruza.com/question/108/reward-1.00 How do I get the controllers current action name attrible and display it in my view? Thu, 15 Jun 2006 14:35:51 -0700 $15.00 - Is there a way to implement has_one, belongs_to relationships in scaffold? http://www.guruza.com/question/107/reward-15.00 Is there a way to implement has_one, belongs_to relationships in scaffold? Thu, 15 Jun 2006 07:26:38 -0700 $10.00 - Can I use Ajax to request a controller/script multiple times and simulate mul... http://www.guruza.com/question/93/reward-10.00 Can I use Ajax to request a controller/script multiple times and simulate multiple threads? Fri, 09 Jun 2006 13:42:18 -0700 $10.00 - How can I mount a remote drive without using samba or NFS? Can I use sftp/scp... http://www.guruza.com/question/52/reward-10.00 How can I mount a remote drive without using samba or NFS? Can I use sftp/scp to mount a drive locally? Tue, 23 May 2006 07:59:47 -0700 $100,000.00 - Why as a hispanic am I being discriminated on guruza? How about you answer a ... http://www.guruza.com/question/51/reward-100000.00 Why as a hispanic am I being discriminated on guruza? How about you answer a beaners questions... :P Tue, 23 May 2006 07:58:15 -0700 $10.00 - Whats the best open source content management system and why? http://www.guruza.com/question/42/reward-10.00 Whats the best open source content management system and why? Thu, 18 May 2006 19:14:08 -0700 $10.00 - No sound in Mozilla Linux when playing Flash movies. Sound works everywhere e... http://www.guruza.com/question/26/reward-10.00 No sound in Mozilla Linux when playing Flash movies. Sound works everywhere else except within flash. Flash video plays normal, just no sound. Wed, 17 May 2006 23:38:38 -0700 $100.00 - Test Question http://www.guruza.com/question/13/reward-100.00 Test Question Tue, 16 May 2006 18:01:19 -0700