# Rails

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

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

---

## [Inserting to a table that has a foreign key](https://www.ruby-forum.com/t/inserting-to-a-table-that-has-a-foreign-key/103631)

<div class="topic-metadata">

**Author:** [@fivetimes](https://www.ruby-forum.com/u/fivetimes)\
**Replies:** 4\
**Last updated:** [May 8, 2007, 6:26pm UTC](https://www.ruby-forum.com/t/inserting-to-a-table-that-has-a-foreign-key/103631 "2007-05-08T18:26:31Z")

</div>

Hi, I’m new to ruby on rails and I’m working on a very small project. I’m in the very early stages of development and I’m already stuck. Here’s the problem: I have two tables: programs program\_id primary key auto\_…

---

## [Installation after XAMPP](https://www.ruby-forum.com/t/installation-after-xampp/103569)

<div class="topic-metadata">

**Author:** [@Diogo\_Baeder](https://www.ruby-forum.com/u/Diogo_Baeder)\
**Replies:** 1\
**Last updated:** [May 8, 2007, 6:11pm UTC](https://www.ruby-forum.com/t/installation-after-xampp/103569 "2007-05-08T18:11:58Z")

</div>

Hi, guys, I’ve got XAMPP 1.6.1 installed, here, and tried to install Rails to start learning it. But I’m a real newbie to port and network configuration, so I don’t know how to configure Rails to run at my localhost. …

---

## [Counter cache for average](https://www.ruby-forum.com/t/counter-cache-for-average/103549)

<div class="topic-metadata">

**Author:** [@rlwinter](https://www.ruby-forum.com/u/rlwinter)\
**Replies:** 2\
**Last updated:** [May 8, 2007, 6:01pm UTC](https://www.ruby-forum.com/t/counter-cache-for-average/103549 "2007-05-08T18:01:27Z")

</div>

Hello list, I’m curious if Rails has built-in support similar to :counter\_cache for other type of aggregate values such as average, min, max, etc? If not, does a plugin exist that adds this functionality to Rails?

---

## [How to get TinyMCE editor value( text content)](https://www.ruby-forum.com/t/how-to-get-tinymce-editor-value-text-content/103056)

<div class="topic-metadata">

**Author:** [@veeraa2003](https://www.ruby-forum.com/u/veeraa2003)\
**Replies:** 3\
**Last updated:** [May 8, 2007, 5:01pm UTC](https://www.ruby-forum.com/t/how-to-get-tinymce-editor-value-text-content/103056 "2007-05-08T17:01:28Z")

</div>

Hi everybody ! I included one tinymce editor in my rails application. But I cant get the textarea content from the tiny editor. I dont know how to include the submit button . And also I wrote a javascript for getting…

---

## [ActiveRecord::RecordNotFound error](https://www.ruby-forum.com/t/activerecord-recordnotfound-error/103618)

<div class="topic-metadata">

**Author:** [@aginghipster](https://www.ruby-forum.com/u/aginghipster)\
**Replies:** 2\
**Last updated:** [May 8, 2007, 4:51pm UTC](https://www.ruby-forum.com/t/activerecord-recordnotfound-error/103618 "2007-05-08T16:51:48Z")

</div>

I was having problems with ActiveRecord::RecordNotFound in my code, so did a search on the forum here, and I got an application error. search string: ActiveRecord::RecordNotFound I am just reporting this so somebody …

---

## [Running my app in "production" under webrick](https://www.ruby-forum.com/t/running-my-app-in-production-under-webrick/103607)

<div class="topic-metadata">

**Author:** [@pingu](https://www.ruby-forum.com/u/pingu)\
**Replies:** 8\
**Last updated:** [May 8, 2007, 4:40pm UTC](https://www.ruby-forum.com/t/running-my-app-in-production-under-webrick/103607 "2007-05-08T16:40:46Z")

</div>

hi, uncommenting the line ENV\[‘RAILS\_ENV’\] ||= ‘production’, in environment.rb makes no difference to my rails app running under webrick, it still runs in development, and i have restarted the server. Does this line o…

---

## [Editable](https://www.ruby-forum.com/t/editable/103622)

<div class="topic-metadata">

**Author:** [@selvaraj](https://www.ruby-forum.com/u/selvaraj)\
**Replies:** 5\
**Last updated:** [May 8, 2007, 3:52pm UTC](https://www.ruby-forum.com/t/editable/103622 "2007-05-08T15:52:20Z")

</div>

In Rails is there editable combo box?

---

## [Problem in Vcard generation](https://www.ruby-forum.com/t/problem-in-vcard-generation/103405)

<div class="topic-metadata">

**Author:** [@selvaraj](https://www.ruby-forum.com/u/selvaraj)\
**Replies:** 1\
**Last updated:** [May 8, 2007, 3:27pm UTC](https://www.ruby-forum.com/t/problem-in-vcard-generation/103405 "2007-05-08T15:27:15Z")

</div>

I am trying to explore the vpim gem… Using that i am trying to generate Vcard…Now I am able to generate vcard also i am able to send that vcard through mail. If i try to open that vcard through thunderbird, all the fi…

---

## [Rails routing without slash separator](https://www.ruby-forum.com/t/rails-routing-without-slash-separator/103597)

<div class="topic-metadata">

**Author:** [@asetzler](https://www.ruby-forum.com/u/asetzler)\
**Replies:** 2\
**Last updated:** [May 8, 2007, 3:24pm UTC](https://www.ruby-forum.com/t/rails-routing-without-slash-separator/103597 "2007-05-08T15:24:32Z")

</div>

Hey all… I’m here with a bit of a gripe that I hope somebody can help me with… Basically I don’t want to use slashes as seperators for routes in rails… is this possible? if so how? I’ve got a designer that needs t…

---

## [Assigning default values to attributes in a has\_one associat](https://www.ruby-forum.com/t/assigning-default-values-to-attributes-in-a-has-one-associat/103617)

<div class="topic-metadata">

**Author:** [@pixellover](https://www.ruby-forum.com/u/pixellover)\
**Replies:** 0\
**Last updated:** [May 8, 2007, 2:51pm UTC](https://www.ruby-forum.com/t/assigning-default-values-to-attributes-in-a-has-one-associat/103617 "2007-05-08T14:51:23Z")

</div>

Hi List, I’ve a little problem here, for which I can’t find a solution: I have two models, person and event. Event is a polymorphic association (timeable). In my person model I would like to define an association wi…

---

## [Validation question](https://www.ruby-forum.com/t/validation-question/103606)

<div class="topic-metadata">

**Author:** [@John\_McAuley](https://www.ruby-forum.com/u/John_McAuley)\
**Replies:** 4\
**Last updated:** [May 8, 2007, 1:46pm UTC](https://www.ruby-forum.com/t/validation-question/103606 "2007-05-08T13:46:10Z")

</div>

Hello all, I have a controller with a couple of actions and one model. The model is as so: validates\_presence\_of :name, :email, :name validates\_presence\_of :password, :password\_confirmation The first action is creat…

---

## [How to SQL-escape user input/do SQL-LIKE thru AR?](https://www.ruby-forum.com/t/how-to-sql-escape-user-input-do-sql-like-thru-ar/103577)

<div class="topic-metadata">

**Author:** [@sbeam](https://www.ruby-forum.com/u/sbeam)\
**Replies:** 1\
**Last updated:** [May 8, 2007, 11:53am UTC](https://www.ruby-forum.com/t/how-to-sql-escape-user-input-do-sql-like-thru-ar/103577 "2007-05-08T11:53:55Z")

</div>

AR insists on escaping user input when using the find() method, which is commendable. But what if you need the equivalent of SELECT \* FROM user WHERE email LIKE ‘%#{params\[:terms\]}%’ ?? putting :conditions =\> \[“emai…

---

## [Help test a new Rails app](https://www.ruby-forum.com/t/help-test-a-new-rails-app/103598)

<div class="topic-metadata">

**Author:** [@joost](https://www.ruby-forum.com/u/joost)\
**Replies:** 0\
**Last updated:** [May 8, 2007, 9:45am UTC](https://www.ruby-forum.com/t/help-test-a-new-rails-app/103598 "2007-05-08T09:45:56Z")

</div>

Hi Railsies, A new Rails app is about to launch in about a month, and I am looking for people to help test it. It’s a small application which fills a fun niche, but that’s all I want to say about it at this moment. I…

---

## [Problems rendering templates for different mime-types](https://www.ruby-forum.com/t/problems-rendering-templates-for-different-mime-types/103503)

<div class="topic-metadata">

**Author:** [@pixellover](https://www.ruby-forum.com/u/pixellover)\
**Replies:** 1\
**Last updated:** [May 8, 2007, 9:34am UTC](https://www.ruby-forum.com/t/problems-rendering-templates-for-different-mime-types/103503 "2007-05-08T09:34:55Z")

</div>

Hi list, I’ve got a little problem with rendering different mime-types. For example, I would like to append “.pdf” to my URL to generate a PDF. Appending “.pdf” to the url tells rails which part of the respond\_to bl…

---

## [Problem validating boolean](https://www.ruby-forum.com/t/problem-validating-boolean/103072)

<div class="topic-metadata">

**Author:** [@Ashley\_M](https://www.ruby-forum.com/u/Ashley_M)\
**Replies:** 2\
**Last updated:** [May 8, 2007, 9:17am UTC](https://www.ruby-forum.com/t/problem-validating-boolean/103072 "2007-05-08T09:17:53Z")

</div>

Hi I’ve got a problem validating a boolean and I can’t see what the problem is. Here’s my model: class FinanceAgreement \< ActiveRecord::Base belongs\_to :asset validates\_presence\_of :finance\_company validates\_incl…

---

## [Best ACl plugin?](https://www.ruby-forum.com/t/best-acl-plugin/103509)

<div class="topic-metadata">

**Author:** [@patcito](https://www.ruby-forum.com/u/patcito)\
**Replies:** 5\
**Last updated:** [May 8, 2007, 8:54am UTC](https://www.ruby-forum.com/t/best-acl-plugin/103509 "2007-05-08T08:54:51Z")

</div>

hey all, I need some ACL features for my users. Any advice what’s the best? I was thinking about http://agilewebdevelopment.com/plugins/acl\_system because it looks simple. any idea? thanx in advance Pat

---

## [How: varibale as the parameter in params\[\]](https://www.ruby-forum.com/t/how-varibale-as-the-parameter-in-params/103595)

<div class="topic-metadata">

**Author:** [@ichikawa](https://www.ruby-forum.com/u/ichikawa)\
**Replies:** 0\
**Last updated:** [May 8, 2007, 8:50am UTC](https://www.ruby-forum.com/t/how-varibale-as-the-parameter-in-params/103595 "2007-05-08T08:50:08Z")

</div>

hi guys, In my rails rhtml page I have several check box named as param0, param1…param9. in my controller method I want to obtain the value by a loop. I have generated the name of the post values by this code: @tot…

---

## [Rake rails:update:javascripts fails in 1.2](https://www.ruby-forum.com/t/rake-railsjavascripts-fails-in-1-2/103584)

<div class="topic-metadata">

**Author:** [@joe](https://www.ruby-forum.com/u/joe)\
**Replies:** 4\
**Last updated:** [May 8, 2007, 8:39am UTC](https://www.ruby-forum.com/t/rake-railsjavascripts-fails-in-1-2/103584 "2007-05-08T08:39:21Z")

</div>

What’s up with this? $ rake rails:update:javascripts (in /var/www/apps/releases/20061027204658) rake aborted! undefined method \`gem’ for main:Object /var/www/apps/releases/20061027204658/Rakefile:4

---

## [Back to Rails 1.1.x!](https://www.ruby-forum.com/t/back-to-rails-1-1-x/103593)

<div class="topic-metadata">

**Author:** [@joe](https://www.ruby-forum.com/u/joe)\
**Replies:** 4\
**Last updated:** [May 8, 2007, 8:33am UTC](https://www.ruby-forum.com/t/back-to-rails-1-1-x/103593 "2007-05-08T08:33:18Z")

</div>

I’m tired of fvcking around trying to get Rails 1.2.x to work. My named routes wouldn’t work or get generated correctly. The upgrade docs made no mention that rubygems also needed to be updated (which causes many prob…

---

## [Named\_route\_url broken in 1.2?](https://www.ruby-forum.com/t/named-route-url-broken-in-1-2/103581)

<div class="topic-metadata">

**Author:** [@joe](https://www.ruby-forum.com/u/joe)\
**Replies:** 3\
**Last updated:** [May 8, 2007, 8:25am UTC](https://www.ruby-forum.com/t/named-route-url-broken-in-1-2/103581 "2007-05-08T08:25:32Z")

</div>

Wow, I sure have wasted a lot of time trying to get my named routes to work in Rails 1.2. Everything worked fine in 1.1. I’m ready to kill whoever rewrote the routing and broke BC. My routes: #map.item ‘item/:id’, :co…

---

## [Find-all with polymorphic association?](https://www.ruby-forum.com/t/find-all-with-polymorphic-association/103558)

<div class="topic-metadata">

**Author:** [@Gisborne](https://www.ruby-forum.com/u/Gisborne)\
**Replies:** 5\
**Last updated:** [May 8, 2007, 8:04am UTC](https://www.ruby-forum.com/t/find-all-with-polymorphic-association/103558 "2007-05-08T08:04:48Z")

</div>

I have this: class Document \< ActiveRecord::Base belongs\_to :documentable, :polymorphic =\> true and this: class Task \< ActiveRecord::Base has\_many :documents, :as =\> :documentable This, on Document, doesn’t work: d…

---

## [Session ID huge, please help](https://www.ruby-forum.com/t/session-id-huge-please-help/103592)

<div class="topic-metadata">

**Author:** [@benjohnson](https://www.ruby-forum.com/u/benjohnson)\
**Replies:** 3\
**Last updated:** [May 8, 2007, 7:34am UTC](https://www.ruby-forum.com/t/session-id-huge-please-help/103592 "2007-05-08T07:34:45Z")

</div>

I keep getting cookie overflow because my session id is getting huge. Here it is right out of my log: Processing CompanyBranchesController#overview (for 127.0.0.1 at 2007-05-08 04:53:35) \[GET\] Session ID: BAh7CDoRaW…

---

## [How downloading image in rails](https://www.ruby-forum.com/t/how-downloading-image-in-rails/103531)

<div class="topic-metadata">

**Author:** [@veeraa2003](https://www.ruby-forum.com/u/veeraa2003)\
**Replies:** 2\
**Last updated:** [May 8, 2007, 7:19am UTC](https://www.ruby-forum.com/t/how-downloading-image-in-rails/103531 "2007-05-08T07:19:20Z")

</div>

Hi everybody, I want to display a link for downloading image from database. def image @image = Classified.find(params\[:id\]) send\_data @image.picture, :filename =\> “photo.jpg”, :type =\> @image.content\_type, :disposit…

---

## [Link\_to\_remote issue in edge rails](https://www.ruby-forum.com/t/link-to-remote-issue-in-edge-rails/103481)

<div class="topic-metadata">

**Author:** [@adam](https://www.ruby-forum.com/u/adam)\
**Replies:** 2\
**Last updated:** [May 8, 2007, 6:45am UTC](https://www.ruby-forum.com/t/link-to-remote-issue-in-edge-rails/103481 "2007-05-08T06:45:42Z")

</div>

Hi, I have the following link\_to\_remote function \<%=link\_to\_remote ‘up’, :url =\> {:controller =\> ‘maintain\_votes’, :action =\> ‘blog\_comments\_vote’, :id =\> blog\_comments\_show.id, :vote =\> ‘true’ }%\> | which generates…

---

## [Postgres and data type text issue](https://www.ruby-forum.com/t/postgres-and-data-type-text-issue/103589)

<div class="topic-metadata">

**Author:** [@rickf](https://www.ruby-forum.com/u/rickf)\
**Replies:** 0\
**Last updated:** [May 8, 2007, 5:25am UTC](https://www.ruby-forum.com/t/postgres-and-data-type-text-issue/103589 "2007-05-08T05:25:24Z")

</div>

Hi Gurus, I have a Postggres field as a data type of text that is used to hold some configuration information in ini file format. This is a legacy application db. The current requirement is for the text field to be n…

---

## [Integration Testing](https://www.ruby-forum.com/t/integration-testing/103588)

<div class="topic-metadata">

**Author:** [@Traci\_Reynolds](https://www.ruby-forum.com/u/Traci_Reynolds)\
**Replies:** 0\
**Last updated:** [May 8, 2007, 5:16am UTC](https://www.ruby-forum.com/t/integration-testing/103588 "2007-05-08T05:16:38Z")

</div>

I’m using integration testing, with multiple sessions. For the typical example, a module extends a session, like here: http://weblog.jamisbuck.org/2006/3/9/integration-testing-in-rails-1-1 For my testing, I would like…

---

## [\[Radiant\] 404 error messages](https://www.ruby-forum.com/t/radiant-404-error-messages/103582)

<div class="topic-metadata">

**Author:** [@Charles\_ASLandemai](https://www.ruby-forum.com/u/Charles_ASLandemai)\
**Replies:** 0\
**Last updated:** [May 8, 2007, 3:21am UTC](https://www.ruby-forum.com/t/radiant-404-error-messages/103582 "2007-05-08T03:21:05Z")

</div>

Hello, I tried to install Radiant, it seems to be almost installed, but the links are broken (and the style sheet is unaccessible). Here’s the content of my /home/charles/www/radiant/public/.htaccess: General Apache …

---

## [Attachment\_fu seems to be searching the wrong location for m](https://www.ruby-forum.com/t/attachment-fu-seems-to-be-searching-the-wrong-location-for-m/103563)

<div class="topic-metadata">

**Author:** [@scott](https://www.ruby-forum.com/u/scott)\
**Replies:** 1\
**Last updated:** [May 8, 2007, 3:09am UTC](https://www.ruby-forum.com/t/attachment-fu-seems-to-be-searching-the-wrong-location-for-m/103563 "2007-05-08T03:09:32Z")

</div>

I just installed attachment\_fu and for some reason, it seems to be looking in the wrong location for my images. I have a Product model that belongs to a photo model. the photo model has the attachment\_fu installed and…

---

## [:through difficulties](https://www.ruby-forum.com/t/through-difficulties/103451)

<div class="topic-metadata">

**Author:** [@will](https://www.ruby-forum.com/u/will)\
**Replies:** 2\
**Last updated:** [May 8, 2007, 3:09am UTC](https://www.ruby-forum.com/t/through-difficulties/103451 "2007-05-08T03:09:32Z")

</div>

I’m trying to use :through on a many-to-many relationship. I’ve got the following three models: class User \< ActiveRecord::Base has\_many :authors has\_many :submissions, :through =\> :authors class Author \< ActiveReco…

---

## [Question for apache gurus -- error messages during load test](https://www.ruby-forum.com/t/question-for-apache-gurus-error-messages-during-load-test/103580)

<div class="topic-metadata">

**Author:** [@rsanheim](https://www.ruby-forum.com/u/rsanheim)\
**Replies:** 0\
**Last updated:** [May 8, 2007, 3:04am UTC](https://www.ruby-forum.com/t/question-for-apache-gurus-error-messages-during-load-test/103580 "2007-05-08T03:04:32Z")

</div>

I’m doing some httperf’ing, and when I’m cranking the load high I see things like this in apache: \[Mon May 07 19:45:18 2007\] \[debug\] proxy\_util.c(1724): proxy: initialized single connection worker 12 in child 8499 for…

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

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