search for: ddjol

Displaying 6 results from an estimated 6 matches for "ddjol".

Did you mean: ddjo
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
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
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
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 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