# Rails

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

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

---

## [Globalize problem](https://www.ruby-forum.com/t/globalize-problem/131109)

<div class="topic-metadata">

**Author:** [@negus](https://www.ruby-forum.com/u/negus)\
**Replies:** 0\
**Last updated:** [March 6, 2008, 4:17am UTC](https://www.ruby-forum.com/t/globalize-problem/131109 "2008-03-06T04:17:47Z")

</div>

Hello all. I’m Ruby and Rails newbie. I have the following error after installing the Globalize gem trying to run script/server: $ ./server =\> Booting WEBrick… /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ac…

---

## [Meet Singles In Your City Tonight .. FOR FREE!](https://www.ruby-forum.com/t/meet-singles-in-your-city-tonight-for-free/131103)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [March 6, 2008, 1:45am UTC](https://www.ruby-forum.com/t/meet-singles-in-your-city-tonight-for-free/131103 "2008-03-06T01:45:22Z")

</div>

Meet Singles In Your Area Arabs, American, Russian Singles From All Over The World Waiting For You At Frinzo Join Frinzo And Start Your Love Life Now Join Frinzo Now For Free !! Enjoy exciting features offered by o…

---

## [TEST for REST!](https://www.ruby-forum.com/t/test-for-rest/128983)

<div class="topic-metadata">

**Author:** [@MohsinHijazee](https://www.ruby-forum.com/u/MohsinHijazee)\
**Replies:** 8\
**Last updated:** [March 6, 2008, 12:23am UTC](https://www.ruby-forum.com/t/test-for-rest/128983 "2008-03-06T00:23:17Z")

</div>

Hello everyone! I’m writing tests for my REST API. Now the exposed resources regarding the REST are definately accessible through thier URLs like for the account resource, I’d do this: Trying to emulate GET /accounts…

---

## [Accessing session data](https://www.ruby-forum.com/t/accessing-session-data/131096)

<div class="topic-metadata">

**Author:** [@jimmygoogle](https://www.ruby-forum.com/u/jimmygoogle)\
**Replies:** 0\
**Last updated:** [March 6, 2008, 12:13am UTC](https://www.ruby-forum.com/t/accessing-session-data/131096 "2008-03-06T00:13:55Z")

</div>

I am new to ROR and I am trying to retrieve data based on a session value I store. This is a basic app that collects user data and puts it in the DB. I then store the last insert id to a session variable on the serv…

---

## [How to use values through forms](https://www.ruby-forum.com/t/how-to-use-values-through-forms/131057)

<div class="topic-metadata">

**Author:** [@pimeamark](https://www.ruby-forum.com/u/pimeamark)\
**Replies:** 1\
**Last updated:** [March 5, 2008, 10:54pm UTC](https://www.ruby-forum.com/t/how-to-use-values-through-forms/131057 "2008-03-05T22:54:00Z")

</div>

Basically I need to know how to use forms fields when the name for it doesn’t match a field in my database. I have a form like this. \<%= date\_select 'assessment', 'ends\_at\_date', :value =\> "Click here..." %\> \<%= time\_…

---

## [ActiveRecord model help](https://www.ruby-forum.com/t/activerecord-model-help/131084)

<div class="topic-metadata">

**Author:** [@Jonathon](https://www.ruby-forum.com/u/Jonathon)\
**Replies:** 2\
**Last updated:** [March 5, 2008, 10:49pm UTC](https://www.ruby-forum.com/t/activerecord-model-help/131084 "2008-03-05T22:49:49Z")

</div>

Hey guys, I’m not that great with Rails yet, but I’m trying to get there. I’m developing a site where users will be able to upload pictures and videos (eventually). I want to set the pictures and the videos up as sep…

---

## [Finding a model based on association with another model](https://www.ruby-forum.com/t/finding-a-model-based-on-association-with-another-model/131090)

<div class="topic-metadata">

**Author:** [@jjkiesch](https://www.ruby-forum.com/u/jjkiesch)\
**Replies:** 0\
**Last updated:** [March 5, 2008, 10:39pm UTC](https://www.ruby-forum.com/t/finding-a-model-based-on-association-with-another-model/131090 "2008-03-05T22:39:47Z")

</div>

i have two tables/models: jobs and job\_tags job\_tags belongs to jobs and jobs has\_many job\_tags i just want to find all of the jobs that do not have a job\_tag associated with it. this might be more of a mysql questi…

---

## [\[Newbie\] Scaffolding and documentation about scripts](https://www.ruby-forum.com/t/newbie-scaffolding-and-documentation-about-scripts/131088)

<div class="topic-metadata">

**Author:** [@Lemon\_Tree](https://www.ruby-forum.com/u/Lemon_Tree)\
**Replies:** 0\
**Last updated:** [March 5, 2008, 10:35pm UTC](https://www.ruby-forum.com/t/newbie-scaffolding-and-documentation-about-scripts/131088 "2008-03-05T22:35:41Z")

</div>

Dear all, I apologize if the question is silly but I cannot find any hint, so I am posting here. Trying to follow some tutorials about RoR 2.0, I see that when you scaffold you can generate model elements by specifyi…

---

## [Help With Search Function in Model](https://www.ruby-forum.com/t/help-with-search-function-in-model/131089)

<div class="topic-metadata">

**Author:** [@sjglazer](https://www.ruby-forum.com/u/sjglazer)\
**Replies:** 0\
**Last updated:** [March 5, 2008, 10:33pm UTC](https://www.ruby-forum.com/t/help-with-search-function-in-model/131089 "2008-03-05T22:33:17Z")

</div>

Hello Everyone, I am pretty new to ROR and am stuck on how to proceed. I have an application that stores businesses along with there delivery boundaries. The boundaries are stored as 4 latitude/longitude points. When …

---

## [Reverting plugin migrations](https://www.ruby-forum.com/t/reverting-plugin-migrations/131009)

<div class="topic-metadata">

**Author:** [@elemental](https://www.ruby-forum.com/u/elemental)\
**Replies:** 6\
**Last updated:** [March 5, 2008, 10:26pm UTC](https://www.ruby-forum.com/t/reverting-plugin-migrations/131009 "2008-03-05T22:26:11Z")

</div>

Hi all, I’ve added quite a bit of default data population to a migration script on an engine I’m working on. When I try to revert to a previous version, it doesn’t work as I expected it to. With rails app migration…

---

## [Using form fields that arent in database](https://www.ruby-forum.com/t/using-form-fields-that-arent-in-database/131085)

<div class="topic-metadata">

**Author:** [@pimeamark](https://www.ruby-forum.com/u/pimeamark)\
**Replies:** 1\
**Last updated:** [March 5, 2008, 10:22pm UTC](https://www.ruby-forum.com/t/using-form-fields-that-arent-in-database/131085 "2008-03-05T22:22:35Z")

</div>

Basically I need to know how to use forms fields when the attribute name for it doesn’t match a field in my database. I have a form like this. \<%= date\_select 'assessment', 'ends\_at\_date', :value =\> "Click here..." %\>…

---

## [DateTime in Minutes?](https://www.ruby-forum.com/t/datetime-in-minutes/130967)

<div class="topic-metadata">

**Author:** [@pete](https://www.ruby-forum.com/u/pete)\
**Replies:** 2\
**Last updated:** [March 5, 2008, 9:36pm UTC](https://www.ruby-forum.com/t/datetime-in-minutes/130967 "2008-03-05T21:36:24Z")

</div>

Hi- So, say I have 2 DateTimes and I want to display the difference in mm:ss, how would I do this without manipulating each individual component, while still displaying the true number of minutes and seconds (i/e/ no…

---

## [Calling Javascript From Model](https://www.ruby-forum.com/t/calling-javascript-from-model/131080)

<div class="topic-metadata">

**Author:** [@sjglazer](https://www.ruby-forum.com/u/sjglazer)\
**Replies:** 2\
**Last updated:** [March 5, 2008, 9:32pm UTC](https://www.ruby-forum.com/t/calling-javascript-from-model/131080 "2008-03-05T21:32:00Z")

</div>

Hello Everyone, I am pretty new to ROR and am working on my first project which involves a pretty sophisticated search. Currently I am performing the search in the model. Now for every record in the db I have to do a …

---

## [Help with auto\_complete modifiction](https://www.ruby-forum.com/t/help-with-auto-complete-modifiction/131076)

<div class="topic-metadata">

**Author:** [@dino\_d](https://www.ruby-forum.com/u/dino_d)\
**Replies:** 0\
**Last updated:** [March 5, 2008, 8:35pm UTC](https://www.ruby-forum.com/t/help-with-auto-complete-modifiction/131076 "2008-03-05T20:35:37Z")

</div>

Hi - I’m trying to modify auto\_complete\_for to allow a foreign table to be the source of the lookup strings. It’s currently defined as: def auto\_complete\_for(object, method, options = {}) which tells me I can simply…

---

## [Column Inspection](https://www.ruby-forum.com/t/column-inspection/131075)

<div class="topic-metadata">

**Author:** [@Ragged\_Jack](https://www.ruby-forum.com/u/Ragged_Jack)\
**Replies:** 0\
**Last updated:** [March 5, 2008, 8:31pm UTC](https://www.ruby-forum.com/t/column-inspection/131075 "2008-03-05T20:31:30Z")

</div>

I have recently installed Rails 2.0.2. The problem I am having is that when I create a fresh rails app and do a script/generate scaffold thingy I then edit the migration to add columns to the table and do the rake d…

---

## [Capistrano 2.2.0 vs. 2.1.0](https://www.ruby-forum.com/t/capistrano-2-2-0-vs-2-1-0/131053)

<div class="topic-metadata">

**Author:** [@lena](https://www.ruby-forum.com/u/lena)\
**Replies:** 2\
**Last updated:** [March 5, 2008, 7:47pm UTC](https://www.ruby-forum.com/t/capistrano-2-2-0-vs-2-1-0/131053 "2008-03-05T19:47:57Z")

</div>

On Capistrano 2.1.0 (on PC) I can cap deploy cap deploy:rollback On Capistrano 2.2.0 (Linux) none of it works \[roruser@sandbox1-atgdev lenanew\]$ cap deploy the task deploy' does not exist \[roruser@sandbox1-atgdev le…

---

## [Radio button does not get checked](https://www.ruby-forum.com/t/radio-button-does-not-get-checked/131052)

<div class="topic-metadata">

**Author:** [@Eva](https://www.ruby-forum.com/u/Eva)\
**Replies:** 4\
**Last updated:** [March 5, 2008, 7:46pm UTC](https://www.ruby-forum.com/t/radio-button-does-not-get-checked/131052 "2008-03-05T19:46:35Z")

</div>

I am reading information out of the db, but even though the color\_ids match the radio\_button does not get checked. Are only strings valid for comparing? Id is an integer. \<% Color.find(:all).each do |color| %\> \<%= ra…

---

## [Connection multiply databases and tables](https://www.ruby-forum.com/t/connection-multiply-databases-and-tables/131059)

<div class="topic-metadata">

**Author:** [@remco123](https://www.ruby-forum.com/u/remco123)\
**Replies:** 1\
**Last updated:** [March 5, 2008, 7:07pm UTC](https://www.ruby-forum.com/t/connection-multiply-databases-and-tables/131059 "2008-03-05T19:07:01Z")

</div>

Hi, I have an external (company)database with 2 tables depart, and countries, wich i want to use in my rails-app. Setup: development (Local): adapter: mysql database: fly (tables \> pages ect.) username: root pass…

---

## [Unit Testing Conditional Validation](https://www.ruby-forum.com/t/unit-testing-conditional-validation/131054)

<div class="topic-metadata">

**Author:** [@sjglazer](https://www.ruby-forum.com/u/sjglazer)\
**Replies:** 4\
**Last updated:** [March 5, 2008, 6:31pm UTC](https://www.ruby-forum.com/t/unit-testing-conditional-validation/131054 "2008-03-05T18:31:24Z")

</div>

Hi there, I have the following conditional validation in my model: validates\_presence\_of :ext\_name, :if =\> :is\_ext? def is\_ext? ext end ext is a boolean value in the database. If it is true the ext\_name need to b…

---

## [Collections of Custom Entities](https://www.ruby-forum.com/t/collections-of-custom-entities/130987)

<div class="topic-metadata">

**Author:** [@edmz](https://www.ruby-forum.com/u/edmz)\
**Replies:** 1\
**Last updated:** [March 5, 2008, 6:24pm UTC](https://www.ruby-forum.com/t/collections-of-custom-entities/130987 "2008-03-05T18:24:19Z")

</div>

I have two entities (Department and Project) that extends ActiveRecord::Base. The department is mapped to have many projects. When i make a query using the find(:all) (Department.find(:all)), i get a collection of th…

---

## [Mongrel PID files and reboot](https://www.ruby-forum.com/t/mongrel-pid-files-and-reboot/92756)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 6\
**Last updated:** [March 5, 2008, 5:50pm UTC](https://www.ruby-forum.com/t/mongrel-pid-files-and-reboot/92756 "2008-03-05T17:50:07Z")

</div>

I have followed the instructions on the mongrel website, and now have mongrel\_cluster running my apps at boot time, works great. Now, if the server goes down ungracefully, the mongrel processes do not start up on rebo…

---

## [Create custom class](https://www.ruby-forum.com/t/create-custom-class/131056)

<div class="topic-metadata">

**Author:** [@Tarscher](https://www.ruby-forum.com/u/Tarscher)\
**Replies:** 2\
**Last updated:** [March 5, 2008, 5:49pm UTC](https://www.ruby-forum.com/t/create-custom-class/131056 "2008-03-05T17:49:25Z")

</div>

hi all, I want to make a custom data class. Where do I best store that class in my rails structure? Do I need to include that class somewhere ? Thanks Stijn

---

## [Problems with 3 deep restful nesting](https://www.ruby-forum.com/t/problems-with-3-deep-restful-nesting/131048)

<div class="topic-metadata">

**Author:** [@betaband](https://www.ruby-forum.com/u/betaband)\
**Replies:** 4\
**Last updated:** [March 5, 2008, 4:41pm UTC](https://www.ruby-forum.com/t/problems-with-3-deep-restful-nesting/131048 "2008-03-05T16:41:06Z")

</div>

I have a :user has\_many :events has\_many :signups map.resources :users do |user| user.resources :events do |event| event.resources :signups end end But in the 3rd nested resource im having trouble with the form\_fo…

---

## [About the rake migrate problem](https://www.ruby-forum.com/t/about-the-rake-migrate-problem/131044)

<div class="topic-metadata">

**Author:** [@Vincent.Z](https://www.ruby-forum.com/u/Vincent.Z)\
**Replies:** 2\
**Last updated:** [March 5, 2008, 4:19pm UTC](https://www.ruby-forum.com/t/about-the-rake-migrate-problem/131044 "2008-03-05T16:19:14Z")

</div>

in the db/migrate directory ,there are five files(001–005),so i think the top version should be 5,right? but,the problem is : when i run the "rake migrate"command,it always migrate to VERSION 2(NOT 5).And my schema.r…

---

## [Address prefix](https://www.ruby-forum.com/t/address-prefix/131047)

<div class="topic-metadata">

**Author:** [@jney](https://www.ruby-forum.com/u/jney)\
**Replies:** 0\
**Last updated:** [March 5, 2008, 4:18pm UTC](https://www.ruby-forum.com/t/address-prefix/131047 "2008-03-05T16:18:03Z")

</div>

How to manage address prefix? I want to redirect to different subdomain depending on the user language ex: fr.my\_site.com, en.my\_site.com

---

## [Handling Errors + Attachment\_Fu](https://www.ruby-forum.com/t/handling-errors-attachment-fu/131041)

<div class="topic-metadata">

**Author:** [@softf5ajivanet](https://www.ruby-forum.com/u/softf5ajivanet)\
**Replies:** 1\
**Last updated:** [March 5, 2008, 3:35pm UTC](https://www.ruby-forum.com/t/handling-errors-attachment-fu/131041 "2008-03-05T15:35:03Z")

</div>

Hi people, with the attachment\_fu plugin, how can i handle things when errors occur with an image upload, so the user doesn’t see a blank screen on the production site. ? Also in general how should I be handling form…

---

## [Overloaded has\_many\_polymorphs method is still being called](https://www.ruby-forum.com/t/overloaded-has-many-polymorphs-method-is-still-being-called/131042)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 0\
**Last updated:** [March 5, 2008, 2:19pm UTC](https://www.ruby-forum.com/t/overloaded-has-many-polymorphs-method-is-still-being-called/131042 "2008-03-05T14:19:09Z")

</div>

I have a has\_many\_polymorphs class called Property. For the various classes that are polymorphs, i’ve written a module with methods relating to Property, that they can all include. One of my methods is called ‘add\_pr…

---

## [Including controllers within a controller](https://www.ruby-forum.com/t/including-controllers-within-a-controller/130919)

<div class="topic-metadata">

**Author:** [@capslock118](https://www.ruby-forum.com/u/capslock118)\
**Replies:** 3\
**Last updated:** [March 5, 2008, 2:01pm UTC](https://www.ruby-forum.com/t/including-controllers-within-a-controller/130919 "2008-03-05T14:01:05Z")

</div>

Not entirely sure if that spells out what I am trying to do. So I am using (active) scaffolds for administration of the website. I have 4 controllers that are working well to administer their respective tables in the …

---

## [Mutiple select](https://www.ruby-forum.com/t/mutiple-select/130811)

<div class="topic-metadata">

**Author:** [@daociyiyou](https://www.ruby-forum.com/u/daociyiyou)\
**Replies:** 9\
**Last updated:** [March 5, 2008, 1:53pm UTC](https://www.ruby-forum.com/t/mutiple-select/130811 "2008-03-05T13:53:41Z")

</div>

Hello: How do i make a mutiple select list for “nomodel” objects?I made that by using something like:\<%=option groups collection for select(…)-%\>.But when i select mutiple items and submit them,I can only get one sel…

---

## [TWAIN and rails applications](https://www.ruby-forum.com/t/twain-and-rails-applications/131040)

<div class="topic-metadata">

**Author:** [@ratnavel](https://www.ruby-forum.com/u/ratnavel)\
**Replies:** 0\
**Last updated:** [March 5, 2008, 1:51pm UTC](https://www.ruby-forum.com/t/twain-and-rails-applications/131040 "2008-03-05T13:51:10Z")

</div>

Is TWAIN compatible with Rails application? Do anyone has success stories with this… Thanks, Ratnavel.

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

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