# Rails

**URL:** https://www.ruby-forum.com/c/ruby-on-rails/6.md?page=1485

[Latest](https://www.ruby-forum.com/latest.md) · [Categories](https://www.ruby-forum.com/categories.md) · [Tags](https://www.ruby-forum.com/tags.md)

**Page:** 1486

---

## [Display content in layout only in production mode?](https://www.ruby-forum.com/t/display-content-in-layout-only-in-production-mode/129373)

<div class="topic-metadata">

**Author:** [@kevin\_evans](https://www.ruby-forum.com/u/kevin_evans)\
**Replies:** 1\
**Last updated:** [February 17, 2008, 10:40pm UTC](https://www.ruby-forum.com/t/display-content-in-layout-only-in-production-mode/129373 "2008-02-17T22:40:13Z")

</div>

Anyone have some tips on the best way to do this? I want to conditionally include some javascript only if the app is running in production mode…

---

## [\[ANN\] Katipo Communications in Wellington, New Zealand, Hiring Junior Rails Developer](https://www.ruby-forum.com/t/ann-katipo-communications-in-wellington-new-zealand-hiring-junior-rails-developer/129378)

<div class="topic-metadata">

**Author:** [@Walter\_McGinnis](https://www.ruby-forum.com/u/Walter_McGinnis)\
**Replies:** 0\
**Last updated:** [February 17, 2008, 10:32pm UTC](https://www.ruby-forum.com/t/ann-katipo-communications-in-wellington-new-zealand-hiring-junior-rails-developer/129378 "2008-02-17T22:32:33Z")

</div>

Hello everyone, We’re looking for a programmer to join our Kete team working with Ruby on Rails. The Kete project is really taking off, so we’d like to expand the team by adding a person who is a quick study, wants t…

---

## [A view of two models](https://www.ruby-forum.com/t/a-view-of-two-models/128577)

<div class="topic-metadata">

**Author:** [@Thufir](https://www.ruby-forum.com/u/Thufir)\
**Replies:** 5\
**Last updated:** [February 17, 2008, 10:32pm UTC](https://www.ruby-forum.com/t/a-view-of-two-models/128577 "2008-02-17T22:32:32Z")

</div>

I have two models which are related by a foreign key. I would like to have a report along the lines of: call\_comment login first 1234 so that it prints fields calls.comment and logins.login where calls.login\_id=…

---

## [Complex SQL sort on single attribute](https://www.ruby-forum.com/t/complex-sql-sort-on-single-attribute/129342)

<div class="topic-metadata">

**Author:** [@goodcoffee](https://www.ruby-forum.com/u/goodcoffee)\
**Replies:** 13\
**Last updated:** [February 17, 2008, 10:22pm UTC](https://www.ruby-forum.com/t/complex-sql-sort-on-single-attribute/129342 "2008-02-17T22:22:57Z")

</div>

I have a list of dates that currently looks like this: 2/3/08 2/5/08 How can I modify to list the closest upcoming date first and list subsequent dates in chronological order thereafter, and finally list all o…

---

## [Testing Cookies in Rails](https://www.ruby-forum.com/t/testing-cookies-in-rails/129376)

<div class="topic-metadata">

**Author:** [@ruby\_newbie1](https://www.ruby-forum.com/u/ruby_newbie1)\
**Replies:** 0\
**Last updated:** [February 17, 2008, 10:19pm UTC](https://www.ruby-forum.com/t/testing-cookies-in-rails/129376 "2008-02-17T22:19:26Z")

</div>

Hello, I created a controller and within the controller I have two separate functions that involve the cookie that I implemented: def login cookies\[:login\] = 1 end def logout if cookies\[:login\] cookies.delete :lo…

---

## [Aws-s3 and 10.5.2](https://www.ruby-forum.com/t/aws-s3-and-10-5-2/129375)

<div class="topic-metadata">

**Author:** [@Matt\_Vincent](https://www.ruby-forum.com/u/Matt_Vincent)\
**Replies:** 0\
**Last updated:** [February 17, 2008, 10:19pm UTC](https://www.ruby-forum.com/t/aws-s3-and-10-5-2/129375 "2008-02-17T22:19:26Z")

</div>

I’m running the default ruby installation that comes with Leopard and I updated to 10.5.2 on Friday. With this update came an error with aws-s3 As autotest is running through my project (Which is using attachment\_fu…

---

## [Error "undefined method is\_haml?" (custom form builder)](https://www.ruby-forum.com/t/error-undefined-method-is-haml-custom-form-builder/129370)

<div class="topic-metadata">

**Author:** [@josh](https://www.ruby-forum.com/u/josh)\
**Replies:** 0\
**Last updated:** [February 17, 2008, 9:01pm UTC](https://www.ruby-forum.com/t/error-undefined-method-is-haml-custom-form-builder/129370 "2008-02-17T21:01:49Z")

</div>

Hi all I’m experimenting with HAML. Sadly I’m getting an error on a page that doesn’t have anything to do with HAML (it’s a normal rhtml template)! undefined method \`is\_haml?’ for #IncenseFormBuilder:0x31b0e88 It’s a…

---

## [Ugly, garbled output from autotest](https://www.ruby-forum.com/t/ugly-garbled-output-from-autotest/129267)

<div class="topic-metadata">

**Author:** [@idahoev](https://www.ruby-forum.com/u/idahoev)\
**Replies:** 3\
**Last updated:** [February 17, 2008, 7:22pm UTC](https://www.ruby-forum.com/t/ugly-garbled-output-from-autotest/129267 "2008-02-17T19:22:15Z")

</div>

I am getting this horribly ugly output from autotest when a test fails. Normal output from ‘rake test’: Failure: test\_export\_format(TaskTest) \[./test/unit/task\_test.rb:61\]: \<“Michael Alvarez”\> expected but was . – …

---

## [\[Ferret\] - more like this usage?](https://www.ruby-forum.com/t/ferret-more-like-this-usage/129365)

<div class="topic-metadata">

**Author:** [@Gerlando](https://www.ruby-forum.com/u/Gerlando)\
**Replies:** 0\
**Last updated:** [February 17, 2008, 6:50pm UTC](https://www.ruby-forum.com/t/ferret-more-like-this-usage/129365 "2008-02-17T18:50:46Z")

</div>

I’m trying to implement more\_like\_this but no matter what field\_names I set, the results always come back the same and they’re VERY inaccurate. Could someone post their implementation for reference?

---

## [Gibberish and attachment\_fu](https://www.ruby-forum.com/t/gibberish-and-attachment-fu/129356)

<div class="topic-metadata">

**Author:** [@foxbunny](https://www.ruby-forum.com/u/foxbunny)\
**Replies:** 1\
**Last updated:** [February 17, 2008, 5:46pm UTC](https://www.ruby-forum.com/t/gibberish-and-attachment-fu/129356 "2008-02-17T17:46:07Z")

</div>

Hi, I’m trying to code something that requires UI translation. I picked up Gibberish plugin, which (unfortunately) expands the String class in order to implement it’s magic. That seems to conflict with attachment\_fu.…

---

## [Image access control](https://www.ruby-forum.com/t/image-access-control/129359)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [February 17, 2008, 3:57pm UTC](https://www.ruby-forum.com/t/image-access-control/129359 "2008-02-17T15:57:13Z")

</div>

Hi all, My app allows users to upload images, but access to the images needs to be controlled. For this reason, I’m not storing the images in the / public dir, I’m storing them elsewhere. What I need as an action that …

---

## [Installing plugins](https://www.ruby-forum.com/t/installing-plugins/129355)

<div class="topic-metadata">

**Author:** [@eyp](https://www.ruby-forum.com/u/eyp)\
**Replies:** 3\
**Last updated:** [February 17, 2008, 1:49pm UTC](https://www.ruby-forum.com/t/installing-plugins/129355 "2008-02-17T13:49:56Z")

</div>

Hello, which is the difference of installing a plugin using script/ plugin install, and installing it using svn export?

---

## [Pass two values when checkbox is checked](https://www.ruby-forum.com/t/pass-two-values-when-checkbox-is-checked/129300)

<div class="topic-metadata">

**Author:** [@warlock\_handler](https://www.ruby-forum.com/u/warlock_handler)\
**Replies:** 2\
**Last updated:** [February 17, 2008, 12:32pm UTC](https://www.ruby-forum.com/t/pass-two-values-when-checkbox-is-checked/129300 "2008-02-17T12:32:12Z")

</div>

Hi I want to pass two set of values when a particular check box is checked for eg. If I have name and email address. how should I write the view code if in my controller I want the name and email address accessible …

---

## [Attachment\_fu doesn't generate thumbnails on windows](https://www.ruby-forum.com/t/attachment-fu-doesnt-generate-thumbnails-on-windows/121914)

<div class="topic-metadata">

**Author:** [@shaunp](https://www.ruby-forum.com/u/shaunp)\
**Replies:** 1\
**Last updated:** [February 17, 2008, 6:18am UTC](https://www.ruby-forum.com/t/attachment-fu-doesnt-generate-thumbnails-on-windows/121914 "2008-02-17T06:18:28Z")

</div>

Hi, I’m having trouble with attachment\_fu on windows not generating any thumbnails on the fly. I started out trying to incorporate this into my app without success then tried implementing Mike C.e’s tutorial (http://…

---

## [Simple image\_tag getting an erroneous parameter added to output](https://www.ruby-forum.com/t/simple-image-tag-getting-an-erroneous-parameter-added-to-output/129334)

<div class="topic-metadata">

**Author:** [@Wesley\_Embry](https://www.ruby-forum.com/u/Wesley_Embry)\
**Replies:** 3\
**Last updated:** [February 17, 2008, 5:23am UTC](https://www.ruby-forum.com/t/simple-image-tag-getting-an-erroneous-parameter-added-to-output/129334 "2008-02-17T05:23:57Z")

</div>

I have been everywhere I can think to find an answer to this problem. One of my web pages has a simple image\_tag entry in a very straight-forward table. The value of this field is bordeaux\_noveaux.jpg. but the resu…

---

## [Need RoR, JS, SOAP dev ASAP - for Sat, 16th and Sun, 17th](https://www.ruby-forum.com/t/need-ror-js-soap-dev-asap-for-sat-16th-and-sun-17th/129340)

<div class="topic-metadata">

**Author:** [@TometaMan](https://www.ruby-forum.com/u/TometaMan)\
**Replies:** 0\
**Last updated:** [February 17, 2008, 3:21am UTC](https://www.ruby-forum.com/t/need-ror-js-soap-dev-asap-for-sat-16th-and-sun-17th/129340 "2008-02-17T03:21:21Z")

</div>

If you have the ability and time this weekend to do a quick fix to a RoR project already in process, please email removed\_email\_address@domain.invalid ASAP. We are a legit, long term US company. removed\_email\_address@…

---

## [Image\_tag](https://www.ruby-forum.com/t/image-tag/129152)

<div class="topic-metadata">

**Author:** [@snoop1990](https://www.ruby-forum.com/u/snoop1990)\
**Replies:** 6\
**Last updated:** [February 17, 2008, 1:11am UTC](https://www.ruby-forum.com/t/image-tag/129152 "2008-02-17T01:11:51Z")

</div>

I have an table with a background image but I do not know how to load the image. In general I use a code line like “ ” but this do not work, because the directory changes, for example if I open a sub page of my cont…

---

## [Wrong number of arguments to find\_by\_sql?](https://www.ruby-forum.com/t/wrong-number-of-arguments-to-find-by-sql/129245)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [February 16, 2008, 11:32pm UTC](https://www.ruby-forum.com/t/wrong-number-of-arguments-to-find-by-sql/129245 "2008-02-16T23:32:05Z")

</div>

Hi, I’m trying to run a query that returns columns from different tables and that joins a couple of tables. Here it is @result = EcOrder.find\_by\_sql\["select u1.ship\_to\_first\_name, u1.ship\_to\_last\_name, u…

---

## [Discussion on Frequently Asked Questions](https://www.ruby-forum.com/t/discussion-on-frequently-asked-questions/129142)

<div class="topic-metadata">

**Author:** [@Ben\_Munoz](https://www.ruby-forum.com/u/Ben_Munoz)\
**Replies:** 3\
**Last updated:** [February 16, 2008, 10:12pm UTC](https://www.ruby-forum.com/t/discussion-on-frequently-asked-questions/129142 "2008-02-16T22:12:34Z")

</div>

NetBeans for Ruby is solid. Great basic editor with great Ruby on Rails integration. Of those at a recent Ruby on Rails user group meeting, 2/3 or those not on TextMate used NetBeans over RadRails. http://www.netbea…

---

## [Validating that a user-agreement checkbox has been checked](https://www.ruby-forum.com/t/validating-that-a-user-agreement-checkbox-has-been-checked/129276)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 4\
**Last updated:** [February 16, 2008, 9:17pm UTC](https://www.ruby-forum.com/t/validating-that-a-user-agreement-checkbox-has-been-checked/129276 "2008-02-16T21:17:08Z")

</div>

Hi, I have a checkbox that a user must check before they register on my site. It is to accept the terms of use. My question is, what validation code do I need to add to my user model so that the record can’t be sa…

---

## [New method initializing a property](https://www.ruby-forum.com/t/new-method-initializing-a-property/129259)

<div class="topic-metadata">

**Author:** [@grayson](https://www.ruby-forum.com/u/grayson)\
**Replies:** 3\
**Last updated:** [February 16, 2008, 6:55pm UTC](https://www.ruby-forum.com/t/new-method-initializing-a-property/129259 "2008-02-16T18:55:17Z")

</div>

Hello, Something really simple doesn’t seem to be happening for me. I have a class called User, I’d like to set a property called “role” at the time the new form is called. In users\_controller I have the following d…

---

## [Content\_columns returns nothing](https://www.ruby-forum.com/t/content-columns-returns-nothing/129256)

<div class="topic-metadata">

**Author:** [@nahabed](https://www.ruby-forum.com/u/nahabed)\
**Replies:** 2\
**Last updated:** [February 16, 2008, 6:52pm UTC](https://www.ruby-forum.com/t/content-columns-returns-nothing/129256 "2008-02-16T18:52:20Z")

</div>

I have a model “wanted\_offers” that’s defined as a “belongs\_to” with another model. All that wanted\_offers has is two foreign keys in two columns. I’ve implemented a show method and passing in the id of the wanted\_of…

---

## [Is 'position' a magical field?](https://www.ruby-forum.com/t/is-position-a-magical-field/129316)

<div class="topic-metadata">

**Author:** [@rubynuby](https://www.ruby-forum.com/u/rubynuby)\
**Replies:** 2\
**Last updated:** [February 16, 2008, 6:04pm UTC](https://www.ruby-forum.com/t/is-position-a-magical-field/129316 "2008-02-16T18:04:34Z")

</div>

I’m looking at the typo (blog software) source. The categeries table has a position field which holds the order that the categories should appear on the blog. The field appears automagically populated when creating …

---

## [Calling One Model From Another Model](https://www.ruby-forum.com/t/calling-one-model-from-another-model/129288)

<div class="topic-metadata">

**Author:** [@johnk](https://www.ruby-forum.com/u/johnk)\
**Replies:** 1\
**Last updated:** [February 16, 2008, 5:19pm UTC](https://www.ruby-forum.com/t/calling-one-model-from-another-model/129288 "2008-02-16T17:19:52Z")

</div>

I use dependent destroy all the time but in this one case it is not enough. In my side model I want to be able to delete both the conversation and the “other side” of the conversation… problem is I am getting the fo…

---

## [Ð˜Ð½Ñ‚ÐµÑ€Ð½ÐµÑ‚-Ð¼Ð°Ð³Ð°Ð·Ð¸Ð½ http://shopbody.r u/](https://www.ruby-forum.com/t/d-d-n-d-n-d-d-n-d-d-d-d-d-d-d-http-shopbody-r-u/129298)

<div class="topic-metadata">

**Author:** [@ShopBody.ru](https://www.ruby-forum.com/u/ShopBody.ru)\
**Replies:** 0\
**Last updated:** [February 16, 2008, 11:21am UTC](https://www.ruby-forum.com/t/d-d-n-d-n-d-d-n-d-d-d-d-d-d-d-http-shopbody-r-u/129298 "2008-02-16T11:21:24Z")

</div>

éÎÔÅÒÎÅÔ-ÍÁÇÁÚÉÎ ÔÏ×ÁÒÏ× ÄÌÑ ËÒÁÓÏÔÙ É ÚÄÏÒÏ×ØÑ Shop Body! íÉÒÏ×ÙÅ ÂÒÅÎÄÙ. ðÒÏÆÅÓÓÉÏÎÁÌØÎÁÑ ËÏÎÓÕÌØÔÁÃÉÑ. íÏÍÅÎÔÁÌØÎÁÑ ÄÏÓÔÁ×ËÁ. ôÏ×ÁÒÙ ÐÏÞÔÏÊ. ûÉÒÏËÉÊ ÁÓÓÏÒÔÉÍÅÎÔ. ÷ÙÓÏËÏÅ ËÁÞÅÓÔ×Ï, ÄÏÓÔÁ×ËÁ ÐÏÞÔÏÊ ÎÁÌÏÖÅÎÎÙÍ ÐÌÁÔÅÖÏ…

---

## [ORACLE DESC "table\_name" Failure](https://www.ruby-forum.com/t/oracle-desc-table-name-failure/89658)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 6\
**Last updated:** [February 16, 2008, 10:37am UTC](https://www.ruby-forum.com/t/oracle-desc-table-name-failure/89658 "2008-02-16T10:37:57Z")

</div>

I am getting “DESC CYCLEMSTR” failed; does it exist? errors on a table named CYCLEMSTR in Oracle every 3 out of 4 trys to do a simple find(:all) on the table. It is a legacy table that only contains 12 rows of join …

---

## [Noob Q: How to access a belongs\_to object](https://www.ruby-forum.com/t/noob-q-how-to-access-a-belongs-to-object/129263)

<div class="topic-metadata">

**Author:** [@studlee2](https://www.ruby-forum.com/u/studlee2)\
**Replies:** 2\
**Last updated:** [February 16, 2008, 8:59am UTC](https://www.ruby-forum.com/t/noob-q-how-to-access-a-belongs-to-object/129263 "2008-02-16T08:59:17Z")

</div>

Sorry for the simplicity on this. I hope this makes for a quick response. I have two classes: class UserProfile \< ActiveRecord::Base belongs\_to :UserGroup end class UserGroup \< ActiveRecord::Base has\_m…

---

## [Funky cache path name is generated for rss( feed.rss.rss )](https://www.ruby-forum.com/t/funky-cache-path-name-is-generated-for-rss-feed-rss-rss/129296)

<div class="topic-metadata">

**Author:** [@yaxm](https://www.ruby-forum.com/u/yaxm)\
**Replies:** 0\
**Last updated:** [February 16, 2008, 8:33am UTC](https://www.ruby-forum.com/t/funky-cache-path-name-is-generated-for-rss-feed-rss-rss/129296 "2008-02-16T08:33:57Z")

</div>

In my routes.rb, I have map.all\_product\_feed ‘/feed.rss’, :controller =\> ‘product’, :action =\> ‘rss’ in my ProductController, I use action cache: caches\_action :rss if I access http://localtest.com/product/rss, the …

---

## [Learning rspec issues](https://www.ruby-forum.com/t/learning-rspec-issues/129208)

<div class="topic-metadata">

**Author:** [@sotirac](https://www.ruby-forum.com/u/sotirac)\
**Replies:** 4\
**Last updated:** [February 16, 2008, 7:36am UTC](https://www.ruby-forum.com/t/learning-rspec-issues/129208 "2008-02-16T07:36:40Z")

</div>

For the umpteenth time, in trying to become a better developer, i’m trying to practice BDD with rspec. after running the command: script/generate rspec\_scaffold Housing rake spec i get the following errors: http://…

---

## [Mongrel keeps gaining memory](https://www.ruby-forum.com/t/mongrel-keeps-gaining-memory/129291)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 0\
**Last updated:** [February 16, 2008, 6:20am UTC](https://www.ruby-forum.com/t/mongrel-keeps-gaining-memory/129291 "2008-02-16T06:20:38Z")

</div>

Anybody ever had a problem of a mongrel process that just grew and grew? Any ideas? Thanks! -Roger

[Previous page](https://www.ruby-forum.com/c/ruby-on-rails/6.md?page=1484)

[Next page](https://www.ruby-forum.com/c/ruby-on-rails/6.md?page=1486)
