# Rails

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

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

---

## [App upgrade steps from 1.2.4 to 2.0.2?](https://www.ruby-forum.com/t/app-upgrade-steps-from-1-2-4-to-2-0-2/128112)

<div class="topic-metadata">

**Author:** [@Rheoled](https://www.ruby-forum.com/u/Rheoled)\
**Replies:** 5\
**Last updated:** [February 13, 2008, 12:05am UTC](https://www.ruby-forum.com/t/app-upgrade-steps-from-1-2-4-to-2-0-2/128112 "2008-02-13T00:05:35Z")

</div>

Hi all, experienced programmer but complete RoR newbie here, this is my first rails post/question so bear with me. I have a working RoR app on 1.2.4 and PostgreSQL, and my first efforts at running it in 2.0.2 show it…

---

## [RESTful app rejecting simultaneous requests?](https://www.ruby-forum.com/t/restful-app-rejecting-simultaneous-requests/128903)

<div class="topic-metadata">

**Author:** [@damaris](https://www.ruby-forum.com/u/damaris)\
**Replies:** 13\
**Last updated:** [February 12, 2008, 11:50pm UTC](https://www.ruby-forum.com/t/restful-app-rejecting-simultaneous-requests/128903 "2008-02-12T23:50:19Z")

</div>

Hi you all, I’ve made a RESTful app and another client application is making requests to it. This client application is a kind of crawler (I’m not involved in it), and the programmer has told me that my app is rejecti…

---

## [Update first table when data is created in the second table](https://www.ruby-forum.com/t/update-first-table-when-data-is-created-in-the-second-table/128371)

<div class="topic-metadata">

**Author:** [@koli](https://www.ruby-forum.com/u/koli)\
**Replies:** 4\
**Last updated:** [February 12, 2008, 11:29pm UTC](https://www.ruby-forum.com/t/update-first-table-when-data-is-created-in-the-second-table/128371 "2008-02-12T23:29:08Z")

</div>

Hi, I want to know how to update data in first table when i create data in second table. For ex: 1)locations-Fields(id,name,reply\_data)-TABLE ONE 2)Events-Fields(id,name)-TABLE TWO I want to know how to update the…

---

## [Field names, aliases and finders](https://www.ruby-forum.com/t/field-names-aliases-and-finders/128370)

<div class="topic-metadata">

**Author:** [@Tim\_U](https://www.ruby-forum.com/u/Tim_U)\
**Replies:** 1\
**Last updated:** [February 12, 2008, 11:27pm UTC](https://www.ruby-forum.com/t/field-names-aliases-and-finders/128370 "2008-02-12T23:27:23Z")

</div>

I can not seem to make finders work with aliases. My goal is to map some fugly field names to nice field names and have the finders work with the nice field names. An example. class Users \< ActiveRecord::Base alias…

---

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

<div class="topic-metadata">

**Author:** [@johnlester](https://www.ruby-forum.com/u/johnlester)\
**Replies:** 0\
**Last updated:** [February 12, 2008, 10:45pm UTC](https://www.ruby-forum.com/t/will-paginate-with-conditions/128952 "2008-02-12T22:45:00Z")

</div>

Hi, I’ve just switched to will\_paginate, which is impressive and easy to use! I have a question regarding conditions: I build a query using values from the params that were entered onto a web form using something lik…

---

## [JRuby with Spring, hibernate, acegis](https://www.ruby-forum.com/t/jruby-with-spring-hibernate-acegis/128949)

<div class="topic-metadata">

**Author:** [@Java\_Guru](https://www.ruby-forum.com/u/Java_Guru)\
**Replies:** 0\
**Last updated:** [February 12, 2008, 10:27pm UTC](https://www.ruby-forum.com/t/jruby-with-spring-hibernate-acegis/128949 "2008-02-12T22:27:54Z")

</div>

Hi All, I am newbie to JRuby on Rails. I am working on a portal. This has few webapplications and mobile application too. Currently we are using Spring, Hibernate, Acegies, Struts for the development of this applica…

---

## [Running a perl script in a rails application](https://www.ruby-forum.com/t/running-a-perl-script-in-a-rails-application/128946)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [February 12, 2008, 9:51pm UTC](https://www.ruby-forum.com/t/running-a-perl-script-in-a-rails-application/128946 "2008-02-12T21:51:25Z")

</div>

I have a perl script that will be executed in one of my controllers and will produce text output for a period of time. When I hit my rails app, the page doesn’t render until the perl script has fully completed running…

---

## [Showing the category which belongs to a recipe](https://www.ruby-forum.com/t/showing-the-category-which-belongs-to-a-recipe/128943)

<div class="topic-metadata">

**Author:** [@Thufir](https://www.ruby-forum.com/u/Thufir)\
**Replies:** 0\
**Last updated:** [February 12, 2008, 9:31pm UTC](https://www.ruby-forum.com/t/showing-the-category-which-belongs-to-a-recipe/128943 "2008-02-12T21:31:58Z")

</div>

I want to do something in the spirit of: ?\> c=Category.find\_by\_id(1) =\> #\<Category:0xb70bdee0 @attributes={“name”=\>“food”, “id”=\>“1”}\> c.inspect =\> "#\<Category:0xb70bdee0 @attributes={“name”=\>“food”, “id”=\>“1”} " …

---

## [Finding a specific category](https://www.ruby-forum.com/t/finding-a-specific-category/128877)

<div class="topic-metadata">

**Author:** [@Thufir](https://www.ruby-forum.com/u/Thufir)\
**Replies:** 3\
**Last updated:** [February 12, 2008, 9:20pm UTC](https://www.ruby-forum.com/t/finding-a-specific-category/128877 "2008-02-12T21:20:42Z")

</div>

For the following controller: thufir@arrakis ~/oreilly-recipes-categories $ cat app/controllers/ recipes\_controller.rb -n | head -n 18 | tail -n 3 16 @recipe = Recipe.find(params\[:id\]) 17 @categories= Categ…

---

## [Chaining objects in activeRecord, and accessing attributes from parent](https://www.ruby-forum.com/t/chaining-objects-in-activerecord-and-accessing-attributes-from-parent/128939)

<div class="topic-metadata">

**Author:** [@terry](https://www.ruby-forum.com/u/terry)\
**Replies:** 0\
**Last updated:** [February 12, 2008, 9:03pm UTC](https://www.ruby-forum.com/t/chaining-objects-in-activerecord-and-accessing-attributes-from-parent/128939 "2008-02-12T21:03:37Z")

</div>

Say I have Users table, and the user has many :items, if I define a method in the Item model say, def self.green so I can return all green items that belong to a user, I might use with\_scope. fine, so I use like this:…

---

## [Rails not dynacially loading new content](https://www.ruby-forum.com/t/rails-not-dynacially-loading-new-content/128937)

<div class="topic-metadata">

**Author:** [@evan](https://www.ruby-forum.com/u/evan)\
**Replies:** 0\
**Last updated:** [February 12, 2008, 8:08pm UTC](https://www.ruby-forum.com/t/rails-not-dynacially-loading-new-content/128937 "2008-02-12T20:08:01Z")

</div>

Hi, im running instant rails on vista, i’ve managed to create the “15 min blog” using scaffolding the only thing is that i need to restart mongrol everytime i create a new controller or make a change to the source of …

---

## [REST best practices for customized views](https://www.ruby-forum.com/t/rest-best-practices-for-customized-views/128724)

<div class="topic-metadata">

**Author:** [@Thaddeus\_S](https://www.ruby-forum.com/u/Thaddeus_S)\
**Replies:** 3\
**Last updated:** [February 12, 2008, 8:03pm UTC](https://www.ruby-forum.com/t/rest-best-practices-for-customized-views/128724 "2008-02-12T20:03:53Z")

</div>

I’m looking for some advice on REST best practices for providing two different views that update the same resource. I’m working on a hotel registration system and there are two different views that edit the guest mode…

---

## [How to access constant array of a model inside a view](https://www.ruby-forum.com/t/how-to-access-constant-array-of-a-model-inside-a-view/128876)

<div class="topic-metadata">

**Author:** [@iqbalhyd](https://www.ruby-forum.com/u/iqbalhyd)\
**Replies:** 1\
**Last updated:** [February 12, 2008, 8:01pm UTC](https://www.ruby-forum.com/t/how-to-access-constant-array-of-a-model-inside-a-view/128876 "2008-02-12T20:01:31Z")

</div>

Hello All, I have this array (of, say User's contact preferences) inside the User model. CONTACT\_PREFERENCES = \[“Email”, “Mobile Phone”, “Residence Phone”, “Office Phone”, “Fax”\] and inside the view (when regis…

---

## [Find x items in each category](https://www.ruby-forum.com/t/find-x-items-in-each-category/128930)

<div class="topic-metadata">

**Author:** [@farfignugen](https://www.ruby-forum.com/u/farfignugen)\
**Replies:** 0\
**Last updated:** [February 12, 2008, 7:45pm UTC](https://www.ruby-forum.com/t/find-x-items-in-each-category/128930 "2008-02-12T19:45:06Z")

</div>

I am trying to figure this out, but haven’t had much luck searching the forums here or google. I have categories and items. My category model has many items, items belong to categories, etc. I can’t figure out how to…

---

## [Association can't be changed](https://www.ruby-forum.com/t/association-cant-be-changed/128927)

<div class="topic-metadata">

**Author:** [@threeeyedfish](https://www.ruby-forum.com/u/threeeyedfish)\
**Replies:** 1\
**Last updated:** [February 12, 2008, 7:41pm UTC](https://www.ruby-forum.com/t/association-cant-be-changed/128927 "2008-02-12T19:41:40Z")

</div>

Hi, all! May you ever feel happy! I’m getting some very strange behaviour and I’m not sure where my mistake lies. I have a Divination model that belongs\_to :book. I get the following in script/console: d = Divina…

---

## [STI question](https://www.ruby-forum.com/t/sti-question/128806)

<div class="topic-metadata">

**Author:** [@ssk](https://www.ruby-forum.com/u/ssk)\
**Replies:** 1\
**Last updated:** [February 12, 2008, 7:28pm UTC](https://www.ruby-forum.com/t/sti-question/128806 "2008-02-12T19:28:43Z")

</div>

Hi, I am learning Single Table Inheritance and have a question. In my application, a message may be written by a user or by a guest. Thus a writer of a message is virtually associated either to a user or a guest. cl…

---

## [File output in view layout](https://www.ruby-forum.com/t/file-output-in-view-layout/127491)

<div class="topic-metadata">

**Author:** [@nemo](https://www.ruby-forum.com/u/nemo)\
**Replies:** 4\
**Last updated:** [February 12, 2008, 7:25pm UTC](https://www.ruby-forum.com/t/file-output-in-view-layout/127491 "2008-02-12T19:25:48Z")

</div>

hello, i am new to ruby and trying to figure out how to output the following code in view layout. this code resides in one of the controller called X: def get\_log @jobname = X.find params\[:id\] File.open(“c:\\test\\#{@…

---

## [Send\_file - PDF](https://www.ruby-forum.com/t/send-file-pdf/128923)

<div class="topic-metadata">

**Author:** [@pete](https://www.ruby-forum.com/u/pete)\
**Replies:** 3\
**Last updated:** [February 12, 2008, 7:13pm UTC](https://www.ruby-forum.com/t/send-file-pdf/128923 "2008-02-12T19:13:54Z")

</div>

Hi- I’d like to load a PDF file into a page, in my controller: send\_file “/path to/my.pdf”, :disposition =\> “inline” However, instead of rendering inline, it asks to download the file. How can I display the contents …

---

## [Best way to create multiple projects in one form?](https://www.ruby-forum.com/t/best-way-to-create-multiple-projects-in-one-form/128818)

<div class="topic-metadata">

**Author:** [@newbee-robert](https://www.ruby-forum.com/u/newbee-robert)\
**Replies:** 3\
**Last updated:** [February 12, 2008, 6:26pm UTC](https://www.ruby-forum.com/t/best-way-to-create-multiple-projects-in-one-form/128818 "2008-02-12T18:26:36Z")

</div>

Hi All, Quick question: I’ve read a lot about creating building multiple child items to the parent in one form, but what is the best way to create multiple instances of a model in one form, eg: creating up to 10 proj…

---

## [Database.yml for the ActsAsReadonlyable plugin](https://www.ruby-forum.com/t/database-yml-for-the-actsasreadonlyable-plugin/128911)

<div class="topic-metadata">

**Author:** [@farfignugen](https://www.ruby-forum.com/u/farfignugen)\
**Replies:** 4\
**Last updated:** [February 12, 2008, 6:21pm UTC](https://www.ruby-forum.com/t/database-yml-for-the-actsasreadonlyable-plugin/128911 "2008-02-12T18:21:48Z")

</div>

Hi, I’m currently looking at pulling the ActsAsReadonlyable plugin into my rails project but im getting an error when i attempt to run this is development mode as in the console says: No db config entry defined for r…

---

## [Nitobi Hack Day Sources: Create a mobile web (iPhone) site using iUI and Ruby on Rails 2.0](https://www.ruby-forum.com/t/nitobi-hack-day-sources-create-a-mobile-web-iphone-site-using-iui-and-ruby-on-rails-2-0/128920)

<div class="topic-metadata">

**Author:** [@gerald\_b](https://www.ruby-forum.com/u/gerald_b)\
**Replies:** 0\
**Last updated:** [February 12, 2008, 6:20pm UTC](https://www.ruby-forum.com/t/nitobi-hack-day-sources-create-a-mobile-web-iphone-site-using-iui-and-ruby-on-rails-2-0/128920 "2008-02-12T18:20:33Z")

</div>

Hello, I’ve uploaded the sources to the Vancouver.rb Rubyforge subversion repo for the mobile web application using the iUI library and Ruby on Rails 2.0 as shown at last week’s Nitobi Hack Day. Thanks to team Nitobi…

---

## [Rake problem -- overriding test task](https://www.ruby-forum.com/t/rake-problem-overriding-test-task/128916)

<div class="topic-metadata">

**Author:** [@wpwood](https://www.ruby-forum.com/u/wpwood)\
**Replies:** 0\
**Last updated:** [February 12, 2008, 5:28pm UTC](https://www.ruby-forum.com/t/rake-problem-overriding-test-task/128916 "2008-02-12T17:28:23Z")

</div>

I’ve got a test suite that runs fine from the command line but fails from rake. We’ve got a database table in our app that causes db:test:clone to fail. From the command line, db:test:clone\_structure works ok, so I …

---

## [In place editor for a RESTful Rails 2](https://www.ruby-forum.com/t/in-place-editor-for-a-restful-rails-2/128915)

<div class="topic-metadata">

**Author:** [@mobileamusement](https://www.ruby-forum.com/u/mobileamusement)\
**Replies:** 0\
**Last updated:** [February 12, 2008, 5:14pm UTC](https://www.ruby-forum.com/t/in-place-editor-for-a-restful-rails-2/128915 "2008-02-12T17:14:13Z")

</div>

Hi All I’ve just joined this list. I have had a bit of a nightmare getting the hang of Rails 2, mostly because the books I have and a lot of online material is for Rails 1. Things have gone RESTful now, and I’ve been…

---

## [How we use the act\_as-ferret plugin](https://www.ruby-forum.com/t/how-we-use-the-act-as-ferret-plugin/128893)

<div class="topic-metadata">

**Author:** [@srinivasraopala](https://www.ruby-forum.com/u/srinivasraopala)\
**Replies:** 1\
**Last updated:** [February 12, 2008, 5:01pm UTC](https://www.ruby-forum.com/t/how-we-use-the-act-as-ferret-plugin/128893 "2008-02-12T17:01:51Z")

</div>

Hi, Could you please explain about the usage of act\_as\_ferret plug in.

---

## [Attachment\_fu](https://www.ruby-forum.com/t/attachment-fu/128625)

<div class="topic-metadata">

**Author:** [@ankit2584](https://www.ruby-forum.com/u/ankit2584)\
**Replies:** 2\
**Last updated:** [February 12, 2008, 4:55pm UTC](https://www.ruby-forum.com/t/attachment-fu/128625 "2008-02-12T16:55:26Z")

</div>

Hello, I am using attachment\_fu to handle my images. i get an error message “cant convert nil into string” when updating a person if i do not specify the image for the person. Does anyone know whats wrong.

---

## [Auto complete with checkbox](https://www.ruby-forum.com/t/auto-complete-with-checkbox/128907)

<div class="topic-metadata">

**Author:** [@neha-rohan](https://www.ruby-forum.com/u/neha-rohan)\
**Replies:** 0\
**Last updated:** [February 12, 2008, 4:25pm UTC](https://www.ruby-forum.com/t/auto-complete-with-checkbox/128907 "2008-02-12T16:25:37Z")

</div>

Hi, I am trying to use the text\_field\_with\_auto\_complete but i need to extend it. So i want to have a scroll bar, so if the list becomes too long i have a vertical scroll bar. I tried giving my DIV some height but i…

---

## [ActionView::TemplateError (stack level too deep)](https://www.ruby-forum.com/t/actionview-templateerror-stack-level-too-deep/128892)

<div class="topic-metadata">

**Author:** [@ratnavel](https://www.ruby-forum.com/u/ratnavel)\
**Replies:** 4\
**Last updated:** [February 12, 2008, 4:08pm UTC](https://www.ruby-forum.com/t/actionview-templateerror-stack-level-too-deep/128892 "2008-02-12T16:08:28Z")

</div>

Hi, I am getting the following exception while calling a helper method. ActionView::TemplateError (stack level too deep) Do anyone have the idea why its happening? Ratna

---

## [Hash problem any ideas?](https://www.ruby-forum.com/t/hash-problem-any-ideas/128900)

<div class="topic-metadata">

**Author:** [@KTU](https://www.ruby-forum.com/u/KTU)\
**Replies:** 5\
**Last updated:** [February 12, 2008, 3:37pm UTC](https://www.ruby-forum.com/t/hash-problem-any-ideas/128900 "2008-02-12T15:37:05Z")

</div>

on controller i have this: ldaphash = {} ldap.search( :base =\> treebase, :filter =\> filter ) do |entry| email = entry\[:mail\].to\_s uid = entry\[:uid\].to\_s fullname = entry\[:cn\].to\_s fullname = Iconv.iconv(“ISO-8859-1…

---

## [Button\_to problem http://localhost:3000/art/151470;edi](https://www.ruby-forum.com/t/button-to-problem-http-localhost-3000-art-151470-edi/128904)

<div class="topic-metadata">

**Author:** [@gayathri](https://www.ruby-forum.com/u/gayathri)\
**Replies:** 0\
**Last updated:** [February 12, 2008, 3:30pm UTC](https://www.ruby-forum.com/t/button-to-problem-http-localhost-3000-art-151470-edi/128904 "2008-02-12T15:30:52Z")

</div>

hi all, now i am facing problem with button\_to , it shows the path like http://localhost:3000/art/151470;edit instead of http://localhost:3000/art/edit/151470 the path is not displaying problem, so i got the error , …

---

## [Creating multiple records in one form](https://www.ruby-forum.com/t/creating-multiple-records-in-one-form/128899)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [February 12, 2008, 3:18pm UTC](https://www.ruby-forum.com/t/creating-multiple-records-in-one-form/128899 "2008-02-12T15:18:44Z")

</div>

I want to have a form with which the user can choose options (meal choices) for themselves and a number of ‘dinner companions’. The number is pre-specified in a different form. I have an attendee model, and a ‘diner’ …

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

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