# Rails

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

[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:** 1454

---

## [Validation error handling on related models](https://www.ruby-forum.com/t/validation-error-handling-on-related-models/131367)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 9\
**Last updated:** [March 8, 2008, 11:34pm UTC](https://www.ruby-forum.com/t/validation-error-handling-on-related-models/131367 "2008-03-08T23:34:42Z")

</div>

I have 2 models, entity and client. Entity has\_one client and client belongs\_to entity. Entity has attributes name and legal\_name. Entity also has an unique index on (lower(name)). The pKey for both is the conventi…

---

## [How do I pass data from index page back to index page?](https://www.ruby-forum.com/t/how-do-i-pass-data-from-index-page-back-to-index-page/131373)

<div class="topic-metadata">

**Author:** [@capslock118](https://www.ruby-forum.com/u/capslock118)\
**Replies:** 0\
**Last updated:** [March 8, 2008, 11:17pm UTC](https://www.ruby-forum.com/t/how-do-i-pass-data-from-index-page-back-to-index-page/131373 "2008-03-08T23:17:19Z")

</div>

Hello, I currently have this in my view: \<%= link\_to h(sub\_category.name), :controller =\> ‘categories’, :action =\> ‘show’, :id =\> sub\_category.id %\> however I do not want to go to the categories controller. I would m…

---

## [How does Rails link\_to connects to the show.rhtml?](https://www.ruby-forum.com/t/how-does-rails-link-to-connects-to-the-show-rhtml/131217)

<div class="topic-metadata">

**Author:** [@ric](https://www.ruby-forum.com/u/ric)\
**Replies:** 3\
**Last updated:** [March 8, 2008, 11:11pm UTC](https://www.ruby-forum.com/t/how-does-rails-link-to-connects-to-the-show-rhtml/131217 "2008-03-08T23:11:40Z")

</div>

Environment: rails 2.0.2 on OS X. I wish I had a better way of showing this… I have a question about the logic path hidden within Rails 2.0.2. Scenario: I’m viewing a partial view and click on a linked line of an it…

---

## [Is there a way to use partial views from another category?](https://www.ruby-forum.com/t/is-there-a-way-to-use-partial-views-from-another-category/131364)

<div class="topic-metadata">

**Author:** [@ron](https://www.ruby-forum.com/u/ron)\
**Replies:** 3\
**Last updated:** [March 8, 2008, 9:38pm UTC](https://www.ruby-forum.com/t/is-there-a-way-to-use-partial-views-from-another-category/131364 "2008-03-08T21:38:37Z")

</div>

Hi, I have a partial view \_header.rhtml in my pages directory (views/ pages/) and I’d like to reference that partial view from my blog directory. For a quick solution, I copied the file into the blog directory for t…

---

## [Design a GUI widget for "assign roles to users"](https://www.ruby-forum.com/t/design-a-gui-widget-for-assign-roles-to-users/131339)

<div class="topic-metadata">

**Author:** [@myst\_tt](https://www.ruby-forum.com/u/myst_tt)\
**Replies:** 1\
**Last updated:** [March 8, 2008, 9:36pm UTC](https://www.ruby-forum.com/t/design-a-gui-widget-for-assign-roles-to-users/131339 "2008-03-08T21:36:35Z")

</div>

Hi, In the admin panel of my little app, the admin can open a user’s detail info page and modify(kick or add) the user’s roles (all roles contain “anonymous”, “normal”, “moderator” and “admin”). However, I have no id…

---

## [Nginx with Rails Way book](https://www.ruby-forum.com/t/nginx-with-rails-way-book/131365)

<div class="topic-metadata">

**Author:** [@peri](https://www.ruby-forum.com/u/peri)\
**Replies:** 1\
**Last updated:** [March 8, 2008, 9:36pm UTC](https://www.ruby-forum.com/t/nginx-with-rails-way-book/131365 "2008-03-08T21:36:15Z")

</div>

I have been trying to install the software listed in chapter 20 in the Rails Way book (awesome read, btw)… everything has been good up until setting up nginx. Below is where I get stuck. I am running leopard (os x). …

---

## [Checking for records in a database](https://www.ruby-forum.com/t/checking-for-records-in-a-database/131363)

<div class="topic-metadata">

**Author:** [@tomx](https://www.ruby-forum.com/u/tomx)\
**Replies:** 3\
**Last updated:** [March 8, 2008, 9:26pm UTC](https://www.ruby-forum.com/t/checking-for-records-in-a-database/131363 "2008-03-08T21:26:15Z")

</div>

Hi, I am have recently followed a tutorial for a basic blog system using Rails (version 2.0.2). In order to get used to the way to develop Rails apps, I decided to improve on what the tutorial showed me. However I ha…

---

## [Timestamp help](https://www.ruby-forum.com/t/timestamp-help/131280)

<div class="topic-metadata">

**Author:** [@InnerSparkMedia](https://www.ruby-forum.com/u/InnerSparkMedia)\
**Replies:** 3\
**Last updated:** [March 8, 2008, 9:17pm UTC](https://www.ruby-forum.com/t/timestamp-help/131280 "2008-03-08T21:17:24Z")

</div>

I am trying to figure out if a time stamp in my database is older then a month so that way my controller will only collect the one’s that are newer. So far I have @notes = @customer.notes.find(:all, :conditions =\> {:l…

---

## [Array problem](https://www.ruby-forum.com/t/array-problem/131355)

<div class="topic-metadata">

**Author:** [@ANSS](https://www.ruby-forum.com/u/ANSS)\
**Replies:** 4\
**Last updated:** [March 8, 2008, 9:11pm UTC](https://www.ruby-forum.com/t/array-problem/131355 "2008-03-08T21:11:32Z")

</div>

Hi, I need to parse a string char by char, if the char is a number it should go to a array without any modification, however in case of letters they should be decoded into hexadecimals before they go to the array, f…

---

## [Should I use iterations to display sub categories?](https://www.ruby-forum.com/t/should-i-use-iterations-to-display-sub-categories/131265)

<div class="topic-metadata">

**Author:** [@capslock118](https://www.ruby-forum.com/u/capslock118)\
**Replies:** 2\
**Last updated:** [March 8, 2008, 8:45pm UTC](https://www.ruby-forum.com/t/should-i-use-iterations-to-display-sub-categories/131265 "2008-03-08T20:45:36Z")

</div>

Hello, I have a categories table that has an id and a category\_id so that I can have a :belongs\_to on itself. On the left of my website I would like to display the main categories, then their sub categories below the…

---

## [Observe\_field for two fields](https://www.ruby-forum.com/t/observe-field-for-two-fields/131236)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 1\
**Last updated:** [March 8, 2008, 8:25pm UTC](https://www.ruby-forum.com/t/observe-field-for-two-fields/131236 "2008-03-08T20:25:25Z")

</div>

Hi I have now three select boxes(This is my current structure of program) Priority \<%= select( "sd\_ticket", "sd\_priority\_id", SdPriority.find(:all).collect {|p| \[ p.name, p.id \] }) %\> \<th width="%"\>\<label for…

---

## [Views and sequences](https://www.ruby-forum.com/t/views-and-sequences/131225)

<div class="topic-metadata">

**Author:** [@Parker\_T](https://www.ruby-forum.com/u/Parker_T)\
**Replies:** 1\
**Last updated:** [March 8, 2008, 7:53pm UTC](https://www.ruby-forum.com/t/views-and-sequences/131225 "2008-03-08T19:53:06Z")

</div>

We’ve exposed a set of views to a nasty legacy Oracle DB that give our app a simple railsesque schema. As the DB is maintained by some hard core DBAs we let them trigger and constrain all they want (translation: the…

---

## [What is the right way to monkey patch rails?](https://www.ruby-forum.com/t/what-is-the-right-way-to-monkey-patch-rails/131224)

<div class="topic-metadata">

**Author:** [@samckayak](https://www.ruby-forum.com/u/samckayak)\
**Replies:** 7\
**Last updated:** [March 8, 2008, 4:04pm UTC](https://www.ruby-forum.com/t/what-is-the-right-way-to-monkey-patch-rails/131224 "2008-03-08T16:04:07Z")

</div>

I need to change a little method in rails, specifically the authorization method in ActionController::HttpAuthentication::Basic (which uses a fixed list of authentication env locations that doesn’t include what my ser…

---

## [RJS problem](https://www.ruby-forum.com/t/rjs-problem/131344)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [March 8, 2008, 3:45pm UTC](https://www.ruby-forum.com/t/rjs-problem/131344 "2008-03-08T15:45:43Z")

</div>

Hi everyone! I’m tearing my hair out over an RJS problem. I’ve used it before without issue, but I’ve no idea what is going wrong here. I’m trying to display a div which starts off invisible defined with: ... In my .…

---

## [Programista RoR poszukiwany](https://www.ruby-forum.com/t/programista-ror-poszukiwany/131345)

<div class="topic-metadata">

**Author:** [@mgras](https://www.ruby-forum.com/u/mgras)\
**Replies:** 0\
**Last updated:** [March 8, 2008, 3:39pm UTC](https://www.ruby-forum.com/t/programista-ror-poszukiwany/131345 "2008-03-08T15:39:22Z")

</div>

Witam serdecznie, Szukam programisty java/RoR/php/mysql do ciekawego projektu community. Zale¿y mi na osobie która ma ju¿ do¶wiadczenie, gdy¿ system musi byæ dobrze napisany pod k±tem wydajno¶ci. Ogólnie rzecz ujmuj±…

---

## [Re: When will Rails deployment be as easy as PHP](https://www.ruby-forum.com/t/re-when-will-rails-deployment-be-as-easy-as-php/131332)

<div class="topic-metadata">

**Author:** [@boothy](https://www.ruby-forum.com/u/boothy)\
**Replies:** 2\
**Last updated:** [March 8, 2008, 3:18pm UTC](https://www.ruby-forum.com/t/re-when-will-rails-deployment-be-as-easy-as-php/131332 "2008-03-08T15:18:46Z")

</div>

Hi I am new also and was wondering if you could show us you small project. I am trying to see what a small ruby project looks like thanks ----- Original Message ---- From: Rahil K. removed\_email\_address@domain.inv…

---

## [When will Rails deployment be as easy as PHP](https://www.ruby-forum.com/t/when-will-rails-deployment-be-as-easy-as-php/131330)

<div class="topic-metadata">

**Author:** [@rahil](https://www.ruby-forum.com/u/rahil)\
**Replies:** 1\
**Last updated:** [March 8, 2008, 2:22pm UTC](https://www.ruby-forum.com/t/when-will-rails-deployment-be-as-easy-as-php/131330 "2008-03-08T14:22:15Z")

</div>

Hello, We are a group of new students on this Forum. We are Learning R. and Rails as well. The first thing that scared us was Rails Deployment. Can any one answer us, when will rails deployment be as easy as PHP on …

---

## [\<Mongrel noob\>: Verifying start/stop order of processes](https://www.ruby-forum.com/t/mongrel-noob-verifying-start-stop-order-of-processes/131317)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 2\
**Last updated:** [March 8, 2008, 1:49pm UTC](https://www.ruby-forum.com/t/mongrel-noob-verifying-start-stop-order-of-processes/131317 "2008-03-08T13:49:12Z")

</div>

Is it best practice/correct to: Start Mongrel, then Apache and conversely, Stop Apache, then Mongrel on server startup and shutdown? Thanks, Wes

---

## [How to know which Mongrel process serves a request?](https://www.ruby-forum.com/t/how-to-know-which-mongrel-process-serves-a-request/131316)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 1\
**Last updated:** [March 8, 2008, 1:47pm UTC](https://www.ruby-forum.com/t/how-to-know-which-mongrel-process-serves-a-request/131316 "2008-03-08T13:47:26Z")

</div>

Please indulge me in a Mongrel clustering noob question. I just got mongrel clustering set up, is there any way for me to know (via log files, etc.) which instance of Mongrel serves up a given request? URLs if approp…

---

## [N-levels of nested resources in REST?](https://www.ruby-forum.com/t/n-levels-of-nested-resources-in-rest/131301)

<div class="topic-metadata">

**Author:** [@Fredrik\_K](https://www.ruby-forum.com/u/Fredrik_K)\
**Replies:** 4\
**Last updated:** [March 8, 2008, 11:50am UTC](https://www.ruby-forum.com/t/n-levels-of-nested-resources-in-rest/131301 "2008-03-08T11:50:35Z")

</div>

Hi, I find it would be very convenient to nest resources in two levels, so a member is only sensible as a part of a club, and a fee pament is only sensible in the context of a club and a member. Is it possible to nes…

---

## [Attachment to emails](https://www.ruby-forum.com/t/attachment-to-emails/131336)

<div class="topic-metadata">

**Author:** [@grayson](https://www.ruby-forum.com/u/grayson)\
**Replies:** 0\
**Last updated:** [March 8, 2008, 10:19am UTC](https://www.ruby-forum.com/t/attachment-to-emails/131336 "2008-03-08T10:19:57Z")

</div>

Hello, I followed this excellent example from NovaWave (thank you!) and implemented a mini-email system http://www.novawave.net/public/rails\_messaging\_tutorial.html Next I wanted to add the ability to attach differen…

---

## ['link\_to\_class\_current' helper](https://www.ruby-forum.com/t/link-to-class-current-helper/131199)

<div class="topic-metadata">

**Author:** [@chunkyslink](https://www.ruby-forum.com/u/chunkyslink)\
**Replies:** 7\
**Last updated:** [March 8, 2008, 9:57am UTC](https://www.ruby-forum.com/t/link-to-class-current-helper/131199 "2008-03-08T09:57:49Z")

</div>

I’m trying to create a navigation which adds :class =\> “current” to the currently selected nav link (just like the WordPress nav). I presume the class would be determined by the controller params (which isn’t a proble…

---

## [Harvest field values to an array](https://www.ruby-forum.com/t/harvest-field-values-to-an-array/131334)

<div class="topic-metadata">

**Author:** [@dino\_d](https://www.ruby-forum.com/u/dino_d)\
**Replies:** 1\
**Last updated:** [March 8, 2008, 8:35am UTC](https://www.ruby-forum.com/t/harvest-field-values-to-an-array/131334 "2008-03-08T08:35:43Z")

</div>

Hi- Simple question, just can’t find a reference. I have an array of records via a habtm, and simply want to harvest all of the values of one field into an array of strings. Example: story = Story.find(:first) com…

---

## [Custom REST routes](https://www.ruby-forum.com/t/custom-rest-routes/131320)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [March 8, 2008, 3:54am UTC](https://www.ruby-forum.com/t/custom-rest-routes/131320 "2008-03-08T03:54:00Z")

</div>

Hi, I want to make a custom route : /games/1/join which will make the curernt user join game with id 1. i have the route: map.resources :games, :member =\> {:join =\> :post} But the logs show: “\_method”=\>“put”, “act…

---

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

<div class="topic-metadata">

**Author:** [@demisone](https://www.ruby-forum.com/u/demisone)\
**Replies:** 1\
**Last updated:** [March 8, 2008, 3:39am UTC](https://www.ruby-forum.com/t/discussion-on-frequently-asked-questions/131319 "2008-03-08T03:39:56Z")

</div>

Hey, where are aptana and especially netbeans ? :smiley: P.S.: Ok, i use textmate and pretty much love it, but netbeans and up to a point aptana, have some nice integrated developing tools…

---

## [Defining Optional Argument](https://www.ruby-forum.com/t/defining-optional-argument/131323)

<div class="topic-metadata">

**Author:** [@wings](https://www.ruby-forum.com/u/wings)\
**Replies:** 2\
**Last updated:** [March 8, 2008, 3:23am UTC](https://www.ruby-forum.com/t/defining-optional-argument/131323 "2008-03-08T03:23:07Z")

</div>

Hi all. I’m trying to create an optional argument that if it’s not passed, a default value will be assigned. def graph (graph\_type, graph\_period, \*hidden) hidden = 1 if hidden.nil end hidden is a tinyint (0 or 1)…

---

## [How to downgrade from rails 2.0.2](https://www.ruby-forum.com/t/how-to-downgrade-from-rails-2-0-2/131318)

<div class="topic-metadata">

**Author:** [@macfizz](https://www.ruby-forum.com/u/macfizz)\
**Replies:** 1\
**Last updated:** [March 8, 2008, 2:50am UTC](https://www.ruby-forum.com/t/how-to-downgrade-from-rails-2-0-2/131318 "2008-03-08T02:50:05Z")

</div>

Somehow I have ended up with v2.0.2 on my Mac. I am running Leopard so am not sure whether this version came with it. Here are the various versions of components: macfizz$ rails -v Rails 2.0.2 macfizz$ ruby -v ruby…

---

## [How to clear certain form fields with RJS?](https://www.ruby-forum.com/t/how-to-clear-certain-form-fields-with-rjs/131291)

<div class="topic-metadata">

**Author:** [@eggman2001](https://www.ruby-forum.com/u/eggman2001)\
**Replies:** 1\
**Last updated:** [March 8, 2008, 2:07am UTC](https://www.ruby-forum.com/t/how-to-clear-certain-form-fields-with-rjs/131291 "2008-03-08T02:07:46Z")

</div>

I have a form, which when submitted updates certain page elements using RJS. Within the form, I have a few text fields, which I would like to clear upon submission. Can someone tell me what I would need to do to do th…

---

## [Initialization of inverted models](https://www.ruby-forum.com/t/initialization-of-inverted-models/131300)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 1\
**Last updated:** [March 8, 2008, 1:59am UTC](https://www.ruby-forum.com/t/initialization-of-inverted-models/131300 "2008-03-08T01:59:21Z")

</div>

Given the following situation: client belongs\_to entity entity has\_one client entity has\_one vendor entity has\_many contacts entity has\_many sites etc. Creating a new client should test if an entity with the exist…

---

## [Trouble with link\_to\_remote](https://www.ruby-forum.com/t/trouble-with-link-to-remote/131312)

<div class="topic-metadata">

**Author:** [@revanche](https://www.ruby-forum.com/u/revanche)\
**Replies:** 2\
**Last updated:** [March 8, 2008, 1:44am UTC](https://www.ruby-forum.com/t/trouble-with-link-to-remote/131312 "2008-03-08T01:44:39Z")

</div>

Does anybody have any guesses about why this is happening? Specifically, why it is trying to call the id as an action in the second attempt: Attempt One \<%= link\_to\_remote(image\_tag(‘button\_details.gif’, :id =\> “detail…

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

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