# Rails

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

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

---

## [Pass the current controller to the model](https://www.ruby-forum.com/t/pass-the-current-controller-to-the-model/110235)

<div class="topic-metadata">

**Author:** [@tripdragon](https://www.ruby-forum.com/u/tripdragon)\
**Replies:** 8\
**Last updated:** [July 25, 2007, 4:21pm UTC](https://www.ruby-forum.com/t/pass-the-current-controller-to-the-model/110235 "2007-07-25T16:21:42Z")

</div>

In the end under the model I need to beable to do this dirname = “/public/shows/#{controller.controller\_name}/” Thats it really. I am hacking a swfupload script and need to be able to break it into lots of controllers…

---

## [Inserting parent record's details into new page](https://www.ruby-forum.com/t/inserting-parent-records-details-into-new-page/110333)

<div class="topic-metadata">

**Author:** [@nanouk](https://www.ruby-forum.com/u/nanouk)\
**Replies:** 0\
**Last updated:** [July 25, 2007, 12:50pm UTC](https://www.ruby-forum.com/t/inserting-parent-records-details-into-new-page/110333 "2007-07-25T12:50:31Z")

</div>

I have a list of steps. My step controller has the following method: def display\_stepinfo @step = Step.find(params\[:id\]) @metrics = @step.step\_metrics end Upon clicking a step, its metrics are displayed on a new pa…

---

## [Routing problem: extending matched route segment](https://www.ruby-forum.com/t/routing-problem-extending-matched-route-segment/110327)

<div class="topic-metadata">

**Author:** [@ingoweiss](https://www.ruby-forum.com/u/ingoweiss)\
**Replies:** 0\
**Last updated:** [July 25, 2007, 11:47am UTC](https://www.ruby-forum.com/t/routing-problem-extending-matched-route-segment/110327 "2007-07-25T11:47:31Z")

</div>

Hi all, I would like to route a request to a specific domain (‘request\_routing’ plugin installed) to controllers living in a subfolder for that domain like this: http://www.mydomain.com/home/index :controller =\> ‘my…

---

## [How to pull the title and url from an iframe?](https://www.ruby-forum.com/t/how-to-pull-the-title-and-url-from-an-iframe/110222)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 4\
**Last updated:** [July 25, 2007, 10:35am UTC](https://www.ruby-forum.com/t/how-to-pull-the-title-and-url-from-an-iframe/110222 "2007-07-25T10:35:39Z")

</div>

I have an iframe in which the user can browse. When they hit the ‘add this page’ button i need to retrieve the url and the title of the page currently shown in the iframe. Does anyone know how to do this? Do i need …

---

## [Acts\_as\_multi\_versioned](https://www.ruby-forum.com/t/acts-as-multi-versioned/106812)

<div class="topic-metadata">

**Author:** [@Tobias\_Numiranta](https://www.ruby-forum.com/u/Tobias_Numiranta)\
**Replies:** 1\
**Last updated:** [July 25, 2007, 9:59am UTC](https://www.ruby-forum.com/t/acts-as-multi-versioned/106812 "2007-07-25T09:59:15Z")

</div>

Hi, I’ve been playing around with something I call acts\_as\_multi\_versioned. The difference from acts\_as\_versioned is that you can work with different versions simultaneously. For example if one session sees one versio…

---

## [Dbase query performance vs. iterating over large result arra](https://www.ruby-forum.com/t/dbase-query-performance-vs-iterating-over-large-result-arra/110291)

<div class="topic-metadata">

**Author:** [@Astorian](https://www.ruby-forum.com/u/Astorian)\
**Replies:** 1\
**Last updated:** [July 25, 2007, 9:28am UTC](https://www.ruby-forum.com/t/dbase-query-performance-vs-iterating-over-large-result-arra/110291 "2007-07-25T09:28:00Z")

</div>

Hello Folks. Please excuse my beginner’s ignorance … My question regards database query performance vs. iterating over nested results in an array. In the example below, a Project has many Tasks. Tasks have a due date.…

---

## [Installation problem](https://www.ruby-forum.com/t/installation-problem/110317)

<div class="topic-metadata">

**Author:** [@devashish](https://www.ruby-forum.com/u/devashish)\
**Replies:** 0\
**Last updated:** [July 25, 2007, 9:12am UTC](https://www.ruby-forum.com/t/installation-problem/110317 "2007-07-25T09:12:26Z")

</div>

Hi, I am trying to install Ruby gems on SUSE Linux 10.0, while executing the command “sudo gem install rails” I am getting a error /usr/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:21:in require\_\_': no such file…

---

## [YARV howto](https://www.ruby-forum.com/t/yarv-howto/110230)

<div class="topic-metadata">

**Author:** [@abhijith\_gopal](https://www.ruby-forum.com/u/abhijith_gopal)\
**Replies:** 2\
**Last updated:** [July 25, 2007, 7:17am UTC](https://www.ruby-forum.com/t/yarv-howto/110230 "2007-07-25T07:17:18Z")

</div>

Hi all, I just built yarv from source on my gentoo box. I have no clue on how to use it(or run it!). Can somebody please help me out with this. – Regards Abhijith

---

## [\[ANN\] vim-rails package for Ubuntu/Debian](https://www.ruby-forum.com/t/ann-vim-rails-package-for-ubuntu-debian/110309)

<div class="topic-metadata">

**Author:** [@neilw](https://www.ruby-forum.com/u/neilw)\
**Replies:** 0\
**Last updated:** [July 25, 2007, 5:51am UTC](https://www.ruby-forum.com/t/ann-vim-rails-package-for-ubuntu-debian/110309 "2007-07-25T05:51:40Z")

</div>

In my continuing quest for productivity and an easy life, I’ve put together a .deb package of vim-scripts that change vim from merely the world’s greatest editor into a powerhouse for Rails development. But more impor…

---

## [RE: Lookng for some developers](https://www.ruby-forum.com/t/re-lookng-for-some-developers/110308)

<div class="topic-metadata">

**Author:** [@VVVVVV](https://www.ruby-forum.com/u/VVVVVV)\
**Replies:** 0\
**Last updated:** [July 25, 2007, 4:51am UTC](https://www.ruby-forum.com/t/re-lookng-for-some-developers/110308 "2007-07-25T04:51:32Z")

</div>

AdBidCentral is growing as the leading marketplace for premium display advertising. Our best-of-breed technology enables easy, efficient and intuitive placement of display advertising on the internet’s premier sites. …

---

## [A design question](https://www.ruby-forum.com/t/a-design-question/110301)

<div class="topic-metadata">

**Author:** [@maestro777](https://www.ruby-forum.com/u/maestro777)\
**Replies:** 9\
**Last updated:** [July 25, 2007, 4:39am UTC](https://www.ruby-forum.com/t/a-design-question/110301 "2007-07-25T04:39:17Z")

</div>

I have a design question that I hope someone can help shed some light on. I have a view file which generates a chart. Before it can generate the chart, it needs the input from an XML file. I have a method in my contr…

---

## [Strange rake behavior](https://www.ruby-forum.com/t/strange-rake-behavior/110303)

<div class="topic-metadata">

**Author:** [@gcnovus](https://www.ruby-forum.com/u/gcnovus)\
**Replies:** 1\
**Last updated:** [July 25, 2007, 2:23am UTC](https://www.ruby-forum.com/t/strange-rake-behavior/110303 "2007-07-25T02:23:13Z")

</div>

I’m getting some really really really odd testing behavior. Running rake test:units passes with flying colors. (Well, that’s not what I mean by weird, but I suppose it is :wink: ) Running rake test:functionals yi…

---

## [Cap deployment painfully slow](https://www.ruby-forum.com/t/cap-deployment-painfully-slow/110272)

<div class="topic-metadata">

**Author:** [@blinking\_bear](https://www.ruby-forum.com/u/blinking_bear)\
**Replies:** 2\
**Last updated:** [July 25, 2007, 1:21am UTC](https://www.ruby-forum.com/t/cap-deployment-painfully-slow/110272 "2007-07-25T01:21:06Z")

</div>

We have a 3 environment deployment setup to Dev, Stage, and Production boxes. For some reason, the production deployment is painfully slow. It hangs on the ‘subversion is asking for a password’ line for about 4 minu…

---

## [Nested params and redirect\_to](https://www.ruby-forum.com/t/nested-params-and-redirect-to/110297)

<div class="topic-metadata">

**Author:** [@giorgio](https://www.ruby-forum.com/u/giorgio)\
**Replies:** 2\
**Last updated:** [July 25, 2007, 1:14am UTC](https://www.ruby-forum.com/t/nested-params-and-redirect-to/110297 "2007-07-25T01:14:23Z")

</div>

I have a simple client search screen that posts the following params: Parameters: {“search”=\>“Search”, “action”=\>“list”, “client\_search”=\>{“first\_name”=\>“jane”, last\_name"=\>“smith”}, “controller”=\>“client”} This work…

---

## [Timeout error](https://www.ruby-forum.com/t/timeout-error/108550)

<div class="topic-metadata">

**Author:** [@migo](https://www.ruby-forum.com/u/migo)\
**Replies:** 2\
**Last updated:** [July 25, 2007, 12:57am UTC](https://www.ruby-forum.com/t/timeout-error/108550 "2007-07-25T00:57:45Z")

</div>

Hallo, I am donig a rather long script execution via script/runner (quering a xmlrpc webservice). After about 5 minutes the execution stops raising the following error. /usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/com…

---

## [XML Element attributes](https://www.ruby-forum.com/t/xml-element-attributes/110292)

<div class="topic-metadata">

**Author:** [@maestro777](https://www.ruby-forum.com/u/maestro777)\
**Replies:** 2\
**Last updated:** [July 25, 2007, 12:56am UTC](https://www.ruby-forum.com/t/xml-element-attributes/110292 "2007-07-25T00:56:44Z")

</div>

Hi. I’m trying to create an XML file of the following schema: Some description text here Some description text here And I only managed to accomplish the following schema: July 12 …

---

## [Re-writing a jscript in Ruby](https://www.ruby-forum.com/t/re-writing-a-jscript-in-ruby/110286)

<div class="topic-metadata">

**Author:** [@pk16](https://www.ruby-forum.com/u/pk16)\
**Replies:** 0\
**Last updated:** [July 24, 2007, 10:39pm UTC](https://www.ruby-forum.com/t/re-writing-a-jscript-in-ruby/110286 "2007-07-24T22:39:48Z")

</div>

Hi, does anyone have experience in this subject? I might have to re- write a jscript running on a windows platform to something that can run under linux. I was thinking of using Ruby but I’m not sure if its the right …

---

## ["Recognizing" a controller and action from an URL?](https://www.ruby-forum.com/t/recognizing-a-controller-and-action-from-an-url/110282)

<div class="topic-metadata">

**Author:** [@darth\_ivan](https://www.ruby-forum.com/u/darth_ivan)\
**Replies:** 1\
**Last updated:** [July 24, 2007, 10:32pm UTC](https://www.ruby-forum.com/t/recognizing-a-controller-and-action-from-an-url/110282 "2007-07-24T22:32:22Z")

</div>

Hi, I’m trying to find something in ActionController::Routing that can help me find out which controller and action are responsible for a certain URL. So far it seems something like this might be an answer: request,…

---

## [How much view logic in controller?](https://www.ruby-forum.com/t/how-much-view-logic-in-controller/110248)

<div class="topic-metadata">

**Author:** [@dnstevenson](https://www.ruby-forum.com/u/dnstevenson)\
**Replies:** 5\
**Last updated:** [July 24, 2007, 9:36pm UTC](https://www.ruby-forum.com/t/how-much-view-logic-in-controller/110248 "2007-07-24T21:36:47Z")

</div>

I’m working on my first AJAX-heavy app… it’s for an intranet app and is intended to feel a bit like a desktop app… in other words, there is a lot of asynchronous updating going on and very few “page views”. I’m findin…

---

## [The occasional capistrano 503](https://www.ruby-forum.com/t/the-occasional-capistrano-503/110271)

<div class="topic-metadata">

**Author:** [@blinking\_bear](https://www.ruby-forum.com/u/blinking_bear)\
**Replies:** 0\
**Last updated:** [July 24, 2007, 8:35pm UTC](https://www.ruby-forum.com/t/the-occasional-capistrano-503/110271 "2007-07-24T20:35:25Z")

</div>

About one in ten deployments usually results in a 503. I run cap stop\_app/start\_app a few times and it seems to then ‘take’ and the site is up. I’m not really sure why this happens, which log files would you recomm…

---

## [Newbie Question (belongs\_to and has\_many)](https://www.ruby-forum.com/t/newbie-question-belongs-to-and-has-many/110263)

<div class="topic-metadata">

**Author:** [@ghoti143](https://www.ruby-forum.com/u/ghoti143)\
**Replies:** 4\
**Last updated:** [July 24, 2007, 8:00pm UTC](https://www.ruby-forum.com/t/newbie-question-belongs-to-and-has-many/110263 "2007-07-24T20:00:57Z")

</div>

Hi All, I am running from the console. I have two models i\_test and test\_question. Model i\_test has\_many test\_questions and test\_questions belong\_to i\_test Example 1 below works fine, but when I wrap the same code in…

---

## [Setting "defaults" on AR finds](https://www.ruby-forum.com/t/setting-defaults-on-ar-finds/110260)

<div class="topic-metadata">

**Author:** [@jjkiesch](https://www.ruby-forum.com/u/jjkiesch)\
**Replies:** 1\
**Last updated:** [July 24, 2007, 7:58pm UTC](https://www.ruby-forum.com/t/setting-defaults-on-ar-finds/110260 "2007-07-24T19:58:26Z")

</div>

let’s say i have a Category model. every time i pull the categories, i am writing something along the lines of @categories = Category.find(:all, :order =\> :position) is there a way to put something in the model so tha…

---

## [Reusing partials](https://www.ruby-forum.com/t/reusing-partials/110249)

<div class="topic-metadata">

**Author:** [@matt\_99](https://www.ruby-forum.com/u/matt_99)\
**Replies:** 2\
**Last updated:** [July 24, 2007, 6:28pm UTC](https://www.ruby-forum.com/t/reusing-partials/110249 "2007-07-24T18:28:56Z")

</div>

Might be asking a daft question or missing something obvious here as I’m a bit of noob at this, I’ve got the code below in a partial and am using it to display and attach skills to degrees which is working fine, I now…

---

## [Rails, Mongrel, and Capistrano 2.0](https://www.ruby-forum.com/t/rails-mongrel-and-capistrano-2-0/110254)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [July 24, 2007, 6:12pm UTC](https://www.ruby-forum.com/t/rails-mongrel-and-capistrano-2-0/110254 "2007-07-24T18:12:03Z")

</div>

Hi all, I just finished setting up Rails, Mongrel, and Capistrano 2.0, and I wrote down the steps I followed. Experienced Capistrano users might not find anything useful, but I’m hoping it’ll help newcomers to Capis…

---

## [Pre-populating a has\_many relationship?](https://www.ruby-forum.com/t/pre-populating-a-has-many-relationship/110253)

<div class="topic-metadata">

**Author:** [@dmorin](https://www.ruby-forum.com/u/dmorin)\
**Replies:** 0\
**Last updated:** [July 24, 2007, 6:10pm UTC](https://www.ruby-forum.com/t/pre-populating-a-has-many-relationship/110253 "2007-07-24T18:10:03Z")

</div>

I am disappointed with myself that I can’t find the answer to this, but I’ve spent the morning trying various things and am obviously missing something. I have a simple setup where a Plan has\_many Years. What I want…

---

## [Community poll about testing and specs](https://www.ruby-forum.com/t/community-poll-about-testing-and-specs/110199)

<div class="topic-metadata">

**Author:** [@Obie\_F](https://www.ruby-forum.com/u/Obie_F)\
**Replies:** 10\
**Last updated:** [July 24, 2007, 6:04pm UTC](https://www.ruby-forum.com/t/community-poll-about-testing-and-specs/110199 "2007-07-24T18:04:32Z")

</div>

Hi everyone, I’m currently reviewing and revising the Testing chapter of my upcoming book The Rails Way and I would like to include perspectives from the wider Rails community about the subject. If you have a few mom…

---

## [Iframe permission problems](https://www.ruby-forum.com/t/iframe-permission-problems/110252)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 0\
**Last updated:** [July 24, 2007, 5:23pm UTC](https://www.ruby-forum.com/t/iframe-permission-problems/110252 "2007-07-24T17:23:30Z")

</div>

I have some javascript code that’s meant to pull out the url and title of whatever’s in an iframe: top.iframe\_name.location.href top.iframe\_name.document.title However i’m getting this script error when i call the ac…

---

## [Gem install mysql fails](https://www.ruby-forum.com/t/gem-install-mysql-fails/110034)

<div class="topic-metadata">

**Author:** [@Hassan\_S](https://www.ruby-forum.com/u/Hassan_S)\
**Replies:** 7\
**Last updated:** [July 24, 2007, 4:23pm UTC](https://www.ruby-forum.com/t/gem-install-mysql-fails/110034 "2007-07-24T16:23:43Z")

</div>

I’ve found other online references to this error: ERROR: While executing gem … (Gem::Installer::ExtensionBuildError) ERROR: Failed to build gem native extension. ruby extconf.rb install mysql checking for mysql\_quer…

---

## [Executing a static javascript function after every event](https://www.ruby-forum.com/t/executing-a-static-javascript-function-after-every-event/110228)

<div class="topic-metadata">

**Author:** [@prism](https://www.ruby-forum.com/u/prism)\
**Replies:** 1\
**Last updated:** [July 24, 2007, 4:10pm UTC](https://www.ruby-forum.com/t/executing-a-static-javascript-function-after-every-event/110228 "2007-07-24T16:10:41Z")

</div>

Hi, is there any way to (automatically?) call a javascript function whenever something has happened in the view? Or at least when the view has changed. I.e. I have a function that vertically resizes and positions ele…

---

## [Help getting into console](https://www.ruby-forum.com/t/help-getting-into-console/110027)

<div class="topic-metadata">

**Author:** [@nuby2ruby](https://www.ruby-forum.com/u/nuby2ruby)\
**Replies:** 12\
**Last updated:** [July 24, 2007, 3:11pm UTC](https://www.ruby-forum.com/t/help-getting-into-console/110027 "2007-07-24T15:11:02Z")

</div>

I need help getting into console. I could have sworn I did everything right, but on 3 different computers I get the exact same error. C:\\rails\_apps\\test\>ruby script/console Loading development environment. c:/ruby/li…

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

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