# Rails

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

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

---

## [Can the "discard\_day" option be used with the select\_date helper?](https://www.ruby-forum.com/t/can-the-discard-day-option-be-used-with-the-select-date-helper/138343)

<div class="topic-metadata">

**Author:** [@ccuilla](https://www.ruby-forum.com/u/ccuilla)\
**Replies:** 2\
**Last updated:** [May 23, 2008, 6:41am UTC](https://www.ruby-forum.com/t/can-the-discard-day-option-be-used-with-the-select-date-helper/138343 "2008-05-23T06:41:54Z")

</div>

I’d like to be able to use the select\_date helper, but exclude the day selection list vs. select\_month and select\_year. Is that possible? It doesn’t seem to work, but thought I’d ask in case I might be doing something…

---

## [Nested URL Routing](https://www.ruby-forum.com/t/nested-url-routing/138431)

<div class="topic-metadata">

**Author:** [@summea](https://www.ruby-forum.com/u/summea)\
**Replies:** 1\
**Last updated:** [May 23, 2008, 5:03am UTC](https://www.ruby-forum.com/t/nested-url-routing/138431 "2008-05-23T05:03:04Z")

</div>

Hi everyone, I’ve been reading a lot of posts related to routing and URLS in Rails lately but I still can’t figure out how to do this: I have a controller (categories) where I’m using the BetterNestedSet plugin in or…

---

## [Where do you get your Terms and Conditions?](https://www.ruby-forum.com/t/where-do-you-get-your-terms-and-conditions/138446)

<div class="topic-metadata">

**Author:** [@chrisolsen](https://www.ruby-forum.com/u/chrisolsen)\
**Replies:** 1\
**Last updated:** [May 23, 2008, 4:56am UTC](https://www.ruby-forum.com/t/where-do-you-get-your-terms-and-conditions/138446 "2008-05-23T04:56:38Z")

</div>

All service based sites should have some terms and conditions, but where does a person get them? Do you just copy someone else’s and make a few tweaks, or would doing that get you in trouble? Thanks for the input.

---

## [Testing Server](https://www.ruby-forum.com/t/testing-server/138433)

<div class="topic-metadata">

**Author:** [@cz231](https://www.ruby-forum.com/u/cz231)\
**Replies:** 2\
**Last updated:** [May 23, 2008, 3:56am UTC](https://www.ruby-forum.com/t/testing-server/138433 "2008-05-23T03:56:58Z")

</div>

I’m starting a new project with ruby on rails, and I put a fresh version of 1.7 rails on my external hard drive to use. I succesfully generated the new project files, but when I go to start the server, using InstantRa…

---

## [Problem Testing Active Merchant using peepcode pdf example](https://www.ruby-forum.com/t/problem-testing-active-merchant-using-peepcode-pdf-example/138443)

<div class="topic-metadata">

**Author:** [@traceyz](https://www.ruby-forum.com/u/traceyz)\
**Replies:** 0\
**Last updated:** [May 23, 2008, 3:11am UTC](https://www.ruby-forum.com/t/problem-testing-active-merchant-using-peepcode-pdf-example/138443 "2008-05-23T03:11:16Z")

</div>

I am trying to set up ActiveMerhcant in my RoR application and using the tests that come with the peepcode PDF. I am getting an error when I run rake test that I don’t know what to do with, and I am hoping someone can…

---

## [Backgroundrb problem?](https://www.ruby-forum.com/t/backgroundrb-problem/196690)

<div class="topic-metadata">

**Author:** [@varunkumargoel](https://www.ruby-forum.com/u/varunkumargoel)\
**Replies:** 1\
**Last updated:** [May 23, 2008, 2:09am UTC](https://www.ruby-forum.com/t/backgroundrb-problem/196690 "2008-05-23T02:09:46Z")

</div>

Hi All, I am using backgroundrb latest version i did every thing like given on this link http://backgroundrb.rubyforge.org/advanced/index.html but when i am running server like ruby script/backgroundrb start it’s no…

---

## [MySQL And Field Value](https://www.ruby-forum.com/t/mysql-and-field-value/138439)

<div class="topic-metadata">

**Author:** [@joel](https://www.ruby-forum.com/u/joel)\
**Replies:** 1\
**Last updated:** [May 23, 2008, 2:04am UTC](https://www.ruby-forum.com/t/mysql-and-field-value/138439 "2008-05-23T02:04:29Z")

</div>

Hello, I need to get an int value from my table. The int column is described as int(11). i’m trying to get one particular value (‘1000’) and insert it back into another table’s int field/column. However in the meanwh…

---

## [Mapping urls](https://www.ruby-forum.com/t/mapping-urls/138363)

<div class="topic-metadata">

**Author:** [@polomasta](https://www.ruby-forum.com/u/polomasta)\
**Replies:** 10\
**Last updated:** [May 23, 2008, 12:33am UTC](https://www.ruby-forum.com/t/mapping-urls/138363 "2008-05-23T00:33:12Z")

</div>

I’ve been reading everything about routes but I can’t seem to make this work… I have a projects controller and my projects table contains id and name fields I want to be able to navigate to myurl.com/projects/“name” …

---

## [How do I get the URL of the current and other pages? ("restful" problems)](https://www.ruby-forum.com/t/how-do-i-get-the-url-of-the-current-and-other-pages-restful-problems/138429)

<div class="topic-metadata">

**Author:** [@Hadmut](https://www.ruby-forum.com/u/Hadmut)\
**Replies:** 1\
**Last updated:** [May 23, 2008, 12:09am UTC](https://www.ruby-forum.com/t/how-do-i-get-the-url-of-the-current-and-other-pages-restful-problems/138429 "2008-05-23T00:09:19Z")

</div>

Hi, I have to deal with the problem that under “restful routing” the simple scheme of redirecting with parameters stored in variables does not work anymore. The given problem: Plenty of actions/views in a given appl…

---

## [Senior Ruby Developer Wanted in Vancouver, BC](https://www.ruby-forum.com/t/senior-ruby-developer-wanted-in-vancouver-bc/138432)

<div class="topic-metadata">

**Author:** [@TeamPages.com](https://www.ruby-forum.com/u/TeamPages.com)\
**Replies:** 0\
**Last updated:** [May 23, 2008, 12:00am UTC](https://www.ruby-forum.com/t/senior-ruby-developer-wanted-in-vancouver-bc/138432 "2008-05-23T00:00:52Z")

</div>

Job Category: Internet Job Type: Full Time/Permanent Company Name: TeamPages Inc. City: Vancouver, BC Description: TeamPages.com is a venture-backed company seeking a skilled, driven, and experienced Senior Develop…

---

## [Looking for Mod\_Ruby and easy Deployment Options? Sign Here](https://www.ruby-forum.com/t/looking-for-mod-ruby-and-easy-deployment-options-sign-here/136453)

<div class="topic-metadata">

**Author:** [@rahil](https://www.ruby-forum.com/u/rahil)\
**Replies:** 6\
**Last updated:** [May 22, 2008, 11:53pm UTC](https://www.ruby-forum.com/t/looking-for-mod-ruby-and-easy-deployment-options-sign-here/136453 "2008-05-22T23:53:49Z")

</div>

Hi, http://www.ruby-forum.com/topic/151662#669164 Hi, Please read more on the above link first, which is available in this section of Ruby on Rails. It will give you a clear understanding of Deployment scenario The…

---

## [Daily Jobs in Rails](https://www.ruby-forum.com/t/daily-jobs-in-rails/138417)

<div class="topic-metadata">

**Author:** [@chalkers](https://www.ruby-forum.com/u/chalkers)\
**Replies:** 6\
**Last updated:** [May 22, 2008, 10:48pm UTC](https://www.ruby-forum.com/t/daily-jobs-in-rails/138417 "2008-05-22T22:48:03Z")

</div>

Hi railers, I have a quick question - I think it will be answered fairly easily methinks. What’s the best practice (naming conventions, where to place in project etc) for creating a job to be ran every day? For exam…

---

## [Problem with redirect\_to and URL structure since upgrade to rails 2.0](https://www.ruby-forum.com/t/problem-with-redirect-to-and-url-structure-since-upgrade-to-rails-2-0/138199)

<div class="topic-metadata">

**Author:** [@Hadmut](https://www.ruby-forum.com/u/Hadmut)\
**Replies:** 3\
**Last updated:** [May 22, 2008, 10:28pm UTC](https://www.ruby-forum.com/t/problem-with-redirect-to-and-url-structure-since-upgrade-to-rails-2-0/138199 "2008-05-22T22:28:11Z")

</div>

Hi, I have written a littel rails application with rails 1.x , and used something like redirect\_to :controller =\> “aaa” , :action =\> “bbb” , :id =\> 123 within a controller to jump into a different controller’s act…

---

## [How to find out autoincrement id?](https://www.ruby-forum.com/t/how-to-find-out-autoincrement-id/138422)

<div class="topic-metadata">

**Author:** [@KTU](https://www.ruby-forum.com/u/KTU)\
**Replies:** 4\
**Last updated:** [May 22, 2008, 9:52pm UTC](https://www.ruby-forum.com/t/how-to-find-out-autoincrement-id/138422 "2008-05-22T21:52:41Z")

</div>

Hi I need to push newly created item id to file. (ie. its autoincrement value) I tried this on controller but it wont work, it cant find id value for the newly created item. def create @imitem = Imitem.new(params\[:…

---

## [ActiveResource and a nested resource routes](https://www.ruby-forum.com/t/activeresource-and-a-nested-resource-routes/138423)

<div class="topic-metadata">

**Author:** [@squeegy](https://www.ruby-forum.com/u/squeegy)\
**Replies:** 0\
**Last updated:** [May 22, 2008, 9:32pm UTC](https://www.ruby-forum.com/t/activeresource-and-a-nested-resource-routes/138423 "2008-05-22T21:32:48Z")

</div>

I have a nested resource in a Rails app, like this: /users/:user\_id/actions/:id I am trying to ActiveResource to access this resource remotely. Now if I name the model “Action” it will search the host for: /actions/…

---

## [How to prevent a parent with children from being deleted](https://www.ruby-forum.com/t/how-to-prevent-a-parent-with-children-from-being-deleted/126281)

<div class="topic-metadata">

**Author:** [@Decker](https://www.ruby-forum.com/u/Decker)\
**Replies:** 13\
**Last updated:** [May 22, 2008, 8:25pm UTC](https://www.ruby-forum.com/t/how-to-prevent-a-parent-with-children-from-being-deleted/126281 "2008-05-22T20:25:59Z")

</div>

I have a Category model that uses acts\_as\_tree. So the subcategories of a category are accessible via Category#children. The categories table has the requisite parent\_id column. It all works quite nicely. I’m tryin…

---

## [Ar-Extensions & FasterCSV](https://www.ruby-forum.com/t/ar-extensions-fastercsv/138292)

<div class="topic-metadata">

**Author:** [@melvinram](https://www.ruby-forum.com/u/melvinram)\
**Replies:** 26\
**Last updated:** [May 22, 2008, 8:13pm UTC](https://www.ruby-forum.com/t/ar-extensions-fastercsv/138292 "2008-05-22T20:13:52Z")

</div>

contactx = Array.new if params\[:dump\]\[:dump\] FasterCSV.parse(params\[:dump\]\[:dump\].read.chop, {:headers =\> true, :skip\_blanks =\> true}) do |row| 4. contactx \<\< Contact.new( 5. …

---

## [Model Validation for Polymorphic association](https://www.ruby-forum.com/t/model-validation-for-polymorphic-association/138374)

<div class="topic-metadata">

**Author:** [@selva](https://www.ruby-forum.com/u/selva)\
**Replies:** 1\
**Last updated:** [May 22, 2008, 8:08pm UTC](https://www.ruby-forum.com/t/model-validation-for-polymorphic-association/138374 "2008-05-22T20:08:28Z")

</div>

Hi All, Anybody did the model validation for polymorphic association table?? class Request \< ActiveRecord::Base belongs\_to :user belongs\_to :user\_request,:polymorphic=\>true belongs\_to :service end class WaterBill \<…

---

## [Allow selecting only two items in multiple selection box?](https://www.ruby-forum.com/t/allow-selecting-only-two-items-in-multiple-selection-box/138379)

<div class="topic-metadata">

**Author:** [@pepa007](https://www.ruby-forum.com/u/pepa007)\
**Replies:** 2\
**Last updated:** [May 22, 2008, 7:49pm UTC](https://www.ruby-forum.com/t/allow-selecting-only-two-items-in-multiple-selection-box/138379 "2008-05-22T19:49:04Z")

</div>

Hi, I’d like to use ‘selection’ with :multiple=\>true but allow selecting only two items from the list. is there any easy way in RoR or I have to use some javascript testing with onChange event? Thanks very much

---

## [Byte Code Encoder](https://www.ruby-forum.com/t/byte-code-encoder/138111)

<div class="topic-metadata">

**Author:** [@DCDCDC](https://www.ruby-forum.com/u/DCDCDC)\
**Replies:** 1\
**Last updated:** [May 22, 2008, 7:42pm UTC](https://www.ruby-forum.com/t/byte-code-encoder/138111 "2008-05-22T19:42:36Z")

</div>

Since Ruby is now running a byte code based interpreter, is there an encoder for Ruby to pre-compile or pre-encode our scripts…

---

## [Autocompleters and Sortables do not function in IE6](https://www.ruby-forum.com/t/autocompleters-and-sortables-do-not-function-in-ie6/138402)

<div class="topic-metadata">

**Author:** [@Christopher\_Hazlett](https://www.ruby-forum.com/u/Christopher_Hazlett)\
**Replies:** 4\
**Last updated:** [May 22, 2008, 7:40pm UTC](https://www.ruby-forum.com/t/autocompleters-and-sortables-do-not-function-in-ie6/138402 "2008-05-22T19:40:15Z")

</div>

I have two issues that I hope someone else has encountered and has a solution for. First: I have several autocompleters on my site, and they function as expected in Firefox, Opera, IE7, but when I use them in IE6, I …

---

## [Selecting an option from another window](https://www.ruby-forum.com/t/selecting-an-option-from-another-window/138183)

<div class="topic-metadata">

**Author:** [@schof](https://www.ruby-forum.com/u/schof)\
**Replies:** 1\
**Last updated:** [May 22, 2008, 7:36pm UTC](https://www.ruby-forum.com/t/selecting-an-option-from-another-window/138183 "2008-05-22T19:36:43Z")

</div>

User needs to pick a single asset from a list of assets shown via a popup window. ATM the popup view is just a simple index/list view of asset resources. Right now the user can manually enter an asset identifier aft…

---

## [Conceptual help needed for controllers that work with ajax requests](https://www.ruby-forum.com/t/conceptual-help-needed-for-controllers-that-work-with-ajax-requests/138413)

<div class="topic-metadata">

**Author:** [@andres](https://www.ruby-forum.com/u/andres)\
**Replies:** 0\
**Last updated:** [May 22, 2008, 7:32pm UTC](https://www.ruby-forum.com/t/conceptual-help-needed-for-controllers-that-work-with-ajax-requests/138413 "2008-05-22T19:32:33Z")

</div>

Hi, got a problem, I have a polymorphic object, “phone” that is created via remote (ajax), then refreshes the client\_phones div id, But what if I need to call Phone.create from different models, and refresh e.g. t…

---

## [How to give name to text\_files dynamically](https://www.ruby-forum.com/t/how-to-give-name-to-text-files-dynamically/137879)

<div class="topic-metadata">

**Author:** [@sai](https://www.ruby-forum.com/u/sai)\
**Replies:** 1\
**Last updated:** [May 22, 2008, 7:25pm UTC](https://www.ruby-forum.com/t/how-to-give-name-to-text-files-dynamically/137879 "2008-05-22T19:25:28Z")

</div>

Hello I am new to rubyonrais… I want to display data in table with textfields from database, so that i can edit all the values at a time, I mean all rows data.then i have to save all rows at at time. How to do this…

---

## [Bug in dispatcher.rb?](https://www.ruby-forum.com/t/bug-in-dispatcher-rb/138307)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 4\
**Last updated:** [May 22, 2008, 6:55pm UTC](https://www.ruby-forum.com/t/bug-in-dispatcher-rb/138307 "2008-05-22T18:55:25Z")

</div>

I’m developing my app against Ror 2.0, and I noticed my public/ 500.html page was not rendered in response to some low level errors (like when I stopped MySql). So I did some debugging to figure out why. After some …

---

## [Scaffold generation based on the model](https://www.ruby-forum.com/t/scaffold-generation-based-on-the-model/138311)

<div class="topic-metadata">

**Author:** [@dustin](https://www.ruby-forum.com/u/dustin)\
**Replies:** 2\
**Last updated:** [May 22, 2008, 6:44pm UTC](https://www.ruby-forum.com/t/scaffold-generation-based-on-the-model/138311 "2008-05-22T18:44:50Z")

</div>

I would rather create a migration file, add my table columns, migrate, then create scaffolding based on the database (like the old way) Is this still possible in 2.0?

---

## [Subforms and file uploads](https://www.ruby-forum.com/t/subforms-and-file-uploads/137586)

<div class="topic-metadata">

**Author:** [@banry](https://www.ruby-forum.com/u/banry)\
**Replies:** 1\
**Last updated:** [May 22, 2008, 6:08pm UTC](https://www.ruby-forum.com/t/subforms-and-file-uploads/137586 "2008-05-22T18:08:48Z")

</div>

Hi, i’m a newbie so any help and patience appreciated. I have a form with fields. Depending on the value in the fields the user will need to upload either one or two CSV files. The problem I have is that i can’t uploa…

---

## [Replacing ActiveRecordStore::Session with a custom model](https://www.ruby-forum.com/t/replacing-activerecordstore-session-with-a-custom-model/138257)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [May 22, 2008, 5:52pm UTC](https://www.ruby-forum.com/t/replacing-activerecordstore-session-with-a-custom-model/138257 "2008-05-22T17:52:18Z")

</div>

Has anyone managed to replace ActiveRecordStore::Session with their own model? In the source (http://dev.rubyonrails.org/browser/trunk/actionpack/lib/ action\_controller/session/active\_record\_store.rb) it says you can …

---

## [Select in rails](https://www.ruby-forum.com/t/select-in-rails/138386)

<div class="topic-metadata">

**Author:** [@leonard2](https://www.ruby-forum.com/u/leonard2)\
**Replies:** 2\
**Last updated:** [May 22, 2008, 5:49pm UTC](https://www.ruby-forum.com/t/select-in-rails/138386 "2008-05-22T17:49:18Z")

</div>

hello everybody!!! I want to pass the value of my select to another controller my code is this my user controller def index @users = User.find(:all) … my view index broker Seleccione un tipo de usuario \<%=…

---

## [How to use "tail"? .. no, the other kind!](https://www.ruby-forum.com/t/how-to-use-tail-no-the-other-kind/138339)

<div class="topic-metadata">

**Author:** [@rubyfreak](https://www.ruby-forum.com/u/rubyfreak)\
**Replies:** 7\
**Last updated:** [May 22, 2008, 5:09pm UTC](https://www.ruby-forum.com/t/how-to-use-tail-no-the-other-kind/138339 "2008-05-22T17:09:07Z")

</div>

I am reading “The Rails Way”. On page 20, Obie says use $ tail -f log/development\_log OK, I am a windows VB guy. I don’t know what that means. I assume it is a command? does it work in windows do I have to be in IRB.…

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

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