# Rails

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

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

---

## [Update All using Checkboxes](https://www.ruby-forum.com/t/update-all-using-checkboxes/126480)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [January 18, 2008, 4:52pm UTC](https://www.ruby-forum.com/t/update-all-using-checkboxes/126480 "2008-01-18T16:52:54Z")

</div>

So I have a list of jobs which I show like this. (cleaned up…) \_list.rhtml \<% for job in @jobs %\> \<%= job.name %\> \<% end %\> I want checkboxes next to each and every job name and a button or link somewhere else on th…

---

## [Trouble with has\_and\_belongs\_to\_many](https://www.ruby-forum.com/t/trouble-with-has-and-belongs-to-many/126476)

<div class="topic-metadata">

**Author:** [@Iain\_A](https://www.ruby-forum.com/u/Iain_A)\
**Replies:** 0\
**Last updated:** [January 18, 2008, 4:23pm UTC](https://www.ruby-forum.com/t/trouble-with-has-and-belongs-to-many/126476 "2008-01-18T16:23:47Z")

</div>

Hello, I have this method in my helper that is supposed to return true if the campaignadmin is in the campaignadmins habtm. def has\_access? campaign, campadmin begin #prints out the campadmin’s id puts campadmin.id …

---

## [Text\_field\_with\_auto\_complete problem](https://www.ruby-forum.com/t/text-field-with-auto-complete-problem/124983)

<div class="topic-metadata">

**Author:** [@damien](https://www.ruby-forum.com/u/damien)\
**Replies:** 7\
**Last updated:** [January 18, 2008, 2:52pm UTC](https://www.ruby-forum.com/t/text-field-with-auto-complete-problem/124983 "2008-01-18T14:52:19Z")

</div>

I can’t get the autocomplete feature of script.aculo.us to work. I have tried every guide I could find and several books to no avail. As you can probably tell from the code, I’m new to this and just used the scaffoldi…

---

## [One Vote Per Session](https://www.ruby-forum.com/t/one-vote-per-session/126443)

<div class="topic-metadata">

**Author:** [@apjanes](https://www.ruby-forum.com/u/apjanes)\
**Replies:** 3\
**Last updated:** [January 18, 2008, 2:39pm UTC](https://www.ruby-forum.com/t/one-vote-per-session/126443 "2008-01-18T14:39:16Z")

</div>

I have an app where any user (no login required) can vote on something and I need a way to limit them to one vote per session. Does anyone have any suggestions? Thanks a lot for any help you can offer.

---

## [\[ADV\] Upcoming RoR Training in NYC](https://www.ruby-forum.com/t/adv-upcoming-ror-training-in-nyc/126464)

<div class="topic-metadata">

**Author:** [@David\_ASBlack](https://www.ruby-forum.com/u/David_ASBlack)\
**Replies:** 0\
**Last updated:** [January 18, 2008, 2:22pm UTC](https://www.ruby-forum.com/t/adv-upcoming-ror-training-in-nyc/126464 "2008-01-18T14:22:42Z")

</div>

Hi – I guess I could end here, since my sig says it already :slight\_smile: But just to emphasize: I’ll be offering two Rails courses in New York City in February, hosted at the new training facility of Exceed Educati…

---

## [.maximum to return a full row not just one value](https://www.ruby-forum.com/t/maximum-to-return-a-full-row-not-just-one-value/126462)

<div class="topic-metadata">

**Author:** [@philthompson](https://www.ruby-forum.com/u/philthompson)\
**Replies:** 0\
**Last updated:** [January 18, 2008, 1:37pm UTC](https://www.ruby-forum.com/t/maximum-to-return-a-full-row-not-just-one-value/126462 "2008-01-18T13:37:52Z")

</div>

Hi, I have a Rating table in my SQL database and I would like to return the row containing the highest average rating where the picture\_id for that row is a certain value. I could do this by SQL but I’d like to use t…

---

## [NameError when using alias\_method -- but method exists?](https://www.ruby-forum.com/t/nameerror-when-using-alias-method-but-method-exists/126406)

<div class="topic-metadata">

**Author:** [@kodama](https://www.ruby-forum.com/u/kodama)\
**Replies:** 3\
**Last updated:** [January 18, 2008, 1:37pm UTC](https://www.ruby-forum.com/t/nameerror-when-using-alias-method-but-method-exists/126406 "2008-01-18T13:37:31Z")

</div>

Hello Rubyists, I am a bit stumped here. I want to extend the ‘load\_file’ method in the YAML module. Following along with the PickAxe example of making old methods do new things, I try this in irb: module YAML ali…

---

## [Line breaks?](https://www.ruby-forum.com/t/line-breaks/126446)

<div class="topic-metadata">

**Author:** [@vapor](https://www.ruby-forum.com/u/vapor)\
**Replies:** 2\
**Last updated:** [January 18, 2008, 1:29pm UTC](https://www.ruby-forum.com/t/line-breaks/126446 "2008-01-18T13:29:04Z")

</div>

how do I implement line breaks? for example if user writes some like sssssssssssssssssss long enough without any space, it disturbs the whole UI. How do I handle this? Thanks

---

## [Values broken converting from rails into javascript](https://www.ruby-forum.com/t/values-broken-converting-from-rails-into-javascript/126454)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 1\
**Last updated:** [January 18, 2008, 12:56pm UTC](https://www.ruby-forum.com/t/values-broken-converting-from-rails-into-javascript/126454 "2008-01-18T12:56:05Z")

</div>

I have a section of javascript which i’m trying to use to dynamically generate the options for a mult-select box, when another box’s contents are changed. Basically i have a method that returns an array of arrays, wh…

---

## [\[launch!\] alonetone, a damn fine home for musicians](https://www.ruby-forum.com/t/launch-alonetone-a-damn-fine-home-for-musicians/126460)

<div class="topic-metadata">

**Author:** [@sudara](https://www.ruby-forum.com/u/sudara)\
**Replies:** 0\
**Last updated:** [January 18, 2008, 12:24pm UTC](https://www.ruby-forum.com/t/launch-alonetone-a-damn-fine-home-for-musicians/126460 "2008-01-18T12:24:22Z")

</div>

I just tenderly launched a rails website targeting musicians, especially of the DIY/bedroom variety, who are looking for a good online home. Take a peek! If you know any musicians who record on their own, please pa…

---

## [Trying to load an library from /home/.highjump, dunno why](https://www.ruby-forum.com/t/trying-to-load-an-library-from-home-highjump-dunno-why/126430)

<div class="topic-metadata">

**Author:** [@PaSSS\_lo\_Geyer](https://www.ruby-forum.com/u/PaSSS_lo_Geyer)\
**Replies:** 5\
**Last updated:** [January 18, 2008, 12:08pm UTC](https://www.ruby-forum.com/t/trying-to-load-an-library-from-home-highjump-dunno-why/126430 "2008-01-18T12:08:56Z")

</div>

I have a typo blog running on dreamhost, now i’m getting this strange error: LoadError (Expected /home/.highjump/auszug/auszug.org/app/controllers/ articles\_controller.rb to define ArticlesController): I can’t find o…

---

## [Question about model attributes](https://www.ruby-forum.com/t/question-about-model-attributes/126449)

<div class="topic-metadata">

**Author:** [@leonb](https://www.ruby-forum.com/u/leonb)\
**Replies:** 4\
**Last updated:** [January 18, 2008, 12:03pm UTC](https://www.ruby-forum.com/t/question-about-model-attributes/126449 "2008-01-18T12:03:35Z")

</div>

Hi, At what point in rails are the methods for a models attributes defined? Because I have the following code: Parked at Loopia And it returns in irb: s = Playlist.find(:first).songs false 1 If I do this in i…

---

## [How I changed my mobile into cash?](https://www.ruby-forum.com/t/how-i-changed-my-mobile-into-cash/126451)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [January 18, 2008, 11:24am UTC](https://www.ruby-forum.com/t/how-i-changed-my-mobile-into-cash/126451 "2008-01-18T11:24:19Z")

</div>

Join US and get, Latest offerings on your fingertips. Information of the latest product in tune with your interest. Up-to-date news on upcoming gizmos and gadgets. Check them at your leisure. On top of it all, effor…

---

## [Browser issues](https://www.ruby-forum.com/t/browser-issues/126452)

<div class="topic-metadata">

**Author:** [@sreekar](https://www.ruby-forum.com/u/sreekar)\
**Replies:** 0\
**Last updated:** [January 18, 2008, 11:17am UTC](https://www.ruby-forum.com/t/browser-issues/126452 "2008-01-18T11:17:48Z")

</div>

Hi I could insert images to the pdf.Thanks for all those who gave their valuable suggestions. Now the issue is that everything is working fine under moxilla Firefox but in internet explorer tables and images are not …

---

## [Please help](https://www.ruby-forum.com/t/please-help/126436)

<div class="topic-metadata">

**Author:** [@Haris\_G](https://www.ruby-forum.com/u/Haris_G)\
**Replies:** 3\
**Last updated:** [January 18, 2008, 10:54am UTC](https://www.ruby-forum.com/t/please-help/126436 "2008-01-18T10:54:58Z")

</div>

Hello all, I have developed a RESTFul webservice in RoR. Here under is the controller class PeopleController \< ApplicationController def index list render :action =\> ‘list’ end GETs should be safe (see URIs, Ad…

---

## [Rails 2 thinks my function name is the ID for show()](https://www.ruby-forum.com/t/rails-2-thinks-my-function-name-is-the-id-for-show/126328)

<div class="topic-metadata">

**Author:** [@gers32](https://www.ruby-forum.com/u/gers32)\
**Replies:** 1\
**Last updated:** [January 18, 2008, 10:18am UTC](https://www.ruby-forum.com/t/rails-2-thinks-my-function-name-is-the-id-for-show/126328 "2008-01-18T10:18:34Z")

</div>

Hi, I wrote a RoR application using “Generators” / “scaffold” in Rails 1.2.6 (via RadRails). Now that I’ve upgraded to Rails 2.0.2., the generated Controller is more REST-like; and that’s fine with me. I’m used to cr…

---

## [Require 'postgres'](https://www.ruby-forum.com/t/require-postgres/126390)

<div class="topic-metadata">

**Author:** [@hiddenhippo](https://www.ruby-forum.com/u/hiddenhippo)\
**Replies:** 2\
**Last updated:** [January 18, 2008, 9:55am UTC](https://www.ruby-forum.com/t/require-postgres/126390 "2008-01-18T09:55:02Z")

</div>

hi, I’m trying to write a test application that queries a postgres database, which so far I’ve managed to do but in a limited way. I’m completely lost how to perform transactions and how to return the primary key id…

---

## [Autocomplete for](https://www.ruby-forum.com/t/autocomplete-for/126439)

<div class="topic-metadata">

**Author:** [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Replies:** 2\
**Last updated:** [January 18, 2008, 9:49am UTC](https://www.ruby-forum.com/t/autocomplete-for/126439 "2008-01-18T09:49:31Z")

</div>

I have this code in my view: \<%= text\_field\_with\_auto\_complete :client, :name %\> when I submit new, y get: “client”=\>{“name”=\>“MSO”} I want to get: “repair\_ticket”=\>{“client\_id”=\>"??"} My models are class Client \< …

---

## [Order in list](https://www.ruby-forum.com/t/order-in-list/126438)

<div class="topic-metadata">

**Author:** [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Replies:** 1\
**Last updated:** [January 18, 2008, 9:34am UTC](https://www.ruby-forum.com/t/order-in-list/126438 "2008-01-18T09:34:00Z")

</div>

I have this code: \<% form\_for(@repair\_ticket) do |f| %\> \<%= text\_field\_with\_auto\_complete :rp\_part, :name %\> Client \<% @clients.each do |client| %\> \> \<%= client.name %\> \<%…

---

## [Can't have Fixtures with ID 0?](https://www.ruby-forum.com/t/cant-have-fixtures-with-id-0/126407)

<div class="topic-metadata">

**Author:** [@galeal](https://www.ruby-forum.com/u/galeal)\
**Replies:** 4\
**Last updated:** [January 18, 2008, 9:19am UTC](https://www.ruby-forum.com/t/cant-have-fixtures-with-id-0/126407 "2008-01-18T09:19:42Z")

</div>

Is it not possible to load fixtures with ID of 0? Is there a way to force it? TIA

---

## [Creating Dynamic Tree Menu in Rails](https://www.ruby-forum.com/t/creating-dynamic-tree-menu-in-rails/126424)

<div class="topic-metadata">

**Author:** [@zscott](https://www.ruby-forum.com/u/zscott)\
**Replies:** 2\
**Last updated:** [January 18, 2008, 7:56am UTC](https://www.ruby-forum.com/t/creating-dynamic-tree-menu-in-rails/126424 "2008-01-18T07:56:27Z")

</div>

Hello all, I need a good technique to create a tree menu based off pages in a database with RoR. So, pages would look something like this in the db: pages ( id parent\_id title content ) Obviously, the parent\_id …

---

## [How to tackle \<script\> tag?](https://www.ruby-forum.com/t/how-to-tackle-script-tag/126432)

<div class="topic-metadata">

**Author:** [@vapor](https://www.ruby-forum.com/u/vapor)\
**Replies:** 3\
**Last updated:** [January 18, 2008, 6:45am UTC](https://www.ruby-forum.com/t/how-to-tackle-script-tag/126432 "2008-01-18T06:45:31Z")

</div>

I have a text field that takes Title of the post. But a colleague has tried to insert in javascript code with tag. how do I display this as-it-is and not let is execute? Thanks

---

## [MacHeist](https://www.ruby-forum.com/t/macheist/126429)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [January 18, 2008, 6:22am UTC](https://www.ruby-forum.com/t/macheist/126429 "2008-01-18T06:22:07Z")

</div>

A lot of rails developers use Macs and TextMate. MacHeist is offering another bundle which includes three other apps I find really useful when designing a site. CSSEdit, Snapz Pro X (for making screencasts), and Pix…

---

## [ATTN: Acts as tree users](https://www.ruby-forum.com/t/attn-acts-as-tree-users/126408)

<div class="topic-metadata">

**Author:** [@keynan](https://www.ruby-forum.com/u/keynan)\
**Replies:** 1\
**Last updated:** [January 18, 2008, 6:16am UTC](https://www.ruby-forum.com/t/attn-acts-as-tree-users/126408 "2008-01-18T06:16:19Z")

</div>

Acts as tree users: please review ticket http://dev.rubyonrails.org/ticket/10843 and add comment with +1

---

## [Anyone has "The Rails way" ebook?](https://www.ruby-forum.com/t/anyone-has-the-rails-way-ebook/126426)

<div class="topic-metadata">

**Author:** [@ratnavel](https://www.ruby-forum.com/u/ratnavel)\
**Replies:** 1\
**Last updated:** [January 18, 2008, 6:11am UTC](https://www.ruby-forum.com/t/anyone-has-the-rails-way-ebook/126426 "2008-01-18T06:11:36Z")

</div>

Do anyone has “The Rails way” ebook? Wer can i get it…?

---

## [Estimating requests / sec](https://www.ruby-forum.com/t/estimating-requests-sec/126399)

<div class="topic-metadata">

**Author:** [@gustav](https://www.ruby-forum.com/u/gustav)\
**Replies:** 5\
**Last updated:** [January 18, 2008, 5:44am UTC](https://www.ruby-forum.com/t/estimating-requests-sec/126399 "2008-01-18T05:44:09Z")

</div>

Hi; We’re using Rails to serve dynamic data for a bunch of ads, which are going to be exposed about 3 million times/day. To estimate the hardware setup, we’re trying to figure out what our peak load will be. They’ll …

---

## [How to use RESTful routes](https://www.ruby-forum.com/t/how-to-use-restful-routes/126414)

<div class="topic-metadata">

**Author:** [@kopf1988](https://www.ruby-forum.com/u/kopf1988)\
**Replies:** 3\
**Last updated:** [January 18, 2008, 5:24am UTC](https://www.ruby-forum.com/t/how-to-use-restful-routes/126414 "2008-01-18T05:24:14Z")

</div>

Okay, this has come up before… but it is NOT working for me sigh but, I’m hoping someone can tell me why. (Rails version 1.2.6) Let’s say I want to create an off the wall method in my Users controller, called login. I…

---

## [Need a good RoR developer](https://www.ruby-forum.com/t/need-a-good-ror-developer/126419)

<div class="topic-metadata">

**Author:** [@moattia](https://www.ruby-forum.com/u/moattia)\
**Replies:** 1\
**Last updated:** [January 18, 2008, 5:00am UTC](https://www.ruby-forum.com/t/need-a-good-ror-developer/126419 "2008-01-18T05:00:52Z")

</div>

Hi, I’m looking for qualified Ruby on Rails developers to work on a client web portal project in Midtown Manhattan for a large financial research company. Requirement Overview: Ruby / Ruby on Rails developer with str…

---

## [Ruby extension names](https://www.ruby-forum.com/t/ruby-extension-names/126362)

<div class="topic-metadata">

**Author:** [@andreas](https://www.ruby-forum.com/u/andreas)\
**Replies:** 2\
**Last updated:** [January 18, 2008, 2:17am UTC](https://www.ruby-forum.com/t/ruby-extension-names/126362 "2008-01-18T02:17:41Z")

</div>

I am wondering if Ruby has a way for classifying wether a file has useful code or if it is a file just containing functions/classes ? (Only “.rb” ?) Just like C++ has, “.cpp” (code, function runtime) file and “.h” is …

---

## [Method on a collection in a model](https://www.ruby-forum.com/t/method-on-a-collection-in-a-model/126401)

<div class="topic-metadata">

**Author:** [@galeal](https://www.ruby-forum.com/u/galeal)\
**Replies:** 4\
**Last updated:** [January 18, 2008, 2:03am UTC](https://www.ruby-forum.com/t/method-on-a-collection-in-a-model/126401 "2008-01-18T02:03:34Z")

</div>

I have a model (x) that has\_many y. Is it possible to write a method that says: x.ys.some\_method I’m assuming you’d put it in the x class…but I’m not too sure where to go from there. TIA

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

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