Displaying 17 results from an estimated 17 matches for "ddjolley".
2011 Apr 15
2
ActionMailer - Setting Header Values - Version Issues
When I first started using Rails, actionmailer set email header values
by assigning values to instance variables within a model method.
There were some specific instance variables such as ''subject'', ''from'',
etc. Header values for which there was no specific instance variable
assigned could be set using the @headers hash. This hash could be
used to set the
2007 Jun 28
4
Apache: mod_balancer vs. mod_proxy_balancer
I''m trying to setup a mongrel cluster. I''m relying on information
collected from a number of sources but I''m relying heavily on
http://mongrel.rubyforge.org/docs/apache.html.
I have noted that a number of sources mention the necessity of having
the mod_balancer module installed in Apache. However, my primary
source makes no mention of this; but instead, mentions only
2009 Sep 14
5
Expecting field value and getting record
The following short console session illustrates the problem:
Loading development environment (Rails 2.3.2)
>> topic=BlogTopic.find(4)
=> #<BlogTopic id: 4, parent: 2, topic: "Topic Four", created_at:
"2009-07-13 21:31:22", updated_at: "2009-09-14 00:37:29">
>> topic.inspect
=> "#<BlogTopic id: 4, parent: 2, topic: \"Topic
2010 Apr 10
5
Rendering a Partial as an Alternative
Suppose that I want to have a block of default content within a
template that is replaced with the content of a specific partial only
if that partial exists. Obviously there is the brute force approach
of simply rendering the default content unless the relevant partial
file exists in which case the relevant partial is rendered instead. I
suspect that there may be a more elegant way to skin this
2007 Mar 26
0
Setting up Action Mailer
I''m trying out Action Mailer for the first time. I''m not getting to
first base. I thought that the instructions were pretty clear in that
the first thing that I needed to do is to add:
config.action_mailer.delivery_method = :smtp | :sendmail | :test
to config/environment.rb (assuming that I want to use the same
configuration for development, testing, and production).
So, I
2007 Aug 27
0
layout not seen by some clustered mongrel instances
Hi --
I have setup a fairly simple Rails site. It uses a layout and 4
clustered instances of Mongrel running on ports 8001 through 8004.
The instance of Mongrel running on port 8001 seems to work perfectly.
For some reason, the other 3 instances Mongrel are behaving as though
they don''t see the layout. Does anyone know why that is; and, more
importantly, what to do about it? Thanks.
2007 Aug 29
0
No-protocol-handler-was-valid error
I am running a Mongrel cluster with an Apache front-end. I am loading
the following modules in the httpd.conf file:
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
2007 Nov 11
0
File.chown
I have written a helper to upload a file using the http protocol.
It''s only two lines long; and, for the most part, it works just fine.
However, when the uploaded file is written, it has root as the owner
and group. I would really like it to have a different owner and
group. It would seem that that would be almost trivial. Since the
uploaded file is written with root as the owner and
2009 Nov 06
2
mini_magick - 2 clarifications
1. I have seen examples similar to the following:
image = MiniMagick::Image.from_file("input.jpg")
image.resize "100x100"
image.write("output.jpg")
I''m assuming that image.resize is a method. Is there any significance
to the fact that the argument for that method is not enclosed in
parenthesis while the other are? Examples seem to be consistent --
2010 Jun 13
1
Using XmlSimple to parse XML strings
I am using XmlSimple to parse an XML string received from a remote
host. I am getting the error message, "File does not exist: .". I am
fairly well convinced that the problem is that XmlSimple is not
recognizing the received XML string as being valid XML and is
therefore looking for a file by that name (which, of course, does not
exist). The XmlSimple documentation says that it
2010 Jun 14
0
Sockets are Killing Me!
I''ve been trying to interface to the onlineNIC API which uses
sockets. The following 4 lines of test code illustrate my problem:
socket=TCPSocket::new(''ip'',''port'')
puts("Connect:\n"+socket.read()+"\n\n")
socket.print(login_request)
puts("Login:\n"+socket.read()+"\n\n")
In the actual code the real IP address and
2010 Jan 24
2
OrderedHash Rails 2.3.2
I understand that
ActiveSupport::OrderedHash.new [[1,2]]
does not work beginning with Rails 2.3. I am running Rails 2.3.2.
One commentator suggested simply creating the instance without
arguments and then sequentially adding each element as a separate
step. I tried that. The hash gets populated just fine but it is not
ordered. Can anyone please tell me what the magic trick is under
2007 Mar 29
2
rmagick - Incorporating dynamic images
Hi --
I have imagemagick and rmagick installed so that I can produce images
from code to a file. Can anyone direct me to where I can find
guidance on how to have those images included on a web page (e.g.,
<img src="my_dynamically_generated_image") instead of having them sent
to a file? Thanks for any input.
... doug
--~--~---------~--~----~------------~-------~--~----~
You
2009 Apr 24
4
Overriding Model Name
If I understand things correctly, by default, Rails expects both the
ActiveRecord class name and the model name (i.e., the name of the file
that contains the definition of the ActiveRecord class) to be the
singluar of the table name. How can I override this default behavior
with respect to the model name? That is, I would like to have the
file name of the file that contains the definition of the
2008 Jun 08
4
Location of ancillary files
Let''s say, for example, that I want to create an order form and that I
want to assign an order number to each submitted order form for
tracking purposes. So, I create a little file to store the latest
number. Then when a new order comes in, I grab that number, increment
it by one, assign the incremented number to the order, and finally
replace the number that''s in the file with
2008 Jul 08
6
Data type of input type file
If I have a form that includes something like:
<input type="file" name="file_content" />
and I try to get at the file content using:
params[''file_content''].read
I get:
undefined method `read'' for "filename":String
where "filename" is the *NAME* of the file that was assigned to
"file_content" in the input tag.
2008 Jun 04
8
Accessing Params Hash form Action Mailer Model
I have used Action Mailer to collect data from a form and send it to a
recipient. Rather than hard-code things like the subject, recipients,
and return address into the model, I would like to include that
information in hidden fields in my form thereby causing that
information to be included in the params hash. My question is: How
can I access that information from the params hash in the model?