# Rails

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

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

---

## [Does id have special meaning?](https://www.ruby-forum.com/t/does-id-have-special-meaning/129496)

<div class="topic-metadata">

**Author:** [@hei](https://www.ruby-forum.com/u/hei)\
**Replies:** 2\
**Last updated:** [February 19, 2008, 6:05am UTC](https://www.ruby-forum.com/t/does-id-have-special-meaning/129496 "2008-02-19T06:05:10Z")

</div>

I want to make four links with different arguments but the same action. The first time, I did it like this: \<%= link\_to ‘xx’ {:action =\> xx, :id =\> 0} %\> \<%= link\_to ‘xx’ {:action =\> xx, :id =\> 1} %\> \<%= link\_to ‘xx…

---

## [Paypal subscription with RoR](https://www.ruby-forum.com/t/paypal-subscription-with-ror/129285)

<div class="topic-metadata">

**Author:** [@dhaval\_parikh33](https://www.ruby-forum.com/u/dhaval_parikh33)\
**Replies:** 11\
**Last updated:** [February 19, 2008, 5:51am UTC](https://www.ruby-forum.com/t/paypal-subscription-with-ror/129285 "2008-02-19T05:51:14Z")

</div>

Hi all What i want to do is that I want to integrate my site with paypal (which i have already done) but the problem i m facing is that i have a email address field which i m getting from the user…now after the user f…

---

## [Using Class Variables](https://www.ruby-forum.com/t/using-class-variables/129482)

<div class="topic-metadata">

**Author:** [@sithadmin](https://www.ruby-forum.com/u/sithadmin)\
**Replies:** 3\
**Last updated:** [February 19, 2008, 3:46am UTC](https://www.ruby-forum.com/t/using-class-variables/129482 "2008-02-19T03:46:25Z")

</div>

Hello, I haven’t used class variables before (I’m new to RoR and OOP in general…) and I think I need to use them for part of my program. I have several different views for my controller “compare”. For each view, I ne…

---

## [Slightly OT, Issue with mysql 5.0 and root password](https://www.ruby-forum.com/t/slightly-ot-issue-with-mysql-5-0-and-root-password/129441)

<div class="topic-metadata">

**Author:** [@rykkers](https://www.ruby-forum.com/u/rykkers)\
**Replies:** 2\
**Last updated:** [February 19, 2008, 3:34am UTC](https://www.ruby-forum.com/t/slightly-ot-issue-with-mysql-5-0-and-root-password/129441 "2008-02-19T03:34:58Z")

</div>

Since upgrading my MacBook to leopard I’ve been experiencing a frustrating issue with MySQL. I installed rb-mysql using macports, which installed mysql 5 as well. The problem is that unlike before I can’t get into mys…

---

## [Have you used Desert plugin?](https://www.ruby-forum.com/t/have-you-used-desert-plugin/129490)

<div class="topic-metadata">

**Author:** [@nicholas-henry](https://www.ruby-forum.com/u/nicholas-henry)\
**Replies:** 0\
**Last updated:** [February 19, 2008, 1:06am UTC](https://www.ruby-forum.com/t/have-you-used-desert-plugin/129490 "2008-02-19T01:06:43Z")

</div>

I was wondering if any one has used the Desert plugin\[1\], and why they decided to go with this solution over Engines. Any feedback would be much appreciated! Cheers, Nicholas \[1\] http://pivotalrb.rubyforge.org/svn/d…

---

## [Upgrade to 2.0.2 issue re active record method missing](https://www.ruby-forum.com/t/upgrade-to-2-0-2-issue-re-active-record-method-missing/129458)

<div class="topic-metadata">

**Author:** [@doug3](https://www.ruby-forum.com/u/doug3)\
**Replies:** 3\
**Last updated:** [February 18, 2008, 11:59pm UTC](https://www.ruby-forum.com/t/upgrade-to-2-0-2-issue-re-active-record-method-missing/129458 "2008-02-18T23:59:54Z")

</div>

Greetings, Thanks to this weekend’s BlueHost upgrade (without any notice to their customers) to rails version 2.0.2 my application broke. Since they seem incapable of fixing the issue, I decided to try and upgrade th…

---

## [Output XML](https://www.ruby-forum.com/t/output-xml/129471)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [February 18, 2008, 11:50pm UTC](https://www.ruby-forum.com/t/output-xml/129471 "2008-02-18T23:50:19Z")

</div>

Hi, I have a Rails app that I want to create a XML response, what is the best way to do this. It is running on leopard if that makes any difference. Kind regards, Dave.

---

## [After\_update woes](https://www.ruby-forum.com/t/after-update-woes/129475)

<div class="topic-metadata">

**Author:** [@InnerSparkMedia](https://www.ruby-forum.com/u/InnerSparkMedia)\
**Replies:** 6\
**Last updated:** [February 18, 2008, 11:48pm UTC](https://www.ruby-forum.com/t/after-update-woes/129475 "2008-02-18T23:48:39Z")

</div>

Hey everyone. I am trying to run a an external process after a update from the view. I currently have it set up to run after\_update but it seems that the transaction it uses hasn’t been closed at that point. My proces…

---

## [Capistrano and nginx](https://www.ruby-forum.com/t/capistrano-and-nginx/175821)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 4\
**Last updated:** [February 18, 2008, 11:43pm UTC](https://www.ruby-forum.com/t/capistrano-and-nginx/175821 "2008-02-18T23:43:16Z")

</div>

I’m using nginx with capistrano to deploy my Rails app and I’m having a hard time getting the maintenance capistrano task (deploy:web:disable) to work like I want. I want nginx to redirect all requests to public/maint…

---

## ["java.sql.SQLException: invalid arguments in call" using Oracle config with JRoR](https://www.ruby-forum.com/t/java-sql-sqlexception-invalid-arguments-in-call-using-oracle-config-with-jror/129465)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [February 18, 2008, 10:45pm UTC](https://www.ruby-forum.com/t/java-sql-sqlexception-invalid-arguments-in-call-using-oracle-config-with-jror/129465 "2008-02-18T22:45:58Z")

</div>

Hi, All, J. Ruby N. here. I’m trying to get JRuby on Rails to start using Oracle, but I get “The driver encountered an error: java.sql.SQLException: invalid arguments in call”. I’ve got the driver jar in the right pla…

---

## [Passing XSL output from a controller to a view](https://www.ruby-forum.com/t/passing-xsl-output-from-a-controller-to-a-view/129472)

<div class="topic-metadata">

**Author:** [@andya](https://www.ruby-forum.com/u/andya)\
**Replies:** 0\
**Last updated:** [February 18, 2008, 10:29pm UTC](https://www.ruby-forum.com/t/passing-xsl-output-from-a-controller-to-a-view/129472 "2008-02-18T22:29:21Z")

</div>

Hi, I’m just getting started with Rails, and I’m trying to adapt one of my Ruby programs to the Rails environment. My controller produces an HTML document as part of its work, which I want to display in my rhtml vie…

---

## [Problem with foreign keys not working](https://www.ruby-forum.com/t/problem-with-foreign-keys-not-working/129462)

<div class="topic-metadata">

**Author:** [@Backov](https://www.ruby-forum.com/u/Backov)\
**Replies:** 2\
**Last updated:** [February 18, 2008, 10:22pm UTC](https://www.ruby-forum.com/t/problem-with-foreign-keys-not-working/129462 "2008-02-18T22:22:15Z")

</div>

I’m a rails noob. :slight\_smile: That said, I’ve been doing not too bad but am stumbling over a basic problem, probably a naming issue. Here’s the steup: class GeneralModType \< ActiveRecord::Base has\_and\_belongs\_to\_m…

---

## [How to embed variables in a link\_to](https://www.ruby-forum.com/t/how-to-embed-variables-in-a-link-to/129336)

<div class="topic-metadata">

**Author:** [@sithadmin](https://www.ruby-forum.com/u/sithadmin)\
**Replies:** 4\
**Last updated:** [February 18, 2008, 10:07pm UTC](https://www.ruby-forum.com/t/how-to-embed-variables-in-a-link-to/129336 "2008-02-18T22:07:35Z")

</div>

Hello, I’m just trying to figure out how to put a variable into a link\_to. I want to have the number of rows from my SQL statement in it. For example: perfect matches (123) where 123 is the number of rows. I current…

---

## ["URL" model not possible?](https://www.ruby-forum.com/t/url-model-not-possible/129380)

<div class="topic-metadata">

**Author:** [@joergbattermann](https://www.ruby-forum.com/u/joergbattermann)\
**Replies:** 3\
**Last updated:** [February 18, 2008, 9:59pm UTC](https://www.ruby-forum.com/t/url-model-not-possible/129380 "2008-02-18T21:59:49Z")

</div>

Hello there, I just added an URL model to my app (allowing users to basically add urls etc), which works perfectly fine on the console, but the views are not working properly. I always get the following error (e.g. wh…

---

## [Image Problem using /public](https://www.ruby-forum.com/t/image-problem-using-public/129452)

<div class="topic-metadata">

**Author:** [@sithadmin](https://www.ruby-forum.com/u/sithadmin)\
**Replies:** 2\
**Last updated:** [February 18, 2008, 8:45pm UTC](https://www.ruby-forum.com/t/image-problem-using-public/129452 "2008-02-18T20:45:21Z")

</div>

Hi everyone, I’m having some funky errors with my images on my rails app. When I am at the index page of my “compare” controller, the images work great (used a layout). However, when I go to any action in that control…

---

## [Destroy, dependent and performance](https://www.ruby-forum.com/t/destroy-dependent-and-performance/129238)

<div class="topic-metadata">

**Author:** [@masylum](https://www.ruby-forum.com/u/masylum)\
**Replies:** 3\
**Last updated:** [February 18, 2008, 8:01pm UTC](https://www.ruby-forum.com/t/destroy-dependent-and-performance/129238 "2008-02-18T20:01:02Z")

</div>

Hi! This is my first post in this forum. I’m learning RoR for two weeks and I’m very interested about how to improve this framework. I was testing one app I’m working in and I had some problems with destroying. The …

---

## [Need help figuring out this code block](https://www.ruby-forum.com/t/need-help-figuring-out-this-code-block/129348)

<div class="topic-metadata">

**Author:** [@newbee-robert](https://www.ruby-forum.com/u/newbee-robert)\
**Replies:** 4\
**Last updated:** [February 18, 2008, 8:00pm UTC](https://www.ruby-forum.com/t/need-help-figuring-out-this-code-block/129348 "2008-02-18T20:00:27Z")

</div>

I posted this on the Ruby board but it may belong here. I have a piece of code below. I have activities hooked up to a Calendar but I’m running into a problem I can’t wrap my head around. What I’m trying to achieve …

---

## [HABTM and multiple select](https://www.ruby-forum.com/t/habtm-and-multiple-select/129455)

<div class="topic-metadata">

**Author:** [@ankit2584](https://www.ruby-forum.com/u/ankit2584)\
**Replies:** 0\
**Last updated:** [February 18, 2008, 7:46pm UTC](https://www.ruby-forum.com/t/habtm-and-multiple-select/129455 "2008-02-18T19:46:54Z")

</div>

Hello, I have two tables “people” and “relations” Following are the models class Person \< ActiveRecord::Base has\_and\_belongs\_to\_many :relations class Relation \< ActiveRecord::Base has\_and\_belongs\_to\_many :people I…

---

## [Link\_to\_remote - pass javascript variables](https://www.ruby-forum.com/t/link-to-remote-pass-javascript-variables/129454)

<div class="topic-metadata">

**Author:** [@cayennext](https://www.ruby-forum.com/u/cayennext)\
**Replies:** 0\
**Last updated:** [February 18, 2008, 7:26pm UTC](https://www.ruby-forum.com/t/link-to-remote-pass-javascript-variables/129454 "2008-02-18T19:26:53Z")

</div>

\<%= link\_to\_remote “sometext”, :url =\> { :action =\> :someaction, :x =\> “object.getX()”, :y =\> “object.getY()” }, :complete =\> “onComplete(request)” %\> problem: object.getX() passes unevaluated. how to pass value of …

---

## [Slideshow in rails](https://www.ruby-forum.com/t/slideshow-in-rails/129132)

<div class="topic-metadata">

**Author:** [@ankit2584](https://www.ruby-forum.com/u/ankit2584)\
**Replies:** 7\
**Last updated:** [February 18, 2008, 7:10pm UTC](https://www.ruby-forum.com/t/slideshow-in-rails/129132 "2008-02-18T19:10:45Z")

</div>

Hello, I want to create a slideshow of photogrpahs in rails. Can anyone suggest me how do i proceed. I will store the pictures directly on the disk. Thanks you.

---

## [Rails as an automated test framework](https://www.ruby-forum.com/t/rails-as-an-automated-test-framework/129444)

<div class="topic-metadata">

**Author:** [@burrowsm](https://www.ruby-forum.com/u/burrowsm)\
**Replies:** 1\
**Last updated:** [February 18, 2008, 6:35pm UTC](https://www.ruby-forum.com/t/rails-as-an-automated-test-framework/129444 "2008-02-18T18:35:53Z")

</div>

We are investigating the use RoR as the infrastructure for an automated test framework. Our application runs in a browser, so some form of watir-based test framework seems ideal. The Rails database would be used to s…

---

## [Image Problem in Production](https://www.ruby-forum.com/t/image-problem-in-production/129447)

<div class="topic-metadata">

**Author:** [@malioboro](https://www.ruby-forum.com/u/malioboro)\
**Replies:** 2\
**Last updated:** [February 18, 2008, 6:24pm UTC](https://www.ruby-forum.com/t/image-problem-in-production/129447 "2008-02-18T18:24:38Z")

</div>

Hello, I have problem in displaying image from database when production (All work well unless displaying image from database), please help me how to display my image. DATABASE DETAIL employee\_name, type data -\> varch…

---

## [Embedding a full form in a helper](https://www.ruby-forum.com/t/embedding-a-full-form-in-a-helper/126943)

<div class="topic-metadata">

**Author:** [@Pito](https://www.ruby-forum.com/u/Pito)\
**Replies:** 2\
**Last updated:** [February 18, 2008, 5:53pm UTC](https://www.ruby-forum.com/t/embedding-a-full-form-in-a-helper/126943 "2008-02-18T17:53:16Z")

</div>

I am trying to get this to work: def do\_button(event\_type) varname = event\_type.name.underscore humanname = event\_type.new.event\_name\_string form\_for (@user, :url =\> “do\_#{varname}\_user\_path(@user)”) do | form| sub…

---

## [Database Config Documentation](https://www.ruby-forum.com/t/database-config-documentation/129436)

<div class="topic-metadata">

**Author:** [@seth](https://www.ruby-forum.com/u/seth)\
**Replies:** 2\
**Last updated:** [February 18, 2008, 5:13pm UTC](https://www.ruby-forum.com/t/database-config-documentation/129436 "2008-02-18T17:13:59Z")

</div>

I’m am extremely confused (disappointed?) right now. For the life of me, I can’t find any documentation on database setup, database.yml setup, etc. This seems like the most basic thing in the world. How did I miss …

---

## [How to write acts\_as style model extensions?](https://www.ruby-forum.com/t/how-to-write-acts-as-style-model-extensions/129438)

<div class="topic-metadata">

**Author:** [@johnlester](https://www.ruby-forum.com/u/johnlester)\
**Replies:** 0\
**Last updated:** [February 18, 2008, 4:47pm UTC](https://www.ruby-forum.com/t/how-to-write-acts-as-style-model-extensions/129438 "2008-02-18T16:47:28Z")

</div>

Hi, I want to have a go at writing an extension to my models, in a similar style to those acts\_as model extensions. I want to have a sigle declaration that includes my functionality, similar to “acts\_as\_taggable” and …

---

## [Polymorphic association vs HABTM](https://www.ruby-forum.com/t/polymorphic-association-vs-habtm/129434)

<div class="topic-metadata">

**Author:** [@ankit2584](https://www.ruby-forum.com/u/ankit2584)\
**Replies:** 1\
**Last updated:** [February 18, 2008, 4:32pm UTC](https://www.ruby-forum.com/t/polymorphic-association-vs-habtm/129434 "2008-02-18T16:32:13Z")

</div>

Hello, Is there any advantage of using polymorphic associations instead of HABTM. Can anyone give me an example to explain. Thank you.

---

## [Basic Help - non-standard table-name](https://www.ruby-forum.com/t/basic-help-non-standard-table-name/129409)

<div class="topic-metadata">

**Author:** [@justsomeone](https://www.ruby-forum.com/u/justsomeone)\
**Replies:** 6\
**Last updated:** [February 18, 2008, 4:01pm UTC](https://www.ruby-forum.com/t/basic-help-non-standard-table-name/129409 "2008-02-18T16:01:45Z")

</div>

Hi all, I’m trying to get my first real ruby on rails app started, but I have two basic problems. The book I’m using is pre 2.0; also I need to use a pre-existing table whose name is not per ruby convention - eg inst…

---

## [PayPal integration with Rails shopping cart](https://www.ruby-forum.com/t/paypal-integration-with-rails-shopping-cart/128282)

<div class="topic-metadata">

**Author:** [@Nishant\_Sinha](https://www.ruby-forum.com/u/Nishant_Sinha)\
**Replies:** 2\
**Last updated:** [February 18, 2008, 3:47pm UTC](https://www.ruby-forum.com/t/paypal-integration-with-rails-shopping-cart/128282 "2008-02-18T15:47:24Z")

</div>

Hello everyone, I have 3 main questions and they are: Is it possible to integrate the PayPal payment gateway within our website? My client doesn’t want the customer to be directed to the PayPal website to complete …

---

## [HAML: strip white space from output?](https://www.ruby-forum.com/t/haml-strip-white-space-from-output/129424)

<div class="topic-metadata">

**Author:** [@josh](https://www.ruby-forum.com/u/josh)\
**Replies:** 0\
**Last updated:** [February 18, 2008, 2:16pm UTC](https://www.ruby-forum.com/t/haml-strip-white-space-from-output/129424 "2008-02-18T14:16:12Z")

</div>

Hi all Is there an option for HAML that strips all unnecessary white space, line breaks etc. from the output to save some bandwidth? For SASS I found such configuration, but not for HAML… Thanks for info. Josh

---

## [One test affects another](https://www.ruby-forum.com/t/one-test-affects-another/196597)

<div class="topic-metadata">

**Author:** [@dean](https://www.ruby-forum.com/u/dean)\
**Replies:** 9\
**Last updated:** [February 18, 2008, 2:04pm UTC](https://www.ruby-forum.com/t/one-test-affects-another/196597 "2008-02-18T14:04:44Z")

</div>

I have the following class: class Brewer \< ActiveRecord::Base class EmailNotFound \< StandardError; end class \<\< self def find\_by\_email(\*args) b = super(\*args) raise EmailNotFound if b.nil? return b end end end …

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

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