# Rails

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

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

---

## [Do you prefer JQuery or Prototype? Why?](https://www.ruby-forum.com/t/do-you-prefer-jquery-or-prototype-why/136164)

<div class="topic-metadata">

**Author:** [@miken700](https://www.ruby-forum.com/u/miken700)\
**Replies:** 3\
**Last updated:** [April 30, 2008, 12:01am UTC](https://www.ruby-forum.com/t/do-you-prefer-jquery-or-prototype-why/136164 "2008-04-30T00:01:29Z")

</div>

Hey folks, I’m about to start a new project and I’m considering using JQuery instead of Prototype because I’ve heard that a lot of people like it. I’ve looked at a lot of JQuery documentation, but I don’t see what mak…

---

## [Validation and error messages in has\_many association in single form with parent](https://www.ruby-forum.com/t/validation-and-error-messages-in-has-many-association-in-single-form-with-parent/126644)

<div class="topic-metadata">

**Author:** [@NickCB](https://www.ruby-forum.com/u/NickCB)\
**Replies:** 2\
**Last updated:** [April 29, 2008, 9:54pm UTC](https://www.ruby-forum.com/t/validation-and-error-messages-in-has-many-association-in-single-form-with-parent/126644 "2008-04-29T21:54:59Z")

</div>

I am having trouble with validation and user-friendly error messages when I create a new “Spot” and an associated (has\_many) “Title”. I have the following models: class Spot \< ActiveRecord::Base has\_many :titles, :de…

---

## [Auto\_completer how to make a summary line not selectable](https://www.ruby-forum.com/t/auto-completer-how-to-make-a-summary-line-not-selectable/136170)

<div class="topic-metadata">

**Author:** [@jesperronn](https://www.ruby-forum.com/u/jesperronn)\
**Replies:** 2\
**Last updated:** [April 29, 2008, 9:48pm UTC](https://www.ruby-forum.com/t/auto-completer-how-to-make-a-summary-line-not-selectable/136170 "2008-04-29T21:48:50Z")

</div>

i’m making an autocomplete field, where the autocompleter selects from roughly 10,000 items in a table. Of course i use LIMIT to limit the resultset to about 7 items. In the bottom of the autocomplete div, I want to a…

---

## [Restricting Download of Files](https://www.ruby-forum.com/t/restricting-download-of-files/136169)

<div class="topic-metadata">

**Author:** [@armstheykill](https://www.ruby-forum.com/u/armstheykill)\
**Replies:** 14\
**Last updated:** [April 29, 2008, 9:38pm UTC](https://www.ruby-forum.com/t/restricting-download-of-files/136169 "2008-04-29T21:38:12Z")

</div>

So I’ve got a webapp that stores something, lets say photos. The photos are currently stored on my webserver’s filesystem via attachment\_fu. Users can upload photos fine, they get stored fine, and I can display them …

---

## [Follow the conversation and search relevant sites with What's up in Ruby](https://www.ruby-forum.com/t/follow-the-conversation-and-search-relevant-sites-with-whats-up-in-ruby/196650)

<div class="topic-metadata">

**Author:** [@flatekmonkey](https://www.ruby-forum.com/u/flatekmonkey)\
**Replies:** 3\
**Last updated:** [April 29, 2008, 9:26pm UTC](https://www.ruby-forum.com/t/follow-the-conversation-and-search-relevant-sites-with-whats-up-in-ruby/196650 "2008-04-29T21:26:27Z")

</div>

Hey all, We (Atlantic Dominion Solutions) launched http://www.whatsupinruby.com this morning. This is a niche site that does two things: Tells you what is going on in the Ruby world (we parse many many RSS feeds). P…

---

## [Get\_text with safe\_erb on Rails 2](https://www.ruby-forum.com/t/get-text-with-safe-erb-on-rails-2/136215)

<div class="topic-metadata">

**Author:** [@iberci](https://www.ruby-forum.com/u/iberci)\
**Replies:** 0\
**Last updated:** [April 29, 2008, 9:24pm UTC](https://www.ruby-forum.com/t/get-text-with-safe-erb-on-rails-2/136215 "2008-04-29T21:24:48Z")

</div>

After patching safe\_erb to work with rails 2, I am now getting conflicts with get\_text. When get\_text gets a translated value, I recieve the tainted exception. Has anyone come across this before and if so, where do I …

---

## [Rendering partials that need a FormBuilder local](https://www.ruby-forum.com/t/rendering-partials-that-need-a-formbuilder-local/136211)

<div class="topic-metadata">

**Author:** [@wickie](https://www.ruby-forum.com/u/wickie)\
**Replies:** 0\
**Last updated:** [April 29, 2008, 9:02pm UTC](https://www.ruby-forum.com/t/rendering-partials-that-need-a-formbuilder-local/136211 "2008-04-29T21:02:16Z")

</div>

At times I use partials to render pieces of a form like this \<% form\_for @foo do |f| %\> … \<%= render :partial =\> 'foo', :locals =\> { :f =\> f } %\> ... \<% end %\> def edit @foo = … respond\_to do |format| f…

---

## [RadRails now defaults to Edge!](https://www.ruby-forum.com/t/radrails-now-defaults-to-edge/136210)

<div class="topic-metadata">

**Author:** [@jonlog](https://www.ruby-forum.com/u/jonlog)\
**Replies:** 1\
**Last updated:** [April 29, 2008, 8:59pm UTC](https://www.ruby-forum.com/t/radrails-now-defaults-to-edge/136210 "2008-04-29T20:59:20Z")

</div>

FYI to anyone running RadRails; RadRails is now updating your gem sources (whether you want it to or not) so that running ‘gem install rails’ or ‘gem update rails’ will always you get the latest Edge Rails, not the l…

---

## [Weird Issue with Rails 2.0.2+?](https://www.ruby-forum.com/t/weird-issue-with-rails-2-0-2/133904)

<div class="topic-metadata">

**Author:** [@nbnbnb](https://www.ruby-forum.com/u/nbnbnb)\
**Replies:** 3\
**Last updated:** [April 29, 2008, 8:40pm UTC](https://www.ruby-forum.com/t/weird-issue-with-rails-2-0-2/133904 "2008-04-29T20:40:14Z")

</div>

Hi. I have kept my rails installation up to date. Now I have 2.0.2.9216 installed, including a fewl older ones, back to the original 2.0.2 release, However, I keep on getting weird problems with newly created proje…

---

## [How to create simple login form](https://www.ruby-forum.com/t/how-to-create-simple-login-form/136092)

<div class="topic-metadata">

**Author:** [@manish](https://www.ruby-forum.com/u/manish)\
**Replies:** 3\
**Last updated:** [April 29, 2008, 8:38pm UTC](https://www.ruby-forum.com/t/how-to-create-simple-login-form/136092 "2008-04-29T20:38:25Z")

</div>

i m new to ROR… i make a simple progm for login… Username and password… if(right) { login } else { error msg } can u help me in this… My form is \<% form\_tag :controller =\> “user”, :action =\> “login\_submit” …

---

## [Webistrano recipes association (was: \[Capistrano\] \[ANN\] Webistrano 1.3 released)](https://www.ruby-forum.com/t/webistrano-recipes-association-was-capistrano-ann-webistrano-1-3-released/136203)

<div class="topic-metadata">

**Author:** [@deanhiller](https://www.ruby-forum.com/u/deanhiller)\
**Replies:** 1\
**Last updated:** [April 29, 2008, 8:20pm UTC](https://www.ruby-forum.com/t/webistrano-recipes-association-was-capistrano-ann-webistrano-1-3-released/136203 "2008-04-29T20:20:02Z")

</div>

I see at some point recipes were changed from project-associated to stage-associated, is there some explanation or examples of that use-case? Could I request we have both? In my current cap scripts, we don’t have any …

---

## [How to create text\_field for has\_many form](https://www.ruby-forum.com/t/how-to-create-text-field-for-has-many-form/136199)

<div class="topic-metadata">

**Author:** [@cwd](https://www.ruby-forum.com/u/cwd)\
**Replies:** 1\
**Last updated:** [April 29, 2008, 7:31pm UTC](https://www.ruby-forum.com/t/how-to-create-text-field-for-has-many-form/136199 "2008-04-29T19:31:04Z")

</div>

Hello 2 solid days of time and I can’t figure this/find answer in previous group post/find answer via google anything that works. I know the problem is me (and I will know doubt kick myself later) but if anyone could…

---

## [Rails Routes: Creating a reserved url list](https://www.ruby-forum.com/t/rails-routes-creating-a-reserved-url-list/136181)

<div class="topic-metadata">

**Author:** [@farfignugen](https://www.ruby-forum.com/u/farfignugen)\
**Replies:** 1\
**Last updated:** [April 29, 2008, 7:18pm UTC](https://www.ruby-forum.com/t/rails-routes-creating-a-reserved-url-list/136181 "2008-04-29T19:18:33Z")

</div>

Hi, Im currently working on a rails project which has routes setup so that users can have their own personal page for example www.mydomain.com/myusername. one problem ive run into is that when i want to have say a se…

---

## [Code in install.rb](https://www.ruby-forum.com/t/code-in-install-rb/136160)

<div class="topic-metadata">

**Author:** [@MohsinHijazee](https://www.ruby-forum.com/u/MohsinHijazee)\
**Replies:** 1\
**Last updated:** [April 29, 2008, 7:08pm UTC](https://www.ruby-forum.com/t/code-in-install-rb/136160 "2008-04-29T19:08:21Z")

</div>

Hi! If I add some code that uses ActiveRecord::Base.connection.execute method to create and remove a table respectively on each install and uninstall in the install.rb and uninstall.rb of a plugin that I am writing f…

---

## [\[ANN\] Webistrano 1.3 released](https://www.ruby-forum.com/t/ann-webistrano-1-3-released/136194)

<div class="topic-metadata">

**Author:** [@waddilove](https://www.ruby-forum.com/u/waddilove)\
**Replies:** 0\
**Last updated:** [April 29, 2008, 7:05pm UTC](https://www.ruby-forum.com/t/ann-webistrano-1-3-released/136194 "2008-04-29T19:05:59Z")

</div>

Cheers, I’m proud to announce Webistrano 1.3. http://labs.peritor.com/webistrano/ Webistrano is a Web UI for managing Capistrano deployments. It lets you manage projects and their stages like test, production, and st…

---

## [Validates\_presence\_of , unless](https://www.ruby-forum.com/t/validates-presence-of-unless/136191)

<div class="topic-metadata">

**Author:** [@dmorin](https://www.ruby-forum.com/u/dmorin)\
**Replies:** 1\
**Last updated:** [April 29, 2008, 6:38pm UTC](https://www.ruby-forum.com/t/validates-presence-of-unless/136191 "2008-04-29T18:38:39Z")

</div>

I’ve got a case for my model where the name field is required, ONLY if the comment field has been filled out. I thought I could do this like this: validates\_presence\_of :name, :unless=\>@comment.nil? but I can’t seem…

---

## [Eager loading problem](https://www.ruby-forum.com/t/eager-loading-problem/136190)

<div class="topic-metadata">

**Author:** [@ankit2584](https://www.ruby-forum.com/u/ankit2584)\
**Replies:** 0\
**Last updated:** [April 29, 2008, 6:21pm UTC](https://www.ruby-forum.com/t/eager-loading-problem/136190 "2008-04-29T18:21:57Z")

</div>

Hi, I am trying eager loading with has\_many through association. But i get a could not find id error (detaiLs on error below) . Models Presenceship belongs\_to :person belongs\_to :contactoccasion Person has\_many :…

---

## [Acts\_as\_tree help](https://www.ruby-forum.com/t/acts-as-tree-help/136156)

<div class="topic-metadata">

**Author:** [@suneeta](https://www.ruby-forum.com/u/suneeta)\
**Replies:** 2\
**Last updated:** [April 29, 2008, 5:52pm UTC](https://www.ruby-forum.com/t/acts-as-tree-help/136156 "2008-04-29T17:52:03Z")

</div>

Hi all… I created a table having a tree structure using acts\_as\_tree. Now I need to access all the parents, grandparents etc upto the root of a particular node. Also all the children upto leaf node. I used particula…

---

## [ActiveRecord::Rollback not found?](https://www.ruby-forum.com/t/activerecord-rollback-not-found/136172)

<div class="topic-metadata">

**Author:** [@praveen](https://www.ruby-forum.com/u/praveen)\
**Replies:** 1\
**Last updated:** [April 29, 2008, 5:36pm UTC](https://www.ruby-forum.com/t/activerecord-rollback-not-found/136172 "2008-04-29T17:36:06Z")

</div>

Hi All The docs mention that raising ActiveRecord::Rollback from within a ‘transaction’ block causes the transaction to rollback without reraising it. However, trying this in script/console gives this error: NameErro…

---

## [Latest news about using Bind variables with oracle](https://www.ruby-forum.com/t/latest-news-about-using-bind-variables-with-oracle/136180)

<div class="topic-metadata">

**Author:** [@crenner](https://www.ruby-forum.com/u/crenner)\
**Replies:** 0\
**Last updated:** [April 29, 2008, 5:21pm UTC](https://www.ruby-forum.com/t/latest-news-about-using-bind-variables-with-oracle/136180 "2008-04-29T17:21:57Z")

</div>

Whats the latest news with the use of real bind variables with Oracle? A couple of years ago it was mentioned that it was a planned feature for rails. I haven’t heard anything since about it. The advantages of them …

---

## [Need help expressing a double filtered selection in a pagination statement](https://www.ruby-forum.com/t/need-help-expressing-a-double-filtered-selection-in-a-pagination-statement/136093)

<div class="topic-metadata">

**Author:** [@Carson](https://www.ruby-forum.com/u/Carson)\
**Replies:** 2\
**Last updated:** [April 29, 2008, 4:24pm UTC](https://www.ruby-forum.com/t/need-help-expressing-a-double-filtered-selection-in-a-pagination-statement/136093 "2008-04-29T16:24:56Z")

</div>

Four tables are involved: Departments, Categories, Products and ProductCategories. Department has\_many :categories Category has\_and\_belongs\_to\_many :products Products has\_and\_belongs\_to\_many :categories In a control…

---

## [Differentiating computers on same network](https://www.ruby-forum.com/t/differentiating-computers-on-same-network/136119)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [April 29, 2008, 4:14pm UTC](https://www.ruby-forum.com/t/differentiating-computers-on-same-network/136119 "2008-04-29T16:14:36Z")

</div>

What would I be looking at to differentiate computers on the same network? (using Ruby/Rails code) Also considering computers that are assigned a different ip over a wireless office network. Would I be looking at extr…

---

## [Visual\_effect](https://www.ruby-forum.com/t/visual-effect/136149)

<div class="topic-metadata">

**Author:** [@san1981](https://www.ruby-forum.com/u/san1981)\
**Replies:** 5\
**Last updated:** [April 29, 2008, 4:05pm UTC](https://www.ruby-forum.com/t/visual-effect/136149 "2008-04-29T16:05:38Z")

</div>

Hello, I try to make a visual effect “toggle” on a list generated automatically from a controller, I’ve tried this but that doesn’t work? the id "answer\_\<%=i%\> isn’t recognized I think? \<%i=0%\> \<removed\_email\_addres…

---

## [Syntax error](https://www.ruby-forum.com/t/syntax-error/136154)

<div class="topic-metadata">

**Author:** [@vanderkerkoff](https://www.ruby-forum.com/u/vanderkerkoff)\
**Replies:** 3\
**Last updated:** [April 29, 2008, 2:53pm UTC](https://www.ruby-forum.com/t/syntax-error/136154 "2008-04-29T14:53:14Z")

</div>

I’m certain this is a stupid mistake but I can’t find it. Can someone tell me why this code is giving me errors? http://pastie.caboo.se/188590 The errors are at the botttom of the paste. Thanks for any help.

---

## [Running single migration file](https://www.ruby-forum.com/t/running-single-migration-file/136132)

<div class="topic-metadata">

**Author:** [@karthikragu](https://www.ruby-forum.com/u/karthikragu)\
**Replies:** 2\
**Last updated:** [April 29, 2008, 2:38pm UTC](https://www.ruby-forum.com/t/running-single-migration-file/136132 "2008-04-29T14:38:59Z")

</div>

hi all, in my db/migrate folder im having many migrations files that creates tables,add columns,and remove columns.i created a new migration file now and can i run only this new migration file using rake command…

---

## [Syntax errors](https://www.ruby-forum.com/t/syntax-errors/136153)

<div class="topic-metadata">

**Author:** [@vanderkerkoff](https://www.ruby-forum.com/u/vanderkerkoff)\
**Replies:** 3\
**Last updated:** [April 29, 2008, 2:14pm UTC](https://www.ruby-forum.com/t/syntax-errors/136153 "2008-04-29T14:14:12Z")

</div>

I’m sure this is going to be a very silly question but can anyone tell me why this code is giving me errors? require ‘rubygems’ require ‘mysql’ db = Mysql.new(‘localhost’, ‘root’, ‘avuzritfanu’, ‘studentevents’) beg…

---

## [Render :inline expectation in controller spec](https://www.ruby-forum.com/t/render-inline-expectation-in-controller-spec/136057)

<div class="topic-metadata">

**Author:** [@jyrppa](https://www.ruby-forum.com/u/jyrppa)\
**Replies:** 1\
**Last updated:** [April 29, 2008, 1:05pm UTC](https://www.ruby-forum.com/t/render-inline-expectation-in-controller-spec/136057 "2008-04-29T13:05:49Z")

</div>

I have following method in my controller: def method\_x … render :inline=\>’\<%= auto\_complete\_result(@messages, “hobby”)%\>’ end How can I verify in my controller spec that render :inline is called with the parameter …

---

## [Passing a value from form to a model?](https://www.ruby-forum.com/t/passing-a-value-from-form-to-a-model/136148)

<div class="topic-metadata">

**Author:** [@ANSS](https://www.ruby-forum.com/u/ANSS)\
**Replies:** 1\
**Last updated:** [April 29, 2008, 12:23pm UTC](https://www.ruby-forum.com/t/passing-a-value-from-form-to-a-model/136148 "2008-04-29T12:23:10Z")

</div>

Hello, I’m writing an application that has a user registration functionality, the sign up form has a field that is called ‘card’, here the user is supposed to enter a valid PIN code. PIN codes are stored in a table …

---

## [Errno::EBADF Bad file descriptor - connect(2)](https://www.ruby-forum.com/t/errno-ebadf-bad-file-descriptor-connect-2/136141)

<div class="topic-metadata">

**Author:** [@dhaval\_parikh33](https://www.ruby-forum.com/u/dhaval_parikh33)\
**Replies:** 2\
**Last updated:** [April 29, 2008, 11:19am UTC](https://www.ruby-forum.com/t/errno-ebadf-bad-file-descriptor-connect-2/136141 "2008-04-29T11:19:34Z")

</div>

hi, my application was working fine till the day before yesterday. but its not working since yesterday suddenly, don’t know why. some pages are visible but where i’m posting something, those pages show the “Errno::EB…

---

## [Multiple toggle divs](https://www.ruby-forum.com/t/multiple-toggle-divs/136108)

<div class="topic-metadata">

**Author:** [@rushnosh](https://www.ruby-forum.com/u/rushnosh)\
**Replies:** 1\
**Last updated:** [April 29, 2008, 10:29am UTC](https://www.ruby-forum.com/t/multiple-toggle-divs/136108 "2008-04-29T10:29:02Z")

</div>

i have a list of items i need to display with a corresponding paragraph for each item that i want to hid in a div in a view. \<% @items.each\_with\_index do | item, n | %\> \<%= link\_to\_function “highlights”, “Element.to…

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

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