# Rails

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

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

---

## [Using custom routes to handle new nested resources](https://www.ruby-forum.com/t/using-custom-routes-to-handle-new-nested-resources/142808)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 1\
**Last updated:** [July 11, 2008, 10:51pm UTC](https://www.ruby-forum.com/t/using-custom-routes-to-handle-new-nested-resources/142808 "2008-07-11T22:51:12Z")

</div>

I have a couple of resources, one nested in the other, such that my resource spec in routes.rb is: map.resources :parents, :has\_many =\> :children This will generate a route for a new child that assumes that the parent …

---

## [302 Found](https://www.ruby-forum.com/t/302-found/142832)

<div class="topic-metadata">

**Author:** [@snantz](https://www.ruby-forum.com/u/snantz)\
**Replies:** 1\
**Last updated:** [July 11, 2008, 10:45pm UTC](https://www.ruby-forum.com/t/302-found/142832 "2008-07-11T22:45:52Z")

</div>

I found this in my apps log and I think it is hinting as to why a part of my app is not working, but I am not exactly sure what it means. What does it mean? Thanks, -S

---

## [Catch all errors in script/runner?](https://www.ruby-forum.com/t/catch-all-errors-in-script-runner/142835)

<div class="topic-metadata">

**Author:** [@Reid\_Lynch](https://www.ruby-forum.com/u/Reid_Lynch)\
**Replies:** 0\
**Last updated:** [July 11, 2008, 10:44pm UTC](https://www.ruby-forum.com/t/catch-all-errors-in-script-runner/142835 "2008-07-11T22:44:42Z")

</div>

I have a rails app that is run exclusively as a script/runner process, and I’d like to be able to catch all errors that occur in these processes in a standardized way. With a normal rails app, one can override rescue\_…

---

## [Defaults js and caching problem](https://www.ruby-forum.com/t/defaults-js-and-caching-problem/142786)

<div class="topic-metadata">

**Author:** [@comopasta](https://www.ruby-forum.com/u/comopasta)\
**Replies:** 1\
**Last updated:** [July 11, 2008, 10:44pm UTC](https://www.ruby-forum.com/t/defaults-js-and-caching-problem/142786 "2008-07-11T22:44:15Z")

</div>

Hi, I’m trying to cache my stylesheets and javascripts. I’m in production mode. Everything looks ok with the stylesheets. \<%= stylesheet\_link\_tag :all, :cache =\> true %\> Is generating all.css that contains two css f…

---

## [Namespaced controllers and helpers](https://www.ruby-forum.com/t/namespaced-controllers-and-helpers/142814)

<div class="topic-metadata">

**Author:** [@pkoebbe](https://www.ruby-forum.com/u/pkoebbe)\
**Replies:** 1\
**Last updated:** [July 11, 2008, 10:10pm UTC](https://www.ruby-forum.com/t/namespaced-controllers-and-helpers/142814 "2008-07-11T22:10:06Z")

</div>

Is there something different that has to be done in order to use helper modules in namespaced controllers? I have some custom helpers in app/helpers/\*\_helper.rb that work great in controllers in app/controllers but no…

---

## [Contador de registros con will paginate](https://www.ruby-forum.com/t/contador-de-registros-con-will-paginate/142829)

<div class="topic-metadata">

**Author:** [@aprendiz\_ror](https://www.ruby-forum.com/u/aprendiz_ror)\
**Replies:** 0\
**Last updated:** [July 11, 2008, 9:58pm UTC](https://www.ruby-forum.com/t/contador-de-registros-con-will-paginate/142829 "2008-07-11T21:58:04Z")

</div>

contador de registros… cordial saludo

---

## [:index option for form select](https://www.ruby-forum.com/t/index-option-for-form-select/142828)

<div class="topic-metadata">

**Author:** [@markmt](https://www.ruby-forum.com/u/markmt)\
**Replies:** 0\
**Last updated:** [July 11, 2008, 9:26pm UTC](https://www.ruby-forum.com/t/index-option-for-form-select/142828 "2008-07-11T21:26:14Z")

</div>

I’ve found the :index option to be useful and necessary for form methods when I have a form that contains fields for multiple records, some of which have already been saved previously and some of which are new. Howev…

---

## [Outputting to webpage the lines of a file or array as each line is processed.. eg ob\_flush() for Ru](https://www.ruby-forum.com/t/outputting-to-webpage-the-lines-of-a-file-or-array-as-each-line-is-processed-eg-ob-flush-for-ru/142809)

<div class="topic-metadata">

**Author:** [@jamietssg](https://www.ruby-forum.com/u/jamietssg)\
**Replies:** 1\
**Last updated:** [July 11, 2008, 9:17pm UTC](https://www.ruby-forum.com/t/outputting-to-webpage-the-lines-of-a-file-or-array-as-each-line-is-processed-eg-ob-flush-for-ru/142809 "2008-07-11T21:17:26Z")

</div>

Hello all, I have some code that reads and works on each row of an array. Is it possible for Ruby on Rails to to display in a view/webpage each row as it is processed. The idea is that I want the user of the app to …

---

## [Form\_tag and hidden text fields](https://www.ruby-forum.com/t/form-tag-and-hidden-text-fields/142819)

<div class="topic-metadata">

**Author:** [@joel](https://www.ruby-forum.com/u/joel)\
**Replies:** 1\
**Last updated:** [July 11, 2008, 8:19pm UTC](https://www.ruby-forum.com/t/form-tag-and-hidden-text-fields/142819 "2008-07-11T20:19:28Z")

</div>

Hello, while designing a form with the form\_for tag, I m not being able to hide my text fields. Here is an excerpt of my code : \<% form\_for :foo, @foo, :url =\> { :controller=\>“foo”,:action =\> “create” } do |f| %\> \<%…

---

## [Stylesheet](https://www.ruby-forum.com/t/stylesheet/142817)

<div class="topic-metadata">

**Author:** [@jturney](https://www.ruby-forum.com/u/jturney)\
**Replies:** 1\
**Last updated:** [July 11, 2008, 8:12pm UTC](https://www.ruby-forum.com/t/stylesheet/142817 "2008-07-11T20:12:31Z")

</div>

index.html.erb: Add User user.css: #user-list .list-title { color: #244; font-weight: bold; font-size: larger; } users.html.erb: \<%= stylesheet\_link\_tag ‘scaffold’, ‘user’ %\> My styles don’t seem to …

---

## [Upcoming BackgrounDRb release and bug fix fest now](https://www.ruby-forum.com/t/upcoming-backgroundrb-release-and-bug-fix-fest-now/142815)

<div class="topic-metadata">

**Author:** [@gnufied](https://www.ruby-forum.com/u/gnufied)\
**Replies:** 0\
**Last updated:** [July 11, 2008, 7:29pm UTC](https://www.ruby-forum.com/t/upcoming-backgroundrb-release-and-bug-fix-fest-now/142815 "2008-07-11T19:29:43Z")

</div>

Folks, We are planning to get new release of BackgrounDRb out of the door and we need help from you. This release will be a major improvement over previous releases and will be 100% covered with test cases. Here are…

---

## [Converting table names to model names](https://www.ruby-forum.com/t/converting-table-names-to-model-names/142804)

<div class="topic-metadata">

**Author:** [@jeff](https://www.ruby-forum.com/u/jeff)\
**Replies:** 3\
**Last updated:** [July 11, 2008, 7:17pm UTC](https://www.ruby-forum.com/t/converting-table-names-to-model-names/142804 "2008-07-11T19:17:25Z")

</div>

Hi, I’m trying to get a list of all models in my app without looking at the /models folder on disk (long story). I thought I’d just get the table names and convert them into class names: ActiveRecord::Base.connectio…

---

## [Stack visual\_effect - possible?](https://www.ruby-forum.com/t/stack-visual-effect-possible/136099)

<div class="topic-metadata">

**Author:** [@rornoob](https://www.ruby-forum.com/u/rornoob)\
**Replies:** 6\
**Last updated:** [July 11, 2008, 7:12pm UTC](https://www.ruby-forum.com/t/stack-visual-effect-possible/136099 "2008-07-11T19:12:09Z")

</div>

Is it possible to apply two visual\_effect to the same DOM ID? I can get it to work like this: page\[:current\_item\].visual\_effect :highlight, :start\_color =\> “#fff”, :end\_color =\> “#000” page\[:current\_item\].visual\_effe…

---

## [Problems with the use of time in the migration](https://www.ruby-forum.com/t/problems-with-the-use-of-time-in-the-migration/142777)

<div class="topic-metadata">

**Author:** [@JolSSSS](https://www.ruby-forum.com/u/JolSSSS)\
**Replies:** 1\
**Last updated:** [July 11, 2008, 7:11pm UTC](https://www.ruby-forum.com/t/problems-with-the-use-of-time-in-the-migration/142777 "2008-07-11T19:11:34Z")

</div>

Hi! I created a table like this: create\_table :work\_items do |t| t.date :execution\_date t.string :section t.integer :member\_id t.time :duration t.text :description t.timestamps end I need the duration field to …

---

## [Ruby: No such file or directory --script/plungin (LoadError)](https://www.ruby-forum.com/t/ruby-no-such-file-or-directory-script-plungin-loaderror/142810)

<div class="topic-metadata">

**Author:** [@sirkay](https://www.ruby-forum.com/u/sirkay)\
**Replies:** 1\
**Last updated:** [July 11, 2008, 7:04pm UTC](https://www.ruby-forum.com/t/ruby-no-such-file-or-directory-script-plungin-loaderror/142810 "2008-07-11T19:04:27Z")

</div>

I am trying to install Restful\_authentication with the command code below: ruby script/plugin install http://svn.techno-weenie.net/projects/plugins/restful\_authentication but unfortunately I am getting the above erro…

---

## [SOAP request formed correctly the first time, extra env:Header/ tag added on subsequent invocations](https://www.ruby-forum.com/t/soap-request-formed-correctly-the-first-time-extra-env-header-tag-added-on-subsequent-invocations/142811)

<div class="topic-metadata">

**Author:** [@ian](https://www.ruby-forum.com/u/ian)\
**Replies:** 0\
**Last updated:** [July 11, 2008, 7:01pm UTC](https://www.ruby-forum.com/t/soap-request-formed-correctly-the-first-time-extra-env-header-tag-added-on-subsequent-invocations/142811 "2008-07-11T19:01:01Z")

</div>

I have the following code in a controller. New to Rails, so please tell me if I’m doing something here that should be in a different part of the application. The weird thing is that this code works fine ONCE, the firs…

---

## [Extra field as attribute in join table with has\_many :through](https://www.ruby-forum.com/t/extra-field-as-attribute-in-join-table-with-has-many-through/142581)

<div class="topic-metadata">

**Author:** [@crossblaim](https://www.ruby-forum.com/u/crossblaim)\
**Replies:** 3\
**Last updated:** [July 11, 2008, 6:52pm UTC](https://www.ruby-forum.com/t/extra-field-as-attribute-in-join-table-with-has-many-through/142581 "2008-07-11T18:52:49Z")

</div>

hi everyone, I’ve pasted some code over there http://pastie.org/230343 . what I find strange is that the extra field in the join table called “quantity” doesn’t shows up in the Drug resultset, even if I added an attr…

---

## [Mod\_rails showing plain text instead of actual page](https://www.ruby-forum.com/t/mod-rails-showing-plain-text-instead-of-actual-page/135266)

<div class="topic-metadata">

**Author:** [@Mister\_Blood\_R](https://www.ruby-forum.com/u/Mister_Blood_R)\
**Replies:** 2\
**Last updated:** [July 11, 2008, 6:40pm UTC](https://www.ruby-forum.com/t/mod-rails-showing-plain-text-instead-of-actual-page/135266 "2008-07-11T18:40:33Z")

</div>

hello! i got this forum powered by apache and mod\_rails lately when i create / edit posts, i get plain html text showing up instead of the actual page. here’s what i see: – Content-Type: text/html; charset=utf-8 S…

---

## [Showing another controllers action](https://www.ruby-forum.com/t/showing-another-controllers-action/142725)

<div class="topic-metadata">

**Author:** [@jsamildanach](https://www.ruby-forum.com/u/jsamildanach)\
**Replies:** 7\
**Last updated:** [July 11, 2008, 6:35pm UTC](https://www.ruby-forum.com/t/showing-another-controllers-action/142725 "2008-07-11T18:35:38Z")

</div>

If I am in controller A and I want to show the index of controller B, how would I do that?

---

## [ActiveRecord puzzler for smart kids (preserving fk inserts when using has\_many :through, :condition](https://www.ruby-forum.com/t/activerecord-puzzler-for-smart-kids-preserving-fk-inserts-when-using-has-many-through-condition/142717)

<div class="topic-metadata">

**Author:** [@tshim](https://www.ruby-forum.com/u/tshim)\
**Replies:** 2\
**Last updated:** [July 11, 2008, 6:23pm UTC](https://www.ruby-forum.com/t/activerecord-puzzler-for-smart-kids-preserving-fk-inserts-when-using-has-many-through-condition/142717 "2008-07-11T18:23:29Z")

</div>

You kids and your fancy ActiveRecord stuff. You’re having all the fun while us geezers are writing complex JOINS by hand. Whee! Wondering if anyone has reached a more elegant solution to this sort of has\_many :through…

---

## [About the upload file validate](https://www.ruby-forum.com/t/about-the-upload-file-validate/142787)

<div class="topic-metadata">

**Author:** [@daociyiyou](https://www.ruby-forum.com/u/daociyiyou)\
**Replies:** 2\
**Last updated:** [July 11, 2008, 5:15pm UTC](https://www.ruby-forum.com/t/about-the-upload-file-validate/142787 "2008-07-11T17:15:14Z")

</div>

hello: I have a method like following: def file=(file\_field) #remember to validate the content type File.open("#{RAILS\_ROOT}/public/images/users/# {file\_field.original\_filename}",“wb+”) do|i| i.write(file\_field.rea…

---

## [Confused with Active Record Associations](https://www.ruby-forum.com/t/confused-with-active-record-associations/142704)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [July 11, 2008, 5:14pm UTC](https://www.ruby-forum.com/t/confused-with-active-record-associations/142704 "2008-07-11T17:14:49Z")

</div>

Hi, I am currently learning RoR by creating a small hobby project of my own. After designing the database I immediately ran into problem. How can I express the following sql query in Active Record? select a.UnitID, …

---

## [\[ADV/UPDATE\] RailsConf Europe 2008 is approaching!](https://www.ruby-forum.com/t/adv-update-railsconf-europe-2008-is-approaching/142798)

<div class="topic-metadata">

**Author:** [@David\_ASBlack](https://www.ruby-forum.com/u/David_ASBlack)\
**Replies:** 0\
**Last updated:** [July 11, 2008, 5:13pm UTC](https://www.ruby-forum.com/t/adv-update-railsconf-europe-2008-is-approaching/142798 "2008-07-11T17:13:39Z")

</div>

Hi everyone – If you haven’t already seen it, the schedule is posted for RailsConf Europe 2008; you can find it at http://www.railsconfeurope.com, along with other information about dates and registration. Speaking o…

---

## [Mail\_fetcher socket error](https://www.ruby-forum.com/t/mail-fetcher-socket-error/142792)

<div class="topic-metadata">

**Author:** [@axees335](https://www.ruby-forum.com/u/axees335)\
**Replies:** 0\
**Last updated:** [July 11, 2008, 4:36pm UTC](https://www.ruby-forum.com/t/mail-fetcher-socket-error/142792 "2008-07-11T16:36:40Z")

</div>

Hi, I am using the mail\_fetcher from rubyforge.org/var/svn/slantwise/fetcher as described in Advanced Rails Recipes, Recipe 40. It works great, but every once in a while I get a SocketError and it dies with the er…

---

## [Login design problem](https://www.ruby-forum.com/t/login-design-problem/142790)

<div class="topic-metadata">

**Author:** [@kanekcwu](https://www.ruby-forum.com/u/kanekcwu)\
**Replies:** 1\
**Last updated:** [July 11, 2008, 4:14pm UTC](https://www.ruby-forum.com/t/login-design-problem/142790 "2008-07-11T16:14:29Z")

</div>

Hi, I am trying to implement the tutorial on this site. Dev Trademarks - Alter â€¦ -on-Rails/ Everyone seems to be going fine except for the view for the login \<% if @flash\[:message\] %\> \<%= @flash\[:message\] %\>\<% en…

---

## [Server is broken!](https://www.ruby-forum.com/t/server-is-broken/142696)

<div class="topic-metadata">

**Author:** [@mark](https://www.ruby-forum.com/u/mark)\
**Replies:** 4\
**Last updated:** [July 11, 2008, 3:14pm UTC](https://www.ruby-forum.com/t/server-is-broken/142696 "2008-07-11T15:14:48Z")

</div>

The mongrel server has mysteriously stopped working on one of my rails projects. Here’s what the console says: $ script/server =\> Booting Mongrel (use ‘script/server webrick’ to force WEBrick) =\> Rails 2.1.0 applica…

---

## [Can't get in\_place\_edit to work in rails 2.0 =\> ActionController::InvalidAuthenticityToken](https://www.ruby-forum.com/t/cant-get-in-place-edit-to-work-in-rails-2-0-actioncontroller-invalidauthenticitytoken/123811)

<div class="topic-metadata">

**Author:** [@MarcS](https://www.ruby-forum.com/u/MarcS)\
**Replies:** 20\
**Last updated:** [July 11, 2008, 2:54pm UTC](https://www.ruby-forum.com/t/cant-get-in-place-edit-to-work-in-rails-2-0-actioncontroller-invalidauthenticitytoken/123811 "2008-07-11T14:54:40Z")

</div>

Hi, I can’t get in\_place\_edit to work in rails 2.0 when updating, it always fails with the error message ActionController::InvalidAuthenticityToken I have the following code in my controller: class ArticlesControlle…

---

## [Why rails is better than php?](https://www.ruby-forum.com/t/why-rails-is-better-than-php/142702)

<div class="topic-metadata">

**Author:** [@purab](https://www.ruby-forum.com/u/purab)\
**Replies:** 12\
**Last updated:** [July 11, 2008, 1:53pm UTC](https://www.ruby-forum.com/t/why-rails-is-better-than-php/142702 "2008-07-11T13:53:10Z")

</div>

I have three years of experience in developing application in PHP. From last one and half year i am working with rails. i found me very comfortable with rails. In PHP we cannot develop app with test cases and test dri…

---

## [Submit\_to\_remote with an image\_tag](https://www.ruby-forum.com/t/submit-to-remote-with-an-image-tag/141878)

<div class="topic-metadata">

**Author:** [@suneeta](https://www.ruby-forum.com/u/suneeta)\
**Replies:** 3\
**Last updated:** [July 11, 2008, 1:45pm UTC](https://www.ruby-forum.com/t/submit-to-remote-with-an-image-tag/141878 "2008-07-11T13:45:34Z")

</div>

Hi… I’m using submit\_to\_remote, \<%= submit\_to\_remote ‘save\_btn’, ‘Save’, :url =\> { :controller =\> ‘ci’, :action =\> ‘edit\_ci\_functional\_spec’, :ci =\> @ci, :from =\> ‘show’ }, :html =\> {:class =\> ‘itilbutton1’}%\> Now …

---

## [Submit form\_remote\_tag with JavaScript](https://www.ruby-forum.com/t/submit-form-remote-tag-with-javascript/142718)

<div class="topic-metadata">

**Author:** [@idledaylight](https://www.ruby-forum.com/u/idledaylight)\
**Replies:** 2\
**Last updated:** [July 11, 2008, 1:18pm UTC](https://www.ruby-forum.com/t/submit-form-remote-tag-with-javascript/142718 "2008-07-11T13:18:35Z")

</div>

I’m trying to submit a form\_remote\_tag using javascript instead of an input button. However, when I do this the ajax doesn’t fire on submit. Is there a way to do this?

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

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