# Rails

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

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

---

## [GoDaddy](https://www.ruby-forum.com/t/godaddy/118445)

<div class="topic-metadata">

**Author:** [@snantz](https://www.ruby-forum.com/u/snantz)\
**Replies:** 0\
**Last updated:** [October 27, 2007, 1:09am UTC](https://www.ruby-forum.com/t/godaddy/118445 "2007-10-27T01:09:29Z")

</div>

So I’m stillllll trying to get my app up and running on Godaddy. I get the rails welcome page which is odd since I have deleted all the index pages that I can find. I’m beginning to think that this is a routes issue? …

---

## [How do I determine the used rails version from within Ruby?](https://www.ruby-forum.com/t/how-do-i-determine-the-used-rails-version-from-within-ruby/92436)

<div class="topic-metadata">

**Author:** [@Sebastian\_Winkler](https://www.ruby-forum.com/u/Sebastian_Winkler)\
**Replies:** 1\
**Last updated:** [October 26, 2007, 11:48pm UTC](https://www.ruby-forum.com/t/how-do-i-determine-the-used-rails-version-from-within-ruby/92436 "2007-10-26T23:48:25Z")

</div>

How do I determine the used rails version from within Ruby?

---

## [2 questions: redirect and form fields](https://www.ruby-forum.com/t/2-questions-redirect-and-form-fields/118115)

<div class="topic-metadata">

**Author:** [@elle](https://www.ruby-forum.com/u/elle)\
**Replies:** 3\
**Last updated:** [October 26, 2007, 11:46pm UTC](https://www.ruby-forum.com/t/2-questions-redirect-and-form-fields/118115 "2007-10-26T23:46:53Z")

</div>

Just three quick questions: when a user logs in, how do you redirect her to the last page they were on? what do most use for a form field that lists all the states in a certain country? when you create a form, the de…

---

## [Mailer question](https://www.ruby-forum.com/t/mailer-question/118431)

<div class="topic-metadata">

**Author:** [@elle](https://www.ruby-forum.com/u/elle)\
**Replies:** 2\
**Last updated:** [October 26, 2007, 11:25pm UTC](https://www.ruby-forum.com/t/mailer-question/118431 "2007-10-26T23:25:50Z")

</div>

Hi, If I already have a Mailer class with a contact\_message method for an enquiry form, can I use the same Mailer, just add methods to it if I want to send a confirmation email when an order i splaced? or should I cr…

---

## [Standalone ActiveRecord application can't find ActiveRecord](https://www.ruby-forum.com/t/standalone-activerecord-application-cant-find-activerecord/118440)

<div class="topic-metadata">

**Author:** [@Jim\_Gagne](https://www.ruby-forum.com/u/Jim_Gagne)\
**Replies:** 1\
**Last updated:** [October 26, 2007, 11:23pm UTC](https://www.ruby-forum.com/t/standalone-activerecord-application-cant-find-activerecord/118440 "2007-10-26T23:23:29Z")

</div>

I need a standalone script to load models every two hours from an external source. I copied code from the original Ruby on Rails (RoR) application that works fine. The problem is that on my system, even the simplest r…

---

## [Redirecting with flash errors](https://www.ruby-forum.com/t/redirecting-with-flash-errors/118340)

<div class="topic-metadata">

**Author:** [@michael](https://www.ruby-forum.com/u/michael)\
**Replies:** 2\
**Last updated:** [October 26, 2007, 10:00pm UTC](https://www.ruby-forum.com/t/redirecting-with-flash-errors/118340 "2007-10-26T22:00:23Z")

</div>

Hey, I have two controllers: accounts\_controller and profile\_controller. Whenever a user is updating information in their profile, they can do so from an accounts controller action, which gets posted to the profile c…

---

## [Image\_science broken on leopard](https://www.ruby-forum.com/t/image-science-broken-on-leopard/118433)

<div class="topic-metadata">

**Author:** [@wickie](https://www.ruby-forum.com/u/wickie)\
**Replies:** 1\
**Last updated:** [October 26, 2007, 9:38pm UTC](https://www.ruby-forum.com/t/image-science-broken-on-leopard/118433 "2007-10-26T21:38:06Z")

</div>

Does anyone know how to contact the image\_science folks? In any case, it appears image\_science is broken on leopard. After fighting a bit with the Makefile for FreeImage, I have been able to compile it successfully. A…

---

## [How to test a function not a action on controller on ruby](https://www.ruby-forum.com/t/how-to-test-a-function-not-a-action-on-controller-on-ruby/118370)

<div class="topic-metadata">

**Author:** [@OnRails](https://www.ruby-forum.com/u/OnRails)\
**Replies:** 2\
**Last updated:** [October 26, 2007, 8:17pm UTC](https://www.ruby-forum.com/t/how-to-test-a-function-not-a-action-on-controller-on-ruby/118370 "2007-10-26T20:17:55Z")

</div>

Hi, everyone, How to test a function not a action on controller test on ruby? like this: def namesomeone ( firstname, lastname) some codes end how to test this function namesomeone. who knows, please tell me, Than…

---

## [Stylesheet\_link\_tag, javascript\_include\_tag - food for thought](https://www.ruby-forum.com/t/stylesheet-link-tag-javascript-include-tag-food-for-thought/118426)

<div class="topic-metadata">

**Author:** [@kyle\_n](https://www.ruby-forum.com/u/kyle_n)\
**Replies:** 0\
**Last updated:** [October 26, 2007, 7:56pm UTC](https://www.ruby-forum.com/t/stylesheet-link-tag-javascript-include-tag-food-for-thought/118426 "2007-10-26T19:56:48Z")

</div>

stylesheet\_link\_tag and javascript\_include\_tag both have a very handy hash options generator at the end of the files. ie: def stylesheet\_link\_tag(\*sources) options = sources.last.is\_a?(Hash) ? sources.pop.stringify\_…

---

## [Post\_via\_redirect - testing problem](https://www.ruby-forum.com/t/post-via-redirect-testing-problem/118417)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 1\
**Last updated:** [October 26, 2007, 7:13pm UTC](https://www.ruby-forum.com/t/post-via-redirect-testing-problem/118417 "2007-10-26T19:13:52Z")

</div>

I’ve got an integration test that’s failing but i can’t work out why: Here’s the action being tested - in case anyone recognises it, it’s based on the Depot app in Agile Web Dev with Rails. def checkout @in\_checkout …

---

## [Copy a unique row to another table](https://www.ruby-forum.com/t/copy-a-unique-row-to-another-table/118410)

<div class="topic-metadata">

**Author:** [@inriz](https://www.ruby-forum.com/u/inriz)\
**Replies:** 0\
**Last updated:** [October 26, 2007, 6:06pm UTC](https://www.ruby-forum.com/t/copy-a-unique-row-to-another-table/118410 "2007-10-26T18:06:15Z")

</div>

hello list, ive got a simple problem of copying a row to another table the to tables have enough identical columns, so i used the attributes hash of my object to get less work with it the my piece of code for that d…

---

## [Symlink etc](https://www.ruby-forum.com/t/symlink-etc/118409)

<div class="topic-metadata">

**Author:** [@cyrille](https://www.ruby-forum.com/u/cyrille)\
**Replies:** 0\
**Last updated:** [October 26, 2007, 5:48pm UTC](https://www.ruby-forum.com/t/symlink-etc/118409 "2007-10-26T17:48:31Z")

</div>

I’m really new to Ruby so have patientce. I got this instruction from my web host: “Put application catalog outside public\_html and then create a symlink from myapp/public catalog to public\_html/myapp so it will be ac…

---

## [Composite Keys on RESTful Routes](https://www.ruby-forum.com/t/composite-keys-on-restful-routes/118406)

<div class="topic-metadata">

**Author:** [@brianb](https://www.ruby-forum.com/u/brianb)\
**Replies:** 0\
**Last updated:** [October 26, 2007, 5:37pm UTC](https://www.ruby-forum.com/t/composite-keys-on-restful-routes/118406 "2007-10-26T17:37:01Z")

</div>

I am building an app with existing controllers/actions, using traditional rails routes. I recently started moving over to RESTful routes and have hit a snag. Now I am reconsidering my whole effort and may go back to…

---

## [Loser question](https://www.ruby-forum.com/t/loser-question/118336)

<div class="topic-metadata">

**Author:** [@pedz](https://www.ruby-forum.com/u/pedz)\
**Replies:** 6\
**Last updated:** [October 26, 2007, 5:23pm UTC](https://www.ruby-forum.com/t/loser-question/118336 "2007-10-26T17:23:19Z")

</div>

Ok. I’m a loser. I’ve been told and warned. But I still got bit. If I do: irb(main):001:0\> GOLF = \[ 1, 2, 3\] =\> \[1, 2, 3\] irb(main):002:0\> g = GOLF =\> \[1, 2, 3\] irb(main):003:0\> g \<\< 4 =\> \[1, 2, 3, 4\] irb(main…

---

## [Remote\_form\_for](https://www.ruby-forum.com/t/remote-form-for/118392)

<div class="topic-metadata">

**Author:** [@martijn](https://www.ruby-forum.com/u/martijn)\
**Replies:** 2\
**Last updated:** [October 26, 2007, 4:58pm UTC](https://www.ruby-forum.com/t/remote-form-for/118392 "2007-10-26T16:58:22Z")

</div>

Dear all, I’m having problems with a hidden form field in remote\_form\_for. When I remove the comment on the second line of the code (see below), I get the error: undefined method \`merge’ for 1:Fixnum 1 is the user.i…

---

## [Apache+fcgi is out, apache+mongrel is in](https://www.ruby-forum.com/t/apache-fcgi-is-out-apache-mongrel-is-in/118381)

<div class="topic-metadata">

**Author:** [@mgreenly](https://www.ruby-forum.com/u/mgreenly)\
**Replies:** 2\
**Last updated:** [October 26, 2007, 4:22pm UTC](https://www.ruby-forum.com/t/apache-fcgi-is-out-apache-mongrel-is-in/118381 "2007-10-26T16:22:37Z")

</div>

I’m switching from apache fcgi (which actually corrupts my server’s memory, which causes some interesting results… none good) to apache mongrel\_cluster. I have this in my apache config file: \<proxy balancer://guild…

---

## [Limiting Size of Output Field](https://www.ruby-forum.com/t/limiting-size-of-output-field/118353)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [October 26, 2007, 3:57pm UTC](https://www.ruby-forum.com/t/limiting-size-of-output-field/118353 "2007-10-26T15:57:28Z")

</div>

Hi! I have a really stupid/simple question. How do you go about limiting the size of a field for the output? For example, I have a field that says… \<%= response.description %\> in my list.rhtml file. However, the…

---

## [How to use javascript in rhtml](https://www.ruby-forum.com/t/how-to-use-javascript-in-rhtml/196502)

<div class="topic-metadata">

**Author:** [@advait](https://www.ruby-forum.com/u/advait)\
**Replies:** 4\
**Last updated:** [October 26, 2007, 3:09pm UTC](https://www.ruby-forum.com/t/how-to-use-javascript-in-rhtml/196502 "2007-10-26T15:09:37Z")

</div>

hello, I needed to know a javascript function which I can use for focusing my cursor on the first text field of a given page. That is as soon as I load a page, my cursor should start blinking in the first text field …

---

## [Dynamic Finders and Count](https://www.ruby-forum.com/t/dynamic-finders-and-count/118383)

<div class="topic-metadata">

**Author:** [@lordbyte](https://www.ruby-forum.com/u/lordbyte)\
**Replies:** 3\
**Last updated:** [October 26, 2007, 1:32pm UTC](https://www.ruby-forum.com/t/dynamic-finders-and-count/118383 "2007-10-26T13:32:22Z")

</div>

Hi! I have a (hopefully) simple problem, but just don’t get the idea how to implement it in rails. There are two classes, one for users and one for comments. A user has\_many comments and each comment belongs\_to user. …

---

## [Where to put this to have access from everywhere](https://www.ruby-forum.com/t/where-to-put-this-to-have-access-from-everywhere/118387)

<div class="topic-metadata">

**Author:** [@jawosis](https://www.ruby-forum.com/u/jawosis)\
**Replies:** 2\
**Last updated:** [October 26, 2007, 1:07pm UTC](https://www.ruby-forum.com/t/where-to-put-this-to-have-access-from-everywhere/118387 "2007-10-26T13:07:47Z")

</div>

I have this class Pic \< ActiveRecord::Base def self.active\_pics find(:all, :conditions =\> \[“thumbnail is NULL AND active = 1”\]) end end in my pic.rb model file. I have an area on my site which uses a different lay…

---

## [Validate\_presence\_of radio button selected?](https://www.ruby-forum.com/t/validate-presence-of-radio-button-selected/118386)

<div class="topic-metadata">

**Author:** [@mgiorno](https://www.ruby-forum.com/u/mgiorno)\
**Replies:** 0\
**Last updated:** [October 26, 2007, 12:44pm UTC](https://www.ruby-forum.com/t/validate-presence-of-radio-button-selected/118386 "2007-10-26T12:44:29Z")

</div>

Hi, I’m trying to force a user to pick one of several options, but validate\_presence\_of doesn’t seem to work on my radio buttons. Has anyone else had this problem? ##Model validates\_presence\_of :category\_id ##View …

---

## [Eager loading associations with ordering](https://www.ruby-forum.com/t/eager-loading-associations-with-ordering/118379)

<div class="topic-metadata">

**Author:** [@arvliet](https://www.ruby-forum.com/u/arvliet)\
**Replies:** 1\
**Last updated:** [October 26, 2007, 11:49am UTC](https://www.ruby-forum.com/t/eager-loading-associations-with-ordering/118379 "2007-10-26T11:49:47Z")

</div>

This was a sneaky bug that I managed to track down in my code… I hope it helps someone. I first thought this might be a shortcoming or a bug in Rails but I’m not really sure where the fault lies: I guess it’s just an …

---

## [Captcha Validation fails](https://www.ruby-forum.com/t/captcha-validation-fails/118368)

<div class="topic-metadata">

**Author:** [@Bala](https://www.ruby-forum.com/u/Bala)\
**Replies:** 2\
**Last updated:** [October 26, 2007, 10:55am UTC](https://www.ruby-forum.com/t/captcha-validation-fails/118368 "2007-10-26T10:55:23Z")

</div>

Hello Experts, I’ve done Captcha validation for model, when i try to save, captcha validation fails Did anyone has this problem? plz help me guys. regards, Bala

---

## [How do you use form helpers with nested objects?](https://www.ruby-forum.com/t/how-do-you-use-form-helpers-with-nested-objects/118063)

<div class="topic-metadata">

**Author:** [@avramd](https://www.ruby-forum.com/u/avramd)\
**Replies:** 1\
**Last updated:** [October 26, 2007, 9:17am UTC](https://www.ruby-forum.com/t/how-do-you-use-form-helpers-with-nested-objects/118063 "2007-10-26T09:17:21Z")

</div>

Hello, I have a form which contains a table that users fill in. The table data will not be going into the form’s own object, but into a series of objects (one per row) via a has\_man :through relationship. I can’t fig…

---

## [Custom method in Application Controller](https://www.ruby-forum.com/t/custom-method-in-application-controller/118364)

<div class="topic-metadata">

**Author:** [@mifi](https://www.ruby-forum.com/u/mifi)\
**Replies:** 1\
**Last updated:** [October 26, 2007, 5:43am UTC](https://www.ruby-forum.com/t/custom-method-in-application-controller/118364 "2007-10-26T05:43:55Z")

</div>

Hi All, I took this idea Christian Hellsten and Jarkko L.'s “Beginning Ruby on Rails E-Commerce”. Here is the situation. I will be using the “options\_from\_collection\_for\_select” and “collection\_select” form helper …

---

## [Appending to a textarea with RJS](https://www.ruby-forum.com/t/appending-to-a-textarea-with-rjs/118359)

<div class="topic-metadata">

**Author:** [@johnhutch](https://www.ruby-forum.com/u/johnhutch)\
**Replies:** 2\
**Last updated:** [October 26, 2007, 5:05am UTC](https://www.ruby-forum.com/t/appending-to-a-textarea-with-rjs/118359 "2007-10-26T05:05:58Z")

</div>

Ok, this is driving me nuts. I’m trying to RJS some text into a text\_area which may or may not have been written in by the user. if I page.insert\_html :before, :after, :top, or :bottom, it either sticks the contents a…

---

## [Report generation in rails](https://www.ruby-forum.com/t/report-generation-in-rails/118287)

<div class="topic-metadata">

**Author:** [@abhi](https://www.ruby-forum.com/u/abhi)\
**Replies:** 4\
**Last updated:** [October 26, 2007, 4:54am UTC](https://www.ruby-forum.com/t/report-generation-in-rails/118287 "2007-10-26T04:54:52Z")

</div>

Hi, I am using MySql . I there any option in ror as in c# and MS Sql that I can generate reports from my application. Like MS sql is having reporting services thru which we can generate customized report and c# is ha…

---

## [How Do I: Avoid an Infinite Loop using Before Save and After Save?](https://www.ruby-forum.com/t/how-do-i-avoid-an-infinite-loop-using-before-save-and-after-save/118356)

<div class="topic-metadata">

**Author:** [@dark-omen](https://www.ruby-forum.com/u/dark-omen)\
**Replies:** 6\
**Last updated:** [October 26, 2007, 2:59am UTC](https://www.ruby-forum.com/t/how-do-i-avoid-an-infinite-loop-using-before-save-and-after-save/118356 "2007-10-26T02:59:10Z")

</div>

I have an entity that looks something like this: journal author\_first\_name author\_last\_name journal\_name journal\_email\_address where journal\_name = author\_first\_name + ’ ’ + author\_last\_name journal\_email\_address…

---

## [Find - group - postgres](https://www.ruby-forum.com/t/find-group-postgres/118351)

<div class="topic-metadata">

**Author:** [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Replies:** 1\
**Last updated:** [October 26, 2007, 12:00am UTC](https://www.ruby-forum.com/t/find-group-postgres/118351 "2007-10-26T00:00:23Z")

</div>

I am not sure that this is entirely a rails question as I am trying to run the command in postgres and I am getting the same error… controller code… @client\_slot\_count = ClientSlotsDaily.find(:all, :conditions =\>…

---

## [Acts\_as\_conference keynoters announced!](https://www.ruby-forum.com/t/acts-as-conference-keynoters-announced/196504)

<div class="topic-metadata">

**Author:** [@inari](https://www.ruby-forum.com/u/inari)\
**Replies:** 0\
**Last updated:** [October 25, 2007, 10:47pm UTC](https://www.ruby-forum.com/t/acts-as-conference-keynoters-announced/196504 "2007-10-25T22:47:14Z")

</div>

acts\_as\_conference is happy to announce our keynoters - Dan Benjamin and Obie F.! You can read all about the exciting keynoters at the acts\_as\_conference site: Dan Benjamin: http://actsasconference.com/speakers/dan-be…

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

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