# Rails

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

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

---

## [Js request / rendering issues](https://www.ruby-forum.com/t/js-request-rendering-issues/157424)

<div class="topic-metadata">

**Author:** [@chrisolsen](https://www.ruby-forum.com/u/chrisolsen)\
**Replies:** 0\
**Last updated:** [January 11, 2009, 4:39am UTC](https://www.ruby-forum.com/t/js-request-rendering-issues/157424 "2009-01-11T04:39:03Z")

</div>

Two issues: Why does rails have a hard time detecting js calls? If I make a jquery ajax request to foo/bar it fails, but if I append a js extension it passes =\> foo/bar.js. It seems that ror ignores the request hea…

---

## [Testing data from a file](https://www.ruby-forum.com/t/testing-data-from-a-file/157291)

<div class="topic-metadata">

**Author:** [@sijomo](https://www.ruby-forum.com/u/sijomo)\
**Replies:** 2\
**Last updated:** [January 11, 2009, 1:44am UTC](https://www.ruby-forum.com/t/testing-data-from-a-file/157291 "2009-01-11T01:44:25Z")

</div>

Hi, I have some functional tests that require XML input that gets set into the RAW\_POST\_DATA. I would like to get the XML for each tests from files (to save having lots of XML in my test.rb. Is there anything in the …

---

## [Hel using paperclip + imagemagick](https://www.ruby-forum.com/t/hel-using-paperclip-imagemagick/157418)

<div class="topic-metadata">

**Author:** [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Replies:** 1\
**Last updated:** [January 11, 2009, 1:37am UTC](https://www.ruby-forum.com/t/hel-using-paperclip-imagemagick/157418 "2009-01-11T01:37:56Z")

</div>

I use paperclip to upload images and works great, but I am unable to resize them with imagemagick. All my photos are in system/public/photos and then in /11/original or 12/originial, for example. It is suppossed to be…

---

## [Experimental plugin: Rack-based after\_filter-ish behavior](https://www.ruby-forum.com/t/experimental-plugin-rack-based-after-filter-ish-behavior/157416)

<div class="topic-metadata">

**Author:** [@David\_ASBlack](https://www.ruby-forum.com/u/David_ASBlack)\
**Replies:** 0\
**Last updated:** [January 11, 2009, 12:51am UTC](https://www.ruby-forum.com/t/experimental-plugin-rack-based-after-filter-ish-behavior/157416 "2009-01-11T00:51:09Z")

</div>

Hi – I’ve been working on a per-action Rack-based after\_filter-like facility, and I thought others might like to see the experiment (and I do consider it experimental). It’s a plugin called after\_middles, at: git://g…

---

## [Help resizing mages](https://www.ruby-forum.com/t/help-resizing-mages/157411)

<div class="topic-metadata">

**Author:** [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Replies:** 1\
**Last updated:** [January 10, 2009, 11:56pm UTC](https://www.ruby-forum.com/t/help-resizing-mages/157411 "2009-01-10T23:56:40Z")

</div>

I have a web in development. I need to upload some images and to resize them in a form. I am able to upload some imags thanks to paperclip, but I have problems resizing this images. I am becaming mad trying to make wo…

---

## [Help resizing images](https://www.ruby-forum.com/t/help-resizing-images/196877)

<div class="topic-metadata">

**Author:** [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Replies:** 1\
**Last updated:** [January 10, 2009, 10:45pm UTC](https://www.ruby-forum.com/t/help-resizing-images/196877 "2009-01-10T22:45:15Z")

</div>

I have a web in development. I need to upload some images and to resize them in a form. I am able to upload some imags thanks to paperclip, but I have problems resizing this images. I am becaming mad trying to make wo…

---

## [HABTM Question w/ checkboxes](https://www.ruby-forum.com/t/habtm-question-w-checkboxes/157408)

<div class="topic-metadata">

**Author:** [@clemrock](https://www.ruby-forum.com/u/clemrock)\
**Replies:** 0\
**Last updated:** [January 10, 2009, 9:27pm UTC](https://www.ruby-forum.com/t/habtm-question-w-checkboxes/157408 "2009-01-10T21:27:11Z")

</div>

Hello, I have an address table that has a HABTM relationship w/ a preferences table. I want to set the preferences table to handle a variety of preferences for each address. For instance, for each address the pr…

---

## [Forms fields pre-populating w/ first record's values](https://www.ruby-forum.com/t/forms-fields-pre-populating-w-first-records-values/156622)

<div class="topic-metadata">

**Author:** [@clemrock](https://www.ruby-forum.com/u/clemrock)\
**Replies:** 3\
**Last updated:** [January 10, 2009, 9:26pm UTC](https://www.ruby-forum.com/t/forms-fields-pre-populating-w-first-records-values/156622 "2009-01-10T21:26:10Z")

</div>

I have a strange situation. I want to have a create\_user form w/ all the fields blank When I call the create\_user method, the corresponding create\_user.html.erb form is displaying the first record’s data from the …

---

## [Anyone Recommend a File Uploader](https://www.ruby-forum.com/t/anyone-recommend-a-file-uploader/157117)

<div class="topic-metadata">

**Author:** [@dnstevenson](https://www.ruby-forum.com/u/dnstevenson)\
**Replies:** 19\
**Last updated:** [January 10, 2009, 8:41pm UTC](https://www.ruby-forum.com/t/anyone-recommend-a-file-uploader/157117 "2009-01-10T20:41:01Z")

</div>

Can anyone recommend a good file upload plugin for uploading standard files (more than one file per article / project), but I am not interested in images or image processing, just a standard uploader for files!

---

## [\[ANN/ADV\] Ruby Best Practices twitter feed](https://www.ruby-forum.com/t/ann-adv-ruby-best-practices-twitter-feed/196876)

<div class="topic-metadata">

**Author:** [@naething](https://www.ruby-forum.com/u/naething)\
**Replies:** 1\
**Last updated:** [January 10, 2009, 8:36pm UTC](https://www.ruby-forum.com/t/ann-adv-ruby-best-practices-twitter-feed/196876 "2009-01-10T20:36:55Z")

</div>

Hi folks, Sorry to spam, but I wanted to let those interested in my book “Ruby Best Practices”\[0\] know that I’ve started up a twitter feed\[1\] to keep folks informed of the book progress. Because this book will become…

---

## [How can I set selected value on select\_tag](https://www.ruby-forum.com/t/how-can-i-set-selected-value-on-select-tag/157306)

<div class="topic-metadata">

**Author:** [@youhaodeyi](https://www.ruby-forum.com/u/youhaodeyi)\
**Replies:** 2\
**Last updated:** [January 10, 2009, 8:35pm UTC](https://www.ruby-forum.com/t/how-can-i-set-selected-value-on-select-tag/157306 "2009-01-10T20:35:56Z")

</div>

This is my select\_tag code: \<%=select\_tag ‘project\_version\_select’, options\_for\_select(@project\_versions)%\> How can I set the selected value for this select box?

---

## [Mailing List app?](https://www.ruby-forum.com/t/mailing-list-app/157403)

<div class="topic-metadata">

**Author:** [@Brandon\_Martin](https://www.ruby-forum.com/u/Brandon_Martin)\
**Replies:** 0\
**Last updated:** [January 10, 2009, 6:56pm UTC](https://www.ruby-forum.com/t/mailing-list-app/157403 "2009-01-10T18:56:28Z")

</div>

I am looking to create a mailing list app to try and help learn rails plus it will be useful for a project that I am working on. I was wondering if there is already one of these available to use as a guide? Here is wh…

---

## [Detect column type?](https://www.ruby-forum.com/t/detect-column-type/157398)

<div class="topic-metadata">

**Author:** [@taylorstrait](https://www.ruby-forum.com/u/taylorstrait)\
**Replies:** 2\
**Last updated:** [January 10, 2009, 6:35pm UTC](https://www.ruby-forum.com/t/detect-column-type/157398 "2009-01-10T18:35:07Z")

</div>

Using column\_names I can get a nice list of columns in a table, but is there any way to detect the column type? Like “string”, “integer”, “boolean”, etc?

---

## [Accessing request.host in UserMailer](https://www.ruby-forum.com/t/accessing-request-host-in-usermailer/157355)

<div class="topic-metadata">

**Author:** [@tharrisx](https://www.ruby-forum.com/u/tharrisx)\
**Replies:** 6\
**Last updated:** [January 10, 2009, 6:30pm UTC](https://www.ruby-forum.com/t/accessing-request-host-in-usermailer/157355 "2009-01-10T18:30:42Z")

</div>

I am using subdomains in my application to control context. Therefor, during user registration, password reset, and other actions that require an email to be sent with a link to be clicked, I need to ensure that the s…

---

## [Will\_paginate with include option](https://www.ruby-forum.com/t/will-paginate-with-include-option/157399)

<div class="topic-metadata">

**Author:** [@ankit2584](https://www.ruby-forum.com/u/ankit2584)\
**Replies:** 0\
**Last updated:** [January 10, 2009, 6:10pm UTC](https://www.ruby-forum.com/t/will-paginate-with-include-option/157399 "2009-01-10T18:10:58Z")

</div>

Hello, I am using will\_paginate and want to use eager loading. but when i use the include and order option i get an error. I am using mssqlserver2000 as database @people = Person.paginate(:include=\>\[:relations\],:con…

---

## [Freeze doesn't work!](https://www.ruby-forum.com/t/freeze-doesnt-work/157396)

<div class="topic-metadata">

**Author:** [@rubyernewbie](https://www.ruby-forum.com/u/rubyernewbie)\
**Replies:** 1\
**Last updated:** [January 10, 2009, 4:08pm UTC](https://www.ruby-forum.com/t/freeze-doesnt-work/157396 "2009-01-10T16:08:41Z")

</div>

I have a rails 2.2.2, but recently I receive a project need rails 2.1.2 environment. So I swith to the project directory to freeze the rails version. rake rails:freeze:edge TAG=rel\_2-1-2 I got a shocked when I script…

---

## [General Question about route generation Rails 2+](https://www.ruby-forum.com/t/general-question-about-route-generation-rails-2/157394)

<div class="topic-metadata">

**Author:** [@Jferg](https://www.ruby-forum.com/u/Jferg)\
**Replies:** 0\
**Last updated:** [January 10, 2009, 3:22pm UTC](https://www.ruby-forum.com/t/general-question-about-route-generation-rails-2/157394 "2009-01-10T15:22:22Z")

</div>

I have been searching for the definitive answers regarding routes and new controllers, so far no clear statement: Rails 2+ route generation, is it done only once at start up of mongrel? Is this only a dependency on …

---

## [Ignore default responds\_to behavior](https://www.ruby-forum.com/t/ignore-default-responds-to-behavior/157373)

<div class="topic-metadata">

**Author:** [@tim](https://www.ruby-forum.com/u/tim)\
**Replies:** 1\
**Last updated:** [January 10, 2009, 3:21pm UTC](https://www.ruby-forum.com/t/ignore-default-responds-to-behavior/157373 "2009-01-10T15:21:12Z")

</div>

Hi everyone, I’m trying to ignore the default behavior of respond\_to…format.html. Let me explain. By default def index loads the index.html.erb view, I created a new method called def show\_open\_tickets, well I don’…

---

## [Upload to Flickr or Picasa and Google Video or YouTube](https://www.ruby-forum.com/t/upload-to-flickr-or-picasa-and-google-video-or-youtube/157392)

<div class="topic-metadata">

**Author:** [@Walter\_Lockhart](https://www.ruby-forum.com/u/Walter_Lockhart)\
**Replies:** 0\
**Last updated:** [January 10, 2009, 2:37pm UTC](https://www.ruby-forum.com/t/upload-to-flickr-or-picasa-and-google-video-or-youtube/157392 "2009-01-10T14:37:47Z")

</div>

Hi Group, I am trying to develop a Ruby on Rails Mashup which includes images and video. Would someone kindly direct me to a Ruby on Rails tutorial / code sample on: (1) Uploading an Image to Flickr or Google Picasa…

---

## [Partials and comments and other fun things!](https://www.ruby-forum.com/t/partials-and-comments-and-other-fun-things/157213)

<div class="topic-metadata">

**Author:** [@rsm](https://www.ruby-forum.com/u/rsm)\
**Replies:** 9\
**Last updated:** [January 10, 2009, 1:49pm UTC](https://www.ruby-forum.com/t/partials-and-comments-and-other-fun-things/157213 "2009-01-10T13:49:07Z")

</div>

Hey folks, first timer here so be gentle. I have a messages page which uses a partial to display comments for each message for an article and a little box under each message so people can comment on that message. loca…

---

## [Urgent Output Layout](https://www.ruby-forum.com/t/urgent-output-layout/157382)

<div class="topic-metadata">

**Author:** [@rakenewuser](https://www.ruby-forum.com/u/rakenewuser)\
**Replies:** 2\
**Last updated:** [January 10, 2009, 1:48pm UTC](https://www.ruby-forum.com/t/urgent-output-layout/157382 "2009-01-10T13:48:32Z")

</div>

Hi, Anyone can help me on how to layout my output? See my source code; Start Here report = Hash.new PTable.all(:conditions =\> \[‘status = “success” AND created\_at \>= ? AND created\_at \< ?’, Date.today.midnight, Date.to…

---

## [Getting 500 internal server error on upload](https://www.ruby-forum.com/t/getting-500-internal-server-error-on-upload/157390)

<div class="topic-metadata">

**Author:** [@priya](https://www.ruby-forum.com/u/priya)\
**Replies:** 0\
**Last updated:** [January 10, 2009, 1:33pm UTC](https://www.ruby-forum.com/t/getting-500-internal-server-error-on-upload/157390 "2009-01-10T13:33:18Z")

</div>

Hi all , I have a application where i try to upload a csv file and parse the input. I am getting “500 internal server error” after clicking upload. However the file got uploaded correctly at the destination location.…

---

## [Default view format / fleximage](https://www.ruby-forum.com/t/default-view-format-fleximage/157388)

<div class="topic-metadata">

**Author:** [@rob](https://www.ruby-forum.com/u/rob)\
**Replies:** 0\
**Last updated:** [January 10, 2009, 12:34pm UTC](https://www.ruby-forum.com/t/default-view-format-fleximage/157388 "2009-01-10T12:34:44Z")

</div>

I’ve been having a problem of late with view formats. I am using the FlexImage plugin to provide thumbnailing which adds its own view tempaltes. I would usually access a my resource via http://localhost:3000/photos/1 …

---

## [Has\_many in routes.rb](https://www.ruby-forum.com/t/has-many-in-routes-rb/157384)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 0\
**Last updated:** [January 10, 2009, 11:16am UTC](https://www.ruby-forum.com/t/has-many-in-routes-rb/157384 "2009-01-10T11:16:02Z")

</div>

Hi I saw map.namespace(:admin) do |admin| admin.resources :accounts, :has\_many =\> \[ :credentials \] end and I wrote like map.namespace(:admin) do |admin| admin.resources :accounts do |account| account.resources …

---

## [Ecard application](https://www.ruby-forum.com/t/ecard-application/157381)

<div class="topic-metadata">

**Author:** [@mrbless](https://www.ruby-forum.com/u/mrbless)\
**Replies:** 0\
**Last updated:** [January 10, 2009, 10:46am UTC](https://www.ruby-forum.com/t/ecard-application/157381 "2009-01-10T10:46:55Z")

</div>

For creating a ecard application i uploaded images with fck and add message to it. Then send it with action mailer but however when the mail is checked the image path is wrong. I need some help guys.

---

## [Problem with Active Record find](https://www.ruby-forum.com/t/problem-with-active-record-find/157378)

<div class="topic-metadata">

**Author:** [@Naga\_harish\_K](https://www.ruby-forum.com/u/Naga_harish_K)\
**Replies:** 0\
**Last updated:** [January 10, 2009, 8:22am UTC](https://www.ruby-forum.com/t/problem-with-active-record-find/157378 "2009-01-10T08:22:30Z")

</div>

Hi all, I migrated my Rail version from 1.2.3 to 2.2.2 I got one problem while going around. User.find(params\[:id\]) some times its returning Array and some times its returing User record. If I see the log, some tim…

---

## [How can I get other field value?](https://www.ruby-forum.com/t/how-can-i-get-other-field-value/157376)

<div class="topic-metadata">

**Author:** [@youhaodeyi](https://www.ruby-forum.com/u/youhaodeyi)\
**Replies:** 1\
**Last updated:** [January 10, 2009, 8:15am UTC](https://www.ruby-forum.com/t/how-can-i-get-other-field-value/157376 "2009-01-10T08:15:22Z")

</div>

I use this code to get other field value: \<%= hidden\_field\_tag ‘project\_version\_select’, $(‘other\_id’).getValue()%\> but I got compile error. How can I get the value?

---

## [How can I check whether an id existed?](https://www.ruby-forum.com/t/how-can-i-check-whether-an-id-existed/157377)

<div class="topic-metadata">

**Author:** [@youhaodeyi](https://www.ruby-forum.com/u/youhaodeyi)\
**Replies:** 3\
**Last updated:** [January 10, 2009, 7:49am UTC](https://www.ruby-forum.com/t/how-can-i-check-whether-an-id-existed/157377 "2009-01-10T07:49:39Z")

</div>

How can I check whether an ID existed in the current pageï¼Ÿ I want to use the $(‘id’).getValue() to get the field value. But sometimes the ID may not exist.

---

## [How can I install backgroundrb](https://www.ruby-forum.com/t/how-can-i-install-backgroundrb/157375)

<div class="topic-metadata">

**Author:** [@youhaodeyi](https://www.ruby-forum.com/u/youhaodeyi)\
**Replies:** 6\
**Last updated:** [January 10, 2009, 7:41am UTC](https://www.ruby-forum.com/t/how-can-i-install-backgroundrb/157375 "2009-01-10T07:41:52Z")

</div>

I followed the install instruction to install backgroundrb from http://backgroundrb.rubyforge.org/. But when running “git clone git://github.com/gnufied/backgroundrb.git” command, I got the error of no such command gi…

---

## [How to create a progress bar and status messages?](https://www.ruby-forum.com/t/how-to-create-a-progress-bar-and-status-messages/157288)

<div class="topic-metadata">

**Author:** [@martin\_mercy2001](https://www.ruby-forum.com/u/martin_mercy2001)\
**Replies:** 1\
**Last updated:** [January 10, 2009, 7:30am UTC](https://www.ruby-forum.com/t/how-to-create-a-progress-bar-and-status-messages/157288 "2009-01-10T07:30:46Z")

</div>

Dear all, Iam working on video gallery and i have created a file uploading page(add.rhtml), list page which lists all uploaded video files. In uploading, i have used ffmpeg tool to convert all movie files into flash …

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

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