# Rails

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

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

---

## [Will\_paginate and :order](https://www.ruby-forum.com/t/will-paginate-and-order/124506)

<div class="topic-metadata">

**Author:** [@jawosis](https://www.ruby-forum.com/u/jawosis)\
**Replies:** 1\
**Last updated:** [December 29, 2007, 11:23am UTC](https://www.ruby-forum.com/t/will-paginate-and-order/124506 "2007-12-29T11:23:10Z")

</div>

Does someone uses the :order paramter? My queries will always ordered by created\_at. Thanx – Jochen K.

---

## [Counter\_cache and collections](https://www.ruby-forum.com/t/counter-cache-and-collections/124483)

<div class="topic-metadata">

**Author:** [@acampos](https://www.ruby-forum.com/u/acampos)\
**Replies:** 1\
**Last updated:** [December 29, 2007, 8:56am UTC](https://www.ruby-forum.com/t/counter-cache-and-collections/124483 "2007-12-29T08:56:18Z")

</div>

I’ve got a has\_many/belongs\_to association between two Rails models and I’m caching the child counter in the parent model via a counter\_cache. When adding a child to the parent via the ‘\<\<’ method of the parent, I wa…

---

## [\[ANN\] BackgrounDRb 1.0 pre-release available now](https://www.ruby-forum.com/t/ann-backgroundrb-1-0-pre-release-available-now/122710)

<div class="topic-metadata">

**Author:** [@gnufied](https://www.ruby-forum.com/u/gnufied)\
**Replies:** 12\
**Last updated:** [December 29, 2007, 8:39am UTC](https://www.ruby-forum.com/t/ann-backgroundrb-1-0-pre-release-available-now/122710 "2007-12-29T08:39:57Z")

</div>

Hi Folks, We are glad to announce shiny new release of BackgrounDRb, which will soon become 1.0. A quick summary of changes: BackgrounDRb is no londer DRb, its based on event driven network programming library pa…

---

## [MySQL transactions not working in unit tests?](https://www.ruby-forum.com/t/mysql-transactions-not-working-in-unit-tests/123561)

<div class="topic-metadata">

**Author:** [@ed\_ruder](https://www.ruby-forum.com/u/ed_ruder)\
**Replies:** 3\
**Last updated:** [December 29, 2007, 7:27am UTC](https://www.ruby-forum.com/t/mysql-transactions-not-working-in-unit-tests/123561 "2007-12-29T07:27:28Z")

</div>

I just installed acts\_as\_authenticated into an app and one of its unit tests is failing. The cause is that another unit test’s changes to the AAA fixtures aren’t being rolled back. I’m confused, since I have transacti…

---

## [Belongs\_to herself](https://www.ruby-forum.com/t/belongs-to-herself/124451)

<div class="topic-metadata">

**Author:** [@adam](https://www.ruby-forum.com/u/adam)\
**Replies:** 6\
**Last updated:** [December 29, 2007, 6:44am UTC](https://www.ruby-forum.com/t/belongs-to-herself/124451 "2007-12-29T06:44:50Z")

</div>

Hi! I have a problem with belongs\_to and has\_many, the thing is i have a category table which points to herself if it’s a subcategory of another category. I just started using ruby on rails, and don’t know how to imp…

---

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

<div class="topic-metadata">

**Author:** [@daveh](https://www.ruby-forum.com/u/daveh)\
**Replies:** 1\
**Last updated:** [December 29, 2007, 6:12am UTC](https://www.ruby-forum.com/t/installation-problem/121212 "2007-12-29T06:12:04Z")

</div>

Hi there, I am trying to set up my rails environment on my mac (OSX leopard) I have installed MySQL and it works fine with CocoaMySQL. I have edited the database.yml file to represent my databases. But, when i try and…

---

## [Change\_column](https://www.ruby-forum.com/t/change-column/124405)

<div class="topic-metadata">

**Author:** [@suneeta](https://www.ruby-forum.com/u/suneeta)\
**Replies:** 3\
**Last updated:** [December 29, 2007, 5:34am UTC](https://www.ruby-forum.com/t/change-column/124405 "2007-12-29T05:34:06Z")

</div>

Hi… I’ve a table named software\_cis. I need to change the type of the column ci\_class in this table from string to integer. For this i generated a migration file named ChangeCiClassToInteger. class ChangeCiClassToInt…

---

## [No template error when there is a template](https://www.ruby-forum.com/t/no-template-error-when-there-is-a-template/124488)

<div class="topic-metadata">

**Author:** [@clemrock](https://www.ruby-forum.com/u/clemrock)\
**Replies:** 0\
**Last updated:** [December 29, 2007, 4:23am UTC](https://www.ruby-forum.com/t/no-template-error-when-there-is-a-template/124488 "2007-12-29T04:23:24Z")

</div>

Hello, I have a method that’s being called from a flash sendAndLoad function and, occasionally, our production errors show the rails method will trigger a no template error. Here’s the rails method: def get\_video…

---

## [(no subject)](https://www.ruby-forum.com/t/no-subject/124487)

<div class="topic-metadata">

**Author:** [@ara.t.howard](https://www.ruby-forum.com/u/ara.t.howard)\
**Replies:** 0\
**Last updated:** [December 29, 2007, 4:10am UTC](https://www.ruby-forum.com/t/no-subject/124487 "2007-12-29T04:10:27Z")

</div>

NAME bj SYNOPSIS bj (migration\_code|generate\_migration|migrate|setup|plugin|run| submit|list|set|config|pid) \[options\]+ HISTORY 1.0.0: - use full path to ruby for plugin mode - plugin correctly installs bin --\>\> …

---

## [LIKE clause in rails](https://www.ruby-forum.com/t/like-clause-in-rails/124450)

<div class="topic-metadata">

**Author:** [@ankit2584](https://www.ruby-forum.com/u/ankit2584)\
**Replies:** 11\
**Last updated:** [December 29, 2007, 2:58am UTC](https://www.ruby-forum.com/t/like-clause-in-rails/124450 "2007-12-29T02:58:29Z")

</div>

Hello, I am trying to achieve a search functionality in the following manner i have an table called people which has first\_name,last\_name,etc… After the user form to search people is submitted i get the params hash …

---

## [Submit upon select helper?](https://www.ruby-forum.com/t/submit-upon-select-helper/124448)

<div class="topic-metadata">

**Author:** [@eggman2001](https://www.ruby-forum.com/u/eggman2001)\
**Replies:** 2\
**Last updated:** [December 29, 2007, 2:35am UTC](https://www.ruby-forum.com/t/submit-upon-select-helper/124448 "2007-12-29T02:35:40Z")

</div>

Does anyone know of one? I want a select menu that will submit upon selection rather than requiring a submit\_tag. Does anyone know of one?

---

## [Ruby on rails written in javascript. .... to much](https://www.ruby-forum.com/t/ruby-on-rails-written-in-javascript-to-much/124482)

<div class="topic-metadata">

**Author:** [@gemblon](https://www.ruby-forum.com/u/gemblon)\
**Replies:** 0\
**Last updated:** [December 29, 2007, 2:02am UTC](https://www.ruby-forum.com/t/ruby-on-rails-written-in-javascript-to-much/124482 "2007-12-29T02:02:18Z")

</div>

http://code.google.com/p/trimpath/wiki/RubyRailsVsJavaScriptJunction

---

## [Ajaxing Checkboxes](https://www.ruby-forum.com/t/ajaxing-checkboxes/124452)

<div class="topic-metadata">

**Author:** [@ngm](https://www.ruby-forum.com/u/ngm)\
**Replies:** 1\
**Last updated:** [December 29, 2007, 1:48am UTC](https://www.ruby-forum.com/t/ajaxing-checkboxes/124452 "2007-12-29T01:48:54Z")

</div>

Hi, I’ve the following call to link\_to\_remote: \<% @calendars.each do |c| %\> \<%= link\_to\_remote 'dont show '+c.name, :url =\> { :action =\> ‘update\_calendar’, :id =\> c.id } %\> It shows a list with calendars. When the …

---

## [20-Minute Quick Start Guide for RFacebook - 10 Easy Steps to Create a Facebook App Using Rails](https://www.ruby-forum.com/t/20-minute-quick-start-guide-for-rfacebook-10-easy-steps-to-create-a-facebook-app-using-rails/124480)

<div class="topic-metadata">

**Author:** [@gerald\_b](https://www.ruby-forum.com/u/gerald_b)\
**Replies:** 1\
**Last updated:** [December 29, 2007, 1:31am UTC](https://www.ruby-forum.com/t/20-minute-quick-start-guide-for-rfacebook-10-easy-steps-to-create-a-facebook-app-using-rails/124480 "2007-12-29T01:31:56Z")

</div>

Hello, I’ve published a new 20-Minute Quick Start Guide for RFacebook that shows you how to create a Facebook application from scratch using Ruby on Rails in 10 easy steps: o Install the rfacebook gem o Create a Rai…

---

## [No Connection Thru http://localhost:3000](https://www.ruby-forum.com/t/no-connection-thru-http-localhost-3000/124474)

<div class="topic-metadata">

**Author:** [@cadesign](https://www.ruby-forum.com/u/cadesign)\
**Replies:** 2\
**Last updated:** [December 29, 2007, 1:04am UTC](https://www.ruby-forum.com/t/no-connection-thru-http-localhost-3000/124474 "2007-12-29T01:04:25Z")

</div>

Hello, I’m new to ROR so I’m hoping I’ve found the right forum. My problem is that when I set up my ROR environment and direct my browser to http://localhost:3000, I get the following page: \[Replace this File! This …

---

## [Proper way for deploying many applications sharing a common user database](https://www.ruby-forum.com/t/proper-way-for-deploying-many-applications-sharing-a-common-user-database/124416)

<div class="topic-metadata">

**Author:** [@Ersin\_Er](https://www.ruby-forum.com/u/Ersin_Er)\
**Replies:** 4\
**Last updated:** [December 29, 2007, 12:47am UTC](https://www.ruby-forum.com/t/proper-way-for-deploying-many-applications-sharing-a-common-user-database/124416 "2007-12-29T00:47:28Z")

</div>

Hi, I know that it’s possible to use multiple databases with Rails. However most of the examples I have seen were for high availability. I would like to learn if anyone has any experience with a shared database among…

---

## [Displaying html from variable](https://www.ruby-forum.com/t/displaying-html-from-variable/124471)

<div class="topic-metadata">

**Author:** [@spokra](https://www.ruby-forum.com/u/spokra)\
**Replies:** 2\
**Last updated:** [December 29, 2007, 12:31am UTC](https://www.ruby-forum.com/t/displaying-html-from-variable/124471 "2007-12-29T00:31:41Z")

</div>

how do i stop rails from escaping the html and pass it directly to the browser? so the browser renders the html instead of displaying the actual html code.

---

## [Finding Associated Records](https://www.ruby-forum.com/t/finding-associated-records/124465)

<div class="topic-metadata">

**Author:** [@jasonmorrison](https://www.ruby-forum.com/u/jasonmorrison)\
**Replies:** 1\
**Last updated:** [December 29, 2007, 12:18am UTC](https://www.ruby-forum.com/t/finding-associated-records/124465 "2007-12-29T00:18:16Z")

</div>

I am trying to find all associated tickets with an employee. I am very new to HABTM so I am having some trouble. view: time.html.erb \<h1\>Time Report for \<%= @employee.name %\>\</h1\> \<table cellpading="10" cellspacing="…

---

## [Strange Array behavior after upgrading to Rails 2.0.2](https://www.ruby-forum.com/t/strange-array-behavior-after-upgrading-to-rails-2-0-2/124424)

<div class="topic-metadata">

**Author:** [@tuktuk](https://www.ruby-forum.com/u/tuktuk)\
**Replies:** 6\
**Last updated:** [December 29, 2007, 12:03am UTC](https://www.ruby-forum.com/t/strange-array-behavior-after-upgrading-to-rails-2-0-2/124424 "2007-12-29T00:03:50Z")

</div>

I’ve come around a strange problem, after upgrading to 2.0.2. I have subclassed the Array class with this method to extract a random item (I haven’t made it myself, but it is quite clever): class Array def random(wei…

---

## [What's the best way to pass string value from View to Controller?](https://www.ruby-forum.com/t/whats-the-best-way-to-pass-string-value-from-view-to-controller/124364)

<div class="topic-metadata">

**Author:** [@coolJay](https://www.ruby-forum.com/u/coolJay)\
**Replies:** 5\
**Last updated:** [December 28, 2007, 11:47pm UTC](https://www.ruby-forum.com/t/whats-the-best-way-to-pass-string-value-from-view-to-controller/124364 "2007-12-28T23:47:49Z")

</div>

I need to pass a string value from view to controller besides the form\_remote\_tag value… What’s the best way to do it? Is it possible to pass a parameter in send\_data method? For instance, send\_data( channel\_info) ? …

---

## [How to get parameters of page in view](https://www.ruby-forum.com/t/how-to-get-parameters-of-page-in-view/124190)

<div class="topic-metadata">

**Author:** [@ruchita](https://www.ruby-forum.com/u/ruchita)\
**Replies:** 9\
**Last updated:** [December 28, 2007, 11:38pm UTC](https://www.ruby-forum.com/t/how-to-get-parameters-of-page-in-view/124190 "2007-12-28T23:38:27Z")

</div>

Hi all, I have to put serial numbers but in pagination. If in my coding i put loop like \<% i=1 @products.each do |product| i = i+1 %\> … serial number \<%= i %\> ....... It displays number from 1 to 9 but when i go …

---

## [Attachment\_fu: I just want an attachment](https://www.ruby-forum.com/t/attachment-fu-i-just-want-an-attachment/124383)

<div class="topic-metadata">

**Author:** [@dnstevenson](https://www.ruby-forum.com/u/dnstevenson)\
**Replies:** 5\
**Last updated:** [December 28, 2007, 11:25pm UTC](https://www.ruby-forum.com/t/attachment-fu-i-just-want-an-attachment/124383 "2007-12-28T23:25:30Z")

</div>

Everything I have seen about attachment\_fu seems to deal with models which are themselves attachments. I want actual attachments. In other words, I want a user profile model to have an image attachment with size con…

---

## [Model command?](https://www.ruby-forum.com/t/model-command/124457)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [December 28, 2007, 10:58pm UTC](https://www.ruby-forum.com/t/model-command/124457 "2007-12-28T22:58:27Z")

</div>

I’m using the login\_generator and with this new version of Rails, I can’t even get my app to work. Everything gives a 500 error. In the console, it says this error: undefined method \`model’ for ApplicationController:C…

---

## [Use of self reflection to determine possible actions](https://www.ruby-forum.com/t/use-of-self-reflection-to-determine-possible-actions/123443)

<div class="topic-metadata">

**Author:** [@crispy](https://www.ruby-forum.com/u/crispy)\
**Replies:** 8\
**Last updated:** [December 28, 2007, 10:14pm UTC](https://www.ruby-forum.com/t/use-of-self-reflection-to-determine-possible-actions/123443 "2007-12-28T22:14:30Z")

</div>

Is there a way to use either Ruby or Rail’s self reflection to return a list of actions a given controller can respond to? I found the “methods” method, but it appears to return everything, including all of the super …

---

## [Accessing Global Variable](https://www.ruby-forum.com/t/accessing-global-variable/124441)

<div class="topic-metadata">

**Author:** [@ngm](https://www.ruby-forum.com/u/ngm)\
**Replies:** 3\
**Last updated:** [December 28, 2007, 9:25pm UTC](https://www.ruby-forum.com/t/accessing-global-variable/124441 "2007-12-28T21:25:13Z")

</div>

Sorry guys, It’s a simple question but I’m a bit lost: I’ve the following controller: class CalendarController \< ApplicationController $srcArray = Array.new def index @calendars = Calendar.find(:all) @calendars.ea…

---

## [Validates\_file\_format\_of only when is there an image](https://www.ruby-forum.com/t/validates-file-format-of-only-when-is-there-an-image/124290)

<div class="topic-metadata">

**Author:** [@stratboy](https://www.ruby-forum.com/u/stratboy)\
**Replies:** 4\
**Last updated:** [December 28, 2007, 9:04pm UTC](https://www.ruby-forum.com/t/validates-file-format-of-only-when-is-there-an-image/124290 "2007-12-28T21:04:02Z")

</div>

i have a model with this: file\_column :image validates\_file\_format\_of :image, :in =\> \[“gif”, “png”, “jpg”\] If inthe form the user not insert the image i receive an error. If i remove: validates\_file\_format\_of :image…

---

## [Using Multiple select Dropdown with database](https://www.ruby-forum.com/t/using-multiple-select-dropdown-with-database/103325)

<div class="topic-metadata">

**Author:** [@aveo](https://www.ruby-forum.com/u/aveo)\
**Replies:** 3\
**Last updated:** [December 28, 2007, 8:55pm UTC](https://www.ruby-forum.com/t/using-multiple-select-dropdown-with-database/103325 "2007-12-28T20:55:26Z")

</div>

Hi all, I am working on a database and need the capabilities to have a drop down field (list) that can handle multiple selections. I cannot figure out how to store the data in the database, retrieve the values from th…

---

## [Each\_value](https://www.ruby-forum.com/t/each-value/124442)

<div class="topic-metadata">

**Author:** [@ankit2584](https://www.ruby-forum.com/u/ankit2584)\
**Replies:** 3\
**Last updated:** [December 28, 2007, 6:47pm UTC](https://www.ruby-forum.com/t/each-value/124442 "2007-12-28T18:47:58Z")

</div>

Hello, I have a params hash which is called params\[:person\] my people database has fields first\_name last\_name etc… When the web form is submitted for creation of a person, the params\[:person\] contains the value …

---

## [Message to user while page loads](https://www.ruby-forum.com/t/message-to-user-while-page-loads/124433)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [December 28, 2007, 6:40pm UTC](https://www.ruby-forum.com/t/message-to-user-while-page-loads/124433 "2007-12-28T18:40:55Z")

</div>

In my RoR project, I have an action that loads a ton of information than displays it to the user. When the user ask that resource, he has to wait a couple of seconds before something shows up. I’d like to give users…

---

## [Grabbing NTLM tokens](https://www.ruby-forum.com/t/grabbing-ntlm-tokens/124443)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [December 28, 2007, 6:15pm UTC](https://www.ruby-forum.com/t/grabbing-ntlm-tokens/124443 "2007-12-28T18:15:04Z")

</div>

I’m running a mongrel cluster behind apache 2 on a linux box and would like to grab the NTLM token(s) from an IE client logged on through the active directory domain. Has anyone done anything like this? Thank you

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

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