# Rails

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

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

---

## [Manage manual foreign\_key ,foreign\_type in polymorphic?](https://www.ruby-forum.com/t/manage-manual-foreign-key-foreign-type-in-polymorphic/130891)

<div class="topic-metadata">

**Author:** [@mokkai](https://www.ruby-forum.com/u/mokkai)\
**Replies:** 0\
**Last updated:** [March 4, 2008, 9:31am UTC](https://www.ruby-forum.com/t/manage-manual-foreign-key-foreign-type-in-polymorphic/130891 "2008-03-04T09:31:49Z")

</div>

how to manage manual foreign\_key ,foreign\_type in polymorphic ? like has\_many (or has\_one) :catalog\_entry, :as =\> :resource ,:foreign\_key=\>‘resource’ ,:foreign\_type=\>‘type’ any idea ?

---

## [Confused newbe again.. with id instead of action in URL](https://www.ruby-forum.com/t/confused-newbe-again-with-id-instead-of-action-in-url/130854)

<div class="topic-metadata">

**Author:** [@Fredrik\_K](https://www.ruby-forum.com/u/Fredrik_K)\
**Replies:** 6\
**Last updated:** [March 4, 2008, 9:22am UTC](https://www.ruby-forum.com/t/confused-newbe-again-with-id-instead-of-action-in-url/130854 "2008-03-04T09:22:51Z")

</div>

Hi, I’m trying to generate a new action and is very confused by the error message I get. I am accessing http://localhost:3001/members/isactive/ and get this error message: ActiveRecord::RecordNotFound in MembersContr…

---

## [United Communication](https://www.ruby-forum.com/t/united-communication/130889)

<div class="topic-metadata">

**Author:** [@stanley](https://www.ruby-forum.com/u/stanley)\
**Replies:** 0\
**Last updated:** [March 4, 2008, 9:18am UTC](https://www.ruby-forum.com/t/united-communication/130889 "2008-03-04T09:18:39Z")

</div>

United Communication, software house con sede a Firenze ricerca programmatori Ruby on Rails. Contattare Andrea Panella Tel: 055/3437609 removed\_email\_address@domain.invalid wwww.unitedcommunication.it

---

## [Getting rails console working behind a proxy server](https://www.ruby-forum.com/t/getting-rails-console-working-behind-a-proxy-server/130888)

<div class="topic-metadata">

**Author:** [@Jakub\_Vosahlo](https://www.ruby-forum.com/u/Jakub_Vosahlo)\
**Replies:** 0\
**Last updated:** [March 4, 2008, 9:15am UTC](https://www.ruby-forum.com/t/getting-rails-console-working-behind-a-proxy-server/130888 "2008-03-04T09:15:09Z")

</div>

Hello all, I am trying to work with the rails console (in Windows environment) while being behind a company firewall, connected to the Internet via a proxy server. I have the http\_proxy environment properly set, so t…

---

## [Why would ActiveRecord connect to Postgres as root?](https://www.ruby-forum.com/t/why-would-activerecord-connect-to-postgres-as-root/130869)

<div class="topic-metadata">

**Author:** [@stubbsuk](https://www.ruby-forum.com/u/stubbsuk)\
**Replies:** 2\
**Last updated:** [March 4, 2008, 8:12am UTC](https://www.ruby-forum.com/t/why-would-activerecord-connect-to-postgres-as-root/130869 "2008-03-04T08:12:02Z")

</div>

My databases.yml makes no mention of root and in my dev environment everything works fine, however following a deployment with Capistrano about an hour ago, I get the following error: PGError in HomeController#index F…

---

## [Mongrel ri is not installing](https://www.ruby-forum.com/t/mongrel-ri-is-not-installing/130885)

<div class="topic-metadata">

**Author:** [@mokkai](https://www.ruby-forum.com/u/mokkai)\
**Replies:** 0\
**Last updated:** [March 4, 2008, 8:10am UTC](https://www.ruby-forum.com/t/mongrel-ri-is-not-installing/130885 "2008-03-04T08:10:32Z")

</div>

when i execute $~ sudo gem install mongrel Building native extensions. This could take a while… Successfully installed mongrel-1.1.4 1 gem installed Installing ri documentation for mongrel-1.1.4… ERROR: While gen…

---

## [Admin and standard controllers RESTFully](https://www.ruby-forum.com/t/admin-and-standard-controllers-restfully/130829)

<div class="topic-metadata">

**Author:** [@JTJTJT](https://www.ruby-forum.com/u/JTJTJT)\
**Replies:** 3\
**Last updated:** [March 4, 2008, 7:37am UTC](https://www.ruby-forum.com/t/admin-and-standard-controllers-restfully/130829 "2008-03-04T07:37:24Z")

</div>

Hello. I will appreciate the opinion. What is the standard way of separating admin functions from normal- user functions? before\_filter in one controller? Use two controllers, i.e. ProductController and Admin/ Produ…

---

## [How to return a two dimensional array?](https://www.ruby-forum.com/t/how-to-return-a-two-dimensional-array/130877)

<div class="topic-metadata">

**Author:** [@vasan\_cec](https://www.ruby-forum.com/u/vasan_cec)\
**Replies:** 1\
**Last updated:** [March 4, 2008, 7:36am UTC](https://www.ruby-forum.com/t/how-to-return-a-two-dimensional-array/130877 "2008-03-04T07:36:13Z")

</div>

Hi Everyone, Can anyone tell me how to return a two dimensional array from a Function? I tried “returning(value)” function, but it allows only single dimensional array. Thanks in advance. Regards, VASANTH

---

## [Paginate by condition](https://www.ruby-forum.com/t/paginate-by-condition/130882)

<div class="topic-metadata">

**Author:** [@dhaval\_parikh33](https://www.ruby-forum.com/u/dhaval_parikh33)\
**Replies:** 1\
**Last updated:** [March 4, 2008, 7:28am UTC](https://www.ruby-forum.com/t/paginate-by-condition/130882 "2008-03-04T07:28:35Z")

</div>

hi all i want to use paging in my application where…i want to give a condition…like there r 2 things in my db…one is “A” and other is “B” so i want to list only “A” things and i want to paginate by that condition cu…

---

## [PKI Authentication](https://www.ruby-forum.com/t/pki-authentication/130884)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [March 4, 2008, 7:18am UTC](https://www.ruby-forum.com/t/pki-authentication/130884 "2008-03-04T07:18:03Z")

</div>

I am working on project and I need to get the value stored in SSL\_CLIENT\_S\_DN\_CN . We have been doing PKI authentication for sometime in PHP by getting the value of $\_SERVER\[“SSL\_CLIENT\_S\_DN\_CN”\] . Now that I am try…

---

## [Drop down not keeping value after errors are shown](https://www.ruby-forum.com/t/drop-down-not-keeping-value-after-errors-are-shown/130855)

<div class="topic-metadata">

**Author:** [@jimmypalmer](https://www.ruby-forum.com/u/jimmypalmer)\
**Replies:** 3\
**Last updated:** [March 4, 2008, 7:10am UTC](https://www.ruby-forum.com/t/drop-down-not-keeping-value-after-errors-are-shown/130855 "2008-03-04T07:10:24Z")

</div>

My drop down gets reset to the first value when the form gets returned with errors. here is my code: \<%= f.select :card\_type, \[ \[‘Choose a Payment Type’, nil\], \[‘Visa’, ‘Visa’\], \[‘MasterCard’, ‘master’\], \[‘Americ…

---

## [Displaying pics](https://www.ruby-forum.com/t/displaying-pics/130870)

<div class="topic-metadata">

**Author:** [@shaish](https://www.ruby-forum.com/u/shaish)\
**Replies:** 1\
**Last updated:** [March 4, 2008, 7:07am UTC](https://www.ruby-forum.com/t/displaying-pics/130870 "2008-03-04T07:07:37Z")

</div>

hey, I try to display pics (jpg) from my db but all I get is the “white box”. The pic and all of its att look fine in the db. It goes something like this: in show.rhtml: \<%= image\_tag(url\_for(:controller =\> ‘upload\_…

---

## [Multivariate testing or Taguchi Testing on Ruby?](https://www.ruby-forum.com/t/multivariate-testing-or-taguchi-testing-on-ruby/130880)

<div class="topic-metadata">

**Author:** [@joe\_matthew](https://www.ruby-forum.com/u/joe_matthew)\
**Replies:** 0\
**Last updated:** [March 4, 2008, 6:37am UTC](https://www.ruby-forum.com/t/multivariate-testing-or-taguchi-testing-on-ruby/130880 "2008-03-04T06:37:35Z")

</div>

There are many multivariate and taguchi testing tools in the market for php. Is there any such tool that for Ruby? Has any one had any experience with sitespect? I am not looking for A/B testing nor Google SIte Optim…

---

## [Db:schema:dump Data Migration](https://www.ruby-forum.com/t/dbdump-data-migration/130879)

<div class="topic-metadata">

**Author:** [@lgas](https://www.ruby-forum.com/u/lgas)\
**Replies:** 0\
**Last updated:** [March 4, 2008, 6:26am UTC](https://www.ruby-forum.com/t/dbdump-data-migration/130879 "2008-03-04T06:26:31Z")

</div>

Hi, I need some help on this command db:schema:dump. I have a table “Applications” with 1000 records. Can I reverse engineer this table and prepare a AR script so that I can migrate the data ? I know db:schema:dump d…

---

## [Acces multiply databases?](https://www.ruby-forum.com/t/acces-multiply-databases/130838)

<div class="topic-metadata">

**Author:** [@remco](https://www.ruby-forum.com/u/remco)\
**Replies:** 1\
**Last updated:** [March 4, 2008, 5:20am UTC](https://www.ruby-forum.com/t/acces-multiply-databases/130838 "2008-03-04T05:20:18Z")

</div>

Hi, i build my own rails-app, with “my” (own)database for a new website. My company has a big central database (also mysql\> same server \> cluster \> but no rails-app) with some interesting content i want to use…custom…

---

## [TypeCast](https://www.ruby-forum.com/t/typecast/197268)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 4\
**Last updated:** [March 4, 2008, 4:41am UTC](https://www.ruby-forum.com/t/typecast/197268 "2008-03-04T04:41:33Z")

</div>

Hi I have an ActiveRecord class ServiceDesk and a string “ServiceDesk” .How can I convert the string “ServiceDesk” to create a new object of the class ServiceDesk? Concept is made clear below. model = “ServiceDesk”…

---

## [Error "spawner: invalid argument: -p 3000" when calling from spin](https://www.ruby-forum.com/t/error-spawner-invalid-argument-p-3000-when-calling-from-spin/129278)

<div class="topic-metadata">

**Author:** [@india](https://www.ruby-forum.com/u/india)\
**Replies:** 1\
**Last updated:** [March 4, 2008, 4:15am UTC](https://www.ruby-forum.com/t/error-spawner-invalid-argument-p-3000-when-calling-from-spin/129278 "2008-03-04T04:15:47Z")

</div>

When deploying with capistrano 2, i have following strange problem: the deployment complain that it doesn’t understand parameters “-p 3000” or “-i 3” in spin script (I compose spin just like capistrano guide) with thi…

---

## [Rails Edge ActiveSupport::TimeWithZone and Marshalled objects](https://www.ruby-forum.com/t/rails-edge-activesupport-timewithzone-and-marshalled-objects/129664)

<div class="topic-metadata">

**Author:** [@sev2](https://www.ruby-forum.com/u/sev2)\
**Replies:** 2\
**Last updated:** [March 4, 2008, 2:35am UTC](https://www.ruby-forum.com/t/rails-edge-activesupport-timewithzone-and-marshalled-objects/129664 "2008-03-04T02:35:28Z")

</div>

Hello all, I’m trying to use the new ActiveSupport::TimeWithZone from Edge. The problem seems to be that I have a several-action process to create a Booking. This Booking is stored in the session (session\[:booking\] = …

---

## [NEED HELP dieing here](https://www.ruby-forum.com/t/need-help-dieing-here/130867)

<div class="topic-metadata">

**Author:** [@sweiss](https://www.ruby-forum.com/u/sweiss)\
**Replies:** 5\
**Last updated:** [March 4, 2008, 1:34am UTC](https://www.ruby-forum.com/t/need-help-dieing-here/130867 "2008-03-04T01:34:31Z")

</div>

When I try and use rjs rails just outputs the text of the javascript I am trying to call with page.call javascript is enabled, I have tried setting config.action\_view.debug\_rjs to false and commenting it out in the d…

---

## [Has many through : dynamic join on creation](https://www.ruby-forum.com/t/has-many-through-dynamic-join-on-creation/130834)

<div class="topic-metadata">

**Author:** [@jub](https://www.ruby-forum.com/u/jub)\
**Replies:** 1\
**Last updated:** [March 4, 2008, 12:58am UTC](https://www.ruby-forum.com/t/has-many-through-dynamic-join-on-creation/130834 "2008-03-04T00:58:39Z")

</div>

Hello, I have a User ActiveRecord model and a Group AR model joined by has\_many :through Membership. It’s not a HBTM because I need an extra attribute for the memberships. I tried to fill my dev site with some data a…

---

## [CSS best practices?](https://www.ruby-forum.com/t/css-best-practices/130833)

<div class="topic-metadata">

**Author:** [@jeff\_wigal](https://www.ruby-forum.com/u/jeff_wigal)\
**Replies:** 2\
**Last updated:** [March 4, 2008, 12:12am UTC](https://www.ruby-forum.com/t/css-best-practices/130833 "2008-03-04T00:12:22Z")

</div>

I’m starting a new Rails project, and I have all of my CSS lumped into a single style sheet. I am guessing this probably is not the best way to keep this organized. Does anyone have any tips on how to keep CSS organ…

---

## [A kind of monkey patch and an invitation for criticism for all you (who know this stuff better than](https://www.ruby-forum.com/t/a-kind-of-monkey-patch-and-an-invitation-for-criticism-for-all-you-who-know-this-stuff-better-than/130860)

<div class="topic-metadata">

**Author:** [@ara\_vartanian](https://www.ruby-forum.com/u/ara_vartanian)\
**Replies:** 0\
**Last updated:** [March 4, 2008, 12:08am UTC](https://www.ruby-forum.com/t/a-kind-of-monkey-patch-and-an-invitation-for-criticism-for-all-you-who-know-this-stuff-better-than/130860 "2008-03-04T00:08:45Z")

</div>

I’ve often felt the need including Rails’ view helpers within my controllers, if only for some simple things like formatting my flash notices with text helpers or html escaping. I loved this suggestion, which helps by…

---

## [Detecting dead/unreachable code](https://www.ruby-forum.com/t/detecting-dead-unreachable-code/130857)

<div class="topic-metadata">

**Author:** [@jamie](https://www.ruby-forum.com/u/jamie)\
**Replies:** 1\
**Last updated:** [March 4, 2008, 12:06am UTC](https://www.ruby-forum.com/t/detecting-dead-unreachable-code/130857 "2008-03-04T00:06:59Z")

</div>

Is anyone aware of a tool for detecting dead/unreachable code in an RonR app?

---

## [Newb question regarding activerecord relationships](https://www.ruby-forum.com/t/newb-question-regarding-activerecord-relationships/130847)

<div class="topic-metadata">

**Author:** [@nateleavitt](https://www.ruby-forum.com/u/nateleavitt)\
**Replies:** 1\
**Last updated:** [March 3, 2008, 11:59pm UTC](https://www.ruby-forum.com/t/newb-question-regarding-activerecord-relationships/130847 "2008-03-03T23:59:44Z")

</div>

Hi Guys, I’ve tried searching for this, but haven’t come up with the answers. Sorry, this is a basic question, so sorry for the newb-ness. Ok so I’m putting together a ruby report that uses ActiveRecord. I will expl…

---

## [How do I get the CalendarDateSelect plugin to work i Rails 2.0.2](https://www.ruby-forum.com/t/how-do-i-get-the-calendardateselect-plugin-to-work-i-rails-2-0-2/130688)

<div class="topic-metadata">

**Author:** [@Fredrik\_K](https://www.ruby-forum.com/u/Fredrik_K)\
**Replies:** 2\
**Last updated:** [March 3, 2008, 10:34pm UTC](https://www.ruby-forum.com/t/how-do-i-get-the-calendardateselect-plugin-to-work-i-rails-2-0-2/130688 "2008-03-03T22:34:10Z")

</div>

Hi, I am new to rails and found areally nice looking plugin for date selection here: http://code.google.com/p/calendardateselect/ I have installed it according to the instructions, but when I try to change one of th…

---

## [Rails - DB Question](https://www.ruby-forum.com/t/rails-db-question/130828)

<div class="topic-metadata">

**Author:** [@pete](https://www.ruby-forum.com/u/pete)\
**Replies:** 4\
**Last updated:** [March 3, 2008, 10:17pm UTC](https://www.ruby-forum.com/t/rails-db-question/130828 "2008-03-03T22:17:38Z")

</div>

Hi- This is more of a DB question…but say I have a model that has a field that I want to populate with specific items, see below for an example. What is the best way to do this in Rails? Model: name, type, date - w…

---

## [Mongrel Dies](https://www.ruby-forum.com/t/mongrel-dies/130848)

<div class="topic-metadata">

**Author:** [@alg](https://www.ruby-forum.com/u/alg)\
**Replies:** 0\
**Last updated:** [March 3, 2008, 10:16pm UTC](https://www.ruby-forum.com/t/mongrel-dies/130848 "2008-03-03T22:16:27Z")

</div>

Hey guys! A problem popped up today with Mongrel. Its process continues to die and I seem can’t locate the reason. Logs are clear, and PID is left untouched, but the process is gone. Currently I’m pinging a server ov…

---

## [Share AR connection config and Models](https://www.ruby-forum.com/t/share-ar-connection-config-and-models/130846)

<div class="topic-metadata">

**Author:** [@PaSSS\_lo\_Geyer](https://www.ruby-forum.com/u/PaSSS_lo_Geyer)\
**Replies:** 0\
**Last updated:** [March 3, 2008, 10:14pm UTC](https://www.ruby-forum.com/t/share-ar-connection-config-and-models/130846 "2008-03-03T22:14:07Z")

</div>

Hi, how do i share my AR connection configuration and Models from one app with an Ruby application?

---

## [2 Full time Ruby positions Located in New York City](https://www.ruby-forum.com/t/2-full-time-ruby-positions-located-in-new-york-city/130845)

<div class="topic-metadata">

**Author:** [@Lisav2474](https://www.ruby-forum.com/u/Lisav2474)\
**Replies:** 0\
**Last updated:** [March 3, 2008, 9:36pm UTC](https://www.ruby-forum.com/t/2-full-time-ruby-positions-located-in-new-york-city/130845 "2008-03-03T21:36:46Z")

</div>

Good afternoon Folks! My name is Lisa Vella-Alvarado. I work for a recruitiment firm located in New York called Addison Search. I have (2) clients right now seeking experience Ruby on Rails developers. 1st- Need a …

---

## [Testing webservices in Integration Tests with Jamis Buck's r](https://www.ruby-forum.com/t/testing-webservices-in-integration-tests-with-jamis-bucks-r/112332)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [March 3, 2008, 9:35pm UTC](https://www.ruby-forum.com/t/testing-webservices-in-integration-tests-with-jamis-bucks-r/112332 "2008-03-03T21:35:28Z")

</div>

Hello, I’m using Jamis B.'s recipe to do integration tests on an application, but I got a nil.recycle! error while doing a webservice call. This is the situation. def test\_uploading\_data invoke :upload, data invok…

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

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