# Rails

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

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

---

## [Redirect\_to or send\_file and AWS S3](https://www.ruby-forum.com/t/redirect-to-or-send-file-and-aws-s3/173086)

<div class="topic-metadata">

**Author:** [@davidstokar](https://www.ruby-forum.com/u/davidstokar)\
**Replies:** 3\
**Last updated:** [August 2, 2009, 4:36am UTC](https://www.ruby-forum.com/t/redirect-to-or-send-file-and-aws-s3/173086 "2009-08-02T04:36:48Z")

</div>

Hi, I store files on S3 as the id of the file in my appliction. IE my file with id 20 will be stored on S3 as 20. When I download the file I want to look up the file name in the database and then pass it off to the u…

---

## [ActiveResource xml element ordering](https://www.ruby-forum.com/t/activeresource-xml-element-ordering/173061)

<div class="topic-metadata">

**Author:** [@slavix](https://www.ruby-forum.com/u/slavix)\
**Replies:** 2\
**Last updated:** [August 2, 2009, 12:08am UTC](https://www.ruby-forum.com/t/activeresource-xml-element-ordering/173061 "2009-08-02T00:08:44Z")

</div>

Hello, I am using ActiveResource to integrate with a 3rd party service. when calling MyModel.save a POST with xml is sent. I need to make sure that xml is created with defined order of elements. How can I do that? S…

---

## [Associations Question](https://www.ruby-forum.com/t/associations-question/173077)

<div class="topic-metadata">

**Author:** [@diabolist](https://www.ruby-forum.com/u/diabolist)\
**Replies:** 1\
**Last updated:** [August 1, 2009, 9:20pm UTC](https://www.ruby-forum.com/t/associations-question/173077 "2009-08-01T21:20:12Z")

</div>

I have a three table construct. A “Users” table. Users have a one-to- one relationship with a “Carts” table for saving the contents of a shopping cart to the DB. I have a “Products” table for holding product inform…

---

## [Needed proper structure for a controller null response](https://www.ruby-forum.com/t/needed-proper-structure-for-a-controller-null-response/173076)

<div class="topic-metadata">

**Author:** [@explainer](https://www.ruby-forum.com/u/explainer)\
**Replies:** 1\
**Last updated:** [August 1, 2009, 9:16pm UTC](https://www.ruby-forum.com/t/needed-proper-structure-for-a-controller-null-response/173076 "2009-08-01T21:16:06Z")

</div>

I have a situation where a part of a page is under the control of periodically\_call\_remote() js helper. In response, the controller answers with a render(:partial …). When the controller knows that nothing in the di…

---

## [Nested forms and deleting/removing has\_many associations](https://www.ruby-forum.com/t/nested-forms-and-deleting-removing-has-many-associations/173072)

<div class="topic-metadata">

**Author:** [@marmolin](https://www.ruby-forum.com/u/marmolin)\
**Replies:** 0\
**Last updated:** [August 1, 2009, 6:42pm UTC](https://www.ruby-forum.com/t/nested-forms-and-deleting-removing-has-many-associations/173072 "2009-08-01T18:42:51Z")

</div>

I am using nested forms on person model that has many pictures. I would like to allow the user to remove on or more of the associated pictures from the person using nested forms as suggested by Ryan B… However delete …

---

## [Unable to deploy ruby on rails app?](https://www.ruby-forum.com/t/unable-to-deploy-ruby-on-rails-app/173060)

<div class="topic-metadata">

**Author:** [@amyes](https://www.ruby-forum.com/u/amyes)\
**Replies:** 2\
**Last updated:** [August 1, 2009, 3:27pm UTC](https://www.ruby-forum.com/t/unable-to-deploy-ruby-on-rails-app/173060 "2009-08-01T15:27:28Z")

</div>

I am unable to run ruby on rails application. I setup the database and loaded database schema. When I run: ruby script/server -e production It says: =\> Booting Mongrel =\> Rails 2.3.2 application starting on http://0…

---

## [Ask About ruby-uml](https://www.ruby-forum.com/t/ask-about-ruby-uml/130321)

<div class="topic-metadata">

**Author:** [@malioboro](https://www.ruby-forum.com/u/malioboro)\
**Replies:** 1\
**Last updated:** [August 1, 2009, 2:30pm UTC](https://www.ruby-forum.com/t/ask-about-ruby-uml/130321 "2009-08-01T14:30:53Z")

</div>

Any body here has used ruby-uml from http://ruby-uml.rubyforge.org/ ?? I dont know how to use it, would you mind to share your experience on it? OR Have you found plug-in or gem for generating application code like …

---

## [How to invoke javascript in the controller?](https://www.ruby-forum.com/t/how-to-invoke-javascript-in-the-controller/173063)

<div class="topic-metadata">

**Author:** [@serenobs](https://www.ruby-forum.com/u/serenobs)\
**Replies:** 4\
**Last updated:** [August 1, 2009, 12:59pm UTC](https://www.ruby-forum.com/t/how-to-invoke-javascript-in-the-controller/173063 "2009-08-01T12:59:15Z")

</div>

Hello. I tried to invoke javascript in the controller, but I couldn’t. What I want to do is, I’d like to verify passed parameters in the controller, if parameters are not verified I’d like to invoke alert with error …

---

## [SOAP Call from behind proxy](https://www.ruby-forum.com/t/soap-call-from-behind-proxy/173054)

<div class="topic-metadata">

**Author:** [@davidstokar](https://www.ruby-forum.com/u/davidstokar)\
**Replies:** 1\
**Last updated:** [August 1, 2009, 11:22am UTC](https://www.ruby-forum.com/t/soap-call-from-behind-proxy/173054 "2009-08-01T11:22:42Z")

</div>

Hello, I am trying to do something that I would think is really easy, but that doesn’t seem to be the case. I am building an application that my internal colleagues can use, but it hits a SOAP web service out on the …

---

## [Dynamically Restarting a Rails App?](https://www.ruby-forum.com/t/dynamically-restarting-a-rails-app/173018)

<div class="topic-metadata">

**Author:** [@anthonybaker](https://www.ruby-forum.com/u/anthonybaker)\
**Replies:** 4\
**Last updated:** [August 1, 2009, 11:09am UTC](https://www.ruby-forum.com/t/dynamically-restarting-a-rails-app/173018 "2009-08-01T11:09:14Z")

</div>

Hello all, Is there a way to restart a Rails app from a controller? I’m trying to make it so that, in the backend, administrators can add plugins/themes/ etc. to the running application without the need to actually go…

---

## [Triggering Javascript after AJAX](https://www.ruby-forum.com/t/triggering-javascript-after-ajax/173050)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [August 1, 2009, 4:33am UTC](https://www.ruby-forum.com/t/triggering-javascript-after-ajax/173050 "2009-08-01T04:33:31Z")

</div>

I have a page starting out with: After an AJAX call, the innerhtml is updated to: where after the new content is loaded, I want to run $(‘newDiv’).fade({ duration: 2.0, from: 1, to: 0 }); I can’t figure out…

---

## [Testing issue with creating a view/layout](https://www.ruby-forum.com/t/testing-issue-with-creating-a-view-layout/173052)

<div class="topic-metadata">

**Author:** [@twaters](https://www.ruby-forum.com/u/twaters)\
**Replies:** 0\
**Last updated:** [August 1, 2009, 1:37am UTC](https://www.ruby-forum.com/t/testing-issue-with-creating-a-view-layout/173052 "2009-08-01T01:37:55Z")

</div>

Bad subject line, but not sure what would be better. My issue only seems to happen in testing and I want to see if I can find a way to fix it. My rails app will host many domains each with its own layout. (stored as …

---

## [Would like include model association in to\_xml](https://www.ruby-forum.com/t/would-like-include-model-association-in-to-xml/173043)

<div class="topic-metadata">

**Author:** [@Italo\_M](https://www.ruby-forum.com/u/Italo_M)\
**Replies:** 8\
**Last updated:** [August 1, 2009, 12:59am UTC](https://www.ruby-forum.com/t/would-like-include-model-association-in-to-xml/173043 "2009-08-01T00:59:17Z")

</div>

i have: class Library \<\< ActiveRecord::Base has\_many :books end class Book \<\< ActiveRecord::Base belongs\_to :library end in my controller i have: render :xml=\> Library.find(:all).to\_xml(:include=\>books) but, i w…

---

## [Integration test receives HTTP 200 response when it should be a redirect](https://www.ruby-forum.com/t/integration-test-receives-http-200-response-when-it-should-be-a-redirect/173046)

<div class="topic-metadata">

**Author:** [@Phoenix\_R](https://www.ruby-forum.com/u/Phoenix_R)\
**Replies:** 1\
**Last updated:** [July 31, 2009, 11:30pm UTC](https://www.ruby-forum.com/t/integration-test-receives-http-200-response-when-it-should-be-a-redirect/173046 "2009-07-31T23:30:54Z")

</div>

This is probably due to my novice understanding of integration tests, but this behavior looked pretty strange, so I figured I’d ask. The application I’m working on at present requires users, upon login, to assign them…

---

## [Partials](https://www.ruby-forum.com/t/partials/172913)

<div class="topic-metadata">

**Author:** [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Replies:** 9\
**Last updated:** [July 31, 2009, 11:27pm UTC](https://www.ruby-forum.com/t/partials/172913 "2009-07-31T23:27:58Z")

</div>

I am getting a blank page, no errors, just a blank page. I have 2 files… reports/city\_taxes\_print.erb reports/\_city\_taxes\_print.erb and my method is city\_taxes\_print and after getting variables from the controller, …

---

## [Non-Image Upload](https://www.ruby-forum.com/t/non-image-upload/173036)

<div class="topic-metadata">

**Author:** [@archangel77](https://www.ruby-forum.com/u/archangel77)\
**Replies:** 1\
**Last updated:** [July 31, 2009, 11:26pm UTC](https://www.ruby-forum.com/t/non-image-upload/173036 "2009-07-31T23:26:13Z")

</div>

I’m new with Rails and I’ve been searching for a way to upload files using Rails. I’ve only found plug-ins and tutorials for images. Do you know any website/plu-ing/etc that can help me with non-image file uploads? T…

---

## [Form not working](https://www.ruby-forum.com/t/form-not-working/173025)

<div class="topic-metadata">

**Author:** [@archangel77](https://www.ruby-forum.com/u/archangel77)\
**Replies:** 13\
**Last updated:** [July 31, 2009, 10:34pm UTC](https://www.ruby-forum.com/t/form-not-working/173025 "2009-07-31T22:34:42Z")

</div>

Hello. I created a form and it always throw the ‘Title can’t be blank’ error, even if I filled it. What is wrong? Thanks, Gabriel. new.html.erb Welcome \<% form\_for(@sfile) do |f| %\> \<%= f.error\_messages %\> …

---

## [Cannot access an objectâ€™s attributes in an array](https://www.ruby-forum.com/t/cannot-access-an-objecta-s-attributes-in-an-array/173034)

<div class="topic-metadata">

**Author:** [@fahrio](https://www.ruby-forum.com/u/fahrio)\
**Replies:** 3\
**Last updated:** [July 31, 2009, 10:26pm UTC](https://www.ruby-forum.com/t/cannot-access-an-objecta-s-attributes-in-an-array/173034 "2009-07-31T22:26:30Z")

</div>

Hello, I am building a site with works and their credits. What I am trying o achieve is to find each work’s similar works based on the mutual titles in their credits. I am adding each similar work into an array in a …

---

## [File upload](https://www.ruby-forum.com/t/file-upload/173030)

<div class="topic-metadata">

**Author:** [@archangel77](https://www.ruby-forum.com/u/archangel77)\
**Replies:** 1\
**Last updated:** [July 31, 2009, 9:05pm UTC](https://www.ruby-forum.com/t/file-upload/173030 "2009-07-31T21:05:09Z")

</div>

Hello. I’m new with Rails and I’m trying to create a file upload app. I want to make that it stores the file in public/data, that only .swf files can be uploaded and that the filename in my server is the same from the…

---

## [Routes, sqlite3](https://www.ruby-forum.com/t/routes-sqlite3/172985)

<div class="topic-metadata">

**Author:** [@rubystudent](https://www.ruby-forum.com/u/rubystudent)\
**Replies:** 3\
**Last updated:** [July 31, 2009, 8:33pm UTC](https://www.ruby-forum.com/t/routes-sqlite3/172985 "2009-07-31T20:33:56Z")

</div>

I have two different questions, I hope that’s not a problem, if it is, I do two differents topics, sorry. First, I would like to delete a table of sqlite3. The problem is that I had a table cathegories created, but I …

---

## [Learning some best DB practices](https://www.ruby-forum.com/t/learning-some-best-db-practices/173027)

<div class="topic-metadata">

**Author:** [@diabolist](https://www.ruby-forum.com/u/diabolist)\
**Replies:** 8\
**Last updated:** [July 31, 2009, 7:57pm UTC](https://www.ruby-forum.com/t/learning-some-best-db-practices/173027 "2009-07-31T19:57:51Z")

</div>

I am completely new to rails, and I have a very useful way of dealing with database structures from my background in php. I don’t want to be one of those who brings bad habits into rails…so I am curious if my practic…

---

## [Ruby 1.9 ruby-debug | Alternative?](https://www.ruby-forum.com/t/ruby-1-9-ruby-debug-alternative/166334)

<div class="topic-metadata">

**Author:** [@rafael](https://www.ruby-forum.com/u/rafael)\
**Replies:** 2\
**Last updated:** [July 31, 2009, 7:54pm UTC](https://www.ruby-forum.com/t/ruby-1-9-ruby-debug-alternative/166334 "2009-07-31T19:54:45Z")

</div>

Hi everybody, I am looking around but only found confirmation of the fact, that ruby- debug is not maintained (right now/ anymore / yet) Are you looking into the same issue, have you any alternatives? greez

---

## [Legacy database, primary key compound with two fields](https://www.ruby-forum.com/t/legacy-database-primary-key-compound-with-two-fields/173028)

<div class="topic-metadata">

**Author:** [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Replies:** 1\
**Last updated:** [July 31, 2009, 6:50pm UTC](https://www.ruby-forum.com/t/legacy-database-primary-key-compound-with-two-fields/173028 "2009-07-31T18:50:29Z")

</div>

I am trying to define a model for a legacy database and the primary key is the combination of two fields, ‘branchcode’ and ‘debtorno’ class Custbranch \< ActiveRecord::Base set\_table\_name ‘custbranch’ set\_primary\_key…

---

## [Trouble understanding Routes](https://www.ruby-forum.com/t/trouble-understanding-routes/173019)

<div class="topic-metadata">

**Author:** [@brianp](https://www.ruby-forum.com/u/brianp)\
**Replies:** 5\
**Last updated:** [July 31, 2009, 6:45pm UTC](https://www.ruby-forum.com/t/trouble-understanding-routes/173019 "2009-07-31T18:45:15Z")

</div>

Hey Everyone, I’m new to Rails and working through the book Simply Rails 2. I’ve just hit one of my first large snags. This was my routes file: map.resources :stories, :has\_many =\> :votes, :collection =\> { :bin =\> :…

---

## [Render :partial](https://www.ruby-forum.com/t/render-partial/173029)

<div class="topic-metadata">

**Author:** [@fisa](https://www.ruby-forum.com/u/fisa)\
**Replies:** 2\
**Last updated:** [July 31, 2009, 6:41pm UTC](https://www.ruby-forum.com/t/render-partial/173029 "2009-07-31T18:41:05Z")

</div>

hi everybody, I want to pass object to a partial which execute as a collection.here is may code render :partial =\> “added\_ads”,:collection=\>@ads. here i want pass @ad object to each added\_ads partial please help me

---

## [Javascript Menu Positioning - n00b question =)](https://www.ruby-forum.com/t/javascript-menu-positioning-n00b-question/172997)

<div class="topic-metadata">

**Author:** [@jlovel](https://www.ruby-forum.com/u/jlovel)\
**Replies:** 3\
**Last updated:** [July 31, 2009, 6:05pm UTC](https://www.ruby-forum.com/t/javascript-menu-positioning-n00b-question/172997 "2009-07-31T18:05:44Z")

</div>

I am trying to make a javascript drop-down navigation menu for my first rails web site, and I am having some problems with where the menu list divs pop up on the page. What I have is a horizontal menu bar with heading…

---

## [Replacing render\_component](https://www.ruby-forum.com/t/replacing-render-component/173023)

<div class="topic-metadata">

**Author:** [@Michael\_Cugley](https://www.ruby-forum.com/u/Michael_Cugley)\
**Replies:** 4\
**Last updated:** [July 31, 2009, 5:19pm UTC](https://www.ruby-forum.com/t/replacing-render-component/173023 "2009-07-31T17:19:48Z")

</div>

New to Ruby, new to Rails. I’ve googled much on this topic, but I don’t think I have enough knowledge to form the correct queries. I’ve been given the task of resurrecting an old Rails app that’s not seen the light o…

---

## [Rails beginner training](https://www.ruby-forum.com/t/rails-beginner-training/172929)

<div class="topic-metadata">

**Author:** [@bloodniece](https://www.ruby-forum.com/u/bloodniece)\
**Replies:** 3\
**Last updated:** [July 31, 2009, 4:47pm UTC](https://www.ruby-forum.com/t/rails-beginner-training/172929 "2009-07-31T16:47:02Z")

</div>

Will any recommened quality training, online or instructor lead of rails for beginners? Do I need to have a solid background in Ruby first? I don’t, its more beginner too, but I have been writing Perl for 8 years no…

---

## [How to give the condition between Id field and name field](https://www.ruby-forum.com/t/how-to-give-the-condition-between-id-field-and-name-field/173009)

<div class="topic-metadata">

**Author:** [@sts](https://www.ruby-forum.com/u/sts)\
**Replies:** 1\
**Last updated:** [July 31, 2009, 3:40pm UTC](https://www.ruby-forum.com/t/how-to-give-the-condition-between-id-field-and-name-field/173009 "2009-07-31T15:40:58Z")

</div>

Hi, Am having a table with quetion\_id , nominees and vote\_count. In which the values for question\_id and nominees are prepopulated from other tables with vote\_count as zero. If the users select some nominees the vote…

---

## [NoMethodError (undefined method \`\[\]' for nil:NilClass)](https://www.ruby-forum.com/t/nomethoderror-undefined-method-for-nil-nilclass/173024)

<div class="topic-metadata">

**Author:** [@seenu](https://www.ruby-forum.com/u/seenu)\
**Replies:** 3\
**Last updated:** [July 31, 2009, 3:39pm UTC](https://www.ruby-forum.com/t/nomethoderror-undefined-method-for-nil-nilclass/173024 "2009-07-31T15:39:44Z")

</div>

Hi everyone this is the error that’s been killing me, please tell where i am missing. I have upgraded my rails version from 1.2.3 to 2.3.2 and have installed active\_scaffold plugin, since then this error started which …

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

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