# Rails

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

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

---

## [Buttons for a drop-down list](https://www.ruby-forum.com/t/buttons-for-a-drop-down-list/123388)

<div class="topic-metadata">

**Author:** [@Thufir](https://www.ruby-forum.com/u/Thufir)\
**Replies:** 0\
**Last updated:** [December 17, 2007, 10:35am UTC](https://www.ruby-forum.com/t/buttons-for-a-drop-down-list/123388 "2007-12-17T10:35:22Z")

</div>

The “show” for a row from feeds works correctly, showing both rows which that feed row. However, I’d like to add a “add” button (and a “remove”?) to the “Editing feed” page so that the the rows from categories will b…

---

## [Restful\_authentication: update of users' attributes on every page load upon 'Remember me' being ena](https://www.ruby-forum.com/t/restful-authentication-update-of-users-attributes-on-every-page-load-upon-remember-me-being-ena/123354)

<div class="topic-metadata">

**Author:** [@justbe](https://www.ruby-forum.com/u/justbe)\
**Replies:** 2\
**Last updated:** [December 17, 2007, 9:52am UTC](https://www.ruby-forum.com/t/restful-authentication-update-of-users-attributes-on-every-page-load-upon-remember-me-being-ena/123354 "2007-12-17T09:52:37Z")

</div>

Hello there, I just noticed a kinda weird thing: if users log in with the ‘Remember Me’ option enabled, their records in the db get updated everytime the user reloads a page, because apparently restful\_authentication’…

---

## [Are you the ROR developer in India?](https://www.ruby-forum.com/t/are-you-the-ror-developer-in-india/123384)

<div class="topic-metadata">

**Author:** [@ayyanar](https://www.ruby-forum.com/u/ayyanar)\
**Replies:** 0\
**Last updated:** [December 17, 2007, 9:31am UTC](https://www.ruby-forum.com/t/are-you-the-ror-developer-in-india/123384 "2007-12-17T09:31:41Z")

</div>

Hi Guys, Nowadays lot of indian developers posting questions in the forum. Out of interest I like to take the survey on how many indian companies started doing development in ROR. Kindly post your details. About myse…

---

## [Testing error messages on objects with multiple validations](https://www.ruby-forum.com/t/testing-error-messages-on-objects-with-multiple-validations/123378)

<div class="topic-metadata">

**Author:** [@mstreffo](https://www.ruby-forum.com/u/mstreffo)\
**Replies:** 2\
**Last updated:** [December 17, 2007, 9:28am UTC](https://www.ruby-forum.com/t/testing-error-messages-on-objects-with-multiple-validations/123378 "2007-12-17T09:28:04Z")

</div>

I have 2 validations on a single object, like this in my user model: validates\_length\_of :password, :within =\> 6…12 validates\_presence\_of :password When I do a unit test to ensure a missing password is responded to c…

---

## [Search engine](https://www.ruby-forum.com/t/search-engine/123379)

<div class="topic-metadata">

**Author:** [@seena](https://www.ruby-forum.com/u/seena)\
**Replies:** 2\
**Last updated:** [December 17, 2007, 8:27am UTC](https://www.ruby-forum.com/t/search-engine/123379 "2007-12-17T08:27:23Z")

</div>

hi, am facing a problem with installing a search engine n wud need some help, trying to install acts\_as\_solr “script/plugin install svn://svn.railsfreaks.com/projects/acts\_as\_solr/trunk” for this as the requirement i…

---

## [Server overloaded error with hosting of ruby on rails site](https://www.ruby-forum.com/t/server-overloaded-error-with-hosting-of-ruby-on-rails-site/123381)

<div class="topic-metadata">

**Author:** [@ror-user](https://www.ruby-forum.com/u/ror-user)\
**Replies:** 0\
**Last updated:** [December 17, 2007, 8:16am UTC](https://www.ruby-forum.com/t/server-overloaded-error-with-hosting-of-ruby-on-rails-site/123381 "2007-12-17T08:16:44Z")

</div>

Hi all, I am trying to host the site and i am getting error error 502 server overloaded. Can anyone tell me why this error is coming? Is there some problem related to server or code? Thanks, Rohit.

---

## [State changing click on divs](https://www.ruby-forum.com/t/state-changing-click-on-divs/123292)

<div class="topic-metadata">

**Author:** [@tomn](https://www.ruby-forum.com/u/tomn)\
**Replies:** 2\
**Last updated:** [December 17, 2007, 5:53am UTC](https://www.ruby-forum.com/t/state-changing-click-on-divs/123292 "2007-12-17T05:53:24Z")

</div>

I’ve moving on from the data collection part of my app to the data manipulation part and I’m at loss how to proceed, whether I need to put asside my rails booka and learn some java or not. I will have a view that iter…

---

## [Rails 2.0](https://www.ruby-forum.com/t/rails-2-0/123373)

<div class="topic-metadata">

**Author:** [@subash](https://www.ruby-forum.com/u/subash)\
**Replies:** 1\
**Last updated:** [December 17, 2007, 5:43am UTC](https://www.ruby-forum.com/t/rails-2-0/123373 "2007-12-17T05:43:35Z")

</div>

Many of them started working on rails 2.0, Is there any good tutorial for that. If yes, please put the material links here. Thanks

---

## [Storing seconds, retrieving sensible data](https://www.ruby-forum.com/t/storing-seconds-retrieving-sensible-data/123353)

<div class="topic-metadata">

**Author:** [@galeal](https://www.ruby-forum.com/u/galeal)\
**Replies:** 2\
**Last updated:** [December 17, 2007, 5:38am UTC](https://www.ruby-forum.com/t/storing-seconds-retrieving-sensible-data/123353 "2007-12-17T05:38:55Z")

</div>

I want to construct a time period, i.e. say a user has 1 month, 3 days and 10 hours to do something. I want to store this information in a database, and instead of storing this information in 3 fields, I want to store…

---

## [Associations between 3 models](https://www.ruby-forum.com/t/associations-between-3-models/123352)

<div class="topic-metadata">

**Author:** [@Abhin\_H](https://www.ruby-forum.com/u/Abhin_H)\
**Replies:** 2\
**Last updated:** [December 17, 2007, 5:06am UTC](https://www.ruby-forum.com/t/associations-between-3-models/123352 "2007-12-17T05:06:12Z")

</div>

Hi, I have this requirement where in the association needs to be between 3 models. I want a User to select a Gift to be sent to a particular Destinations. For this I created a Model RequestForGift with foreign keys …

---

## [Code that controller and view can access](https://www.ruby-forum.com/t/code-that-controller-and-view-can-access/123364)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [December 17, 2007, 3:58am UTC](https://www.ruby-forum.com/t/code-that-controller-and-view-can-access/123364 "2007-12-17T03:58:55Z")

</div>

Is there a way I can make a function be accessible by both the controller and the view?

---

## [Find\_by\_sql prepared statements with like](https://www.ruby-forum.com/t/find-by-sql-prepared-statements-with-like/123333)

<div class="topic-metadata">

**Author:** [@jmark](https://www.ruby-forum.com/u/jmark)\
**Replies:** 2\
**Last updated:** [December 17, 2007, 2:23am UTC](https://www.ruby-forum.com/t/find-by-sql-prepared-statements-with-like/123333 "2007-12-17T02:23:35Z")

</div>

How does one write a prepared statement with LIKE using find\_by\_sql. For example the problem with soemthing like this is that extra quotes are put around the ? Product.find\_by\_sql(\[“SELECT \* FROM products WHERE name L…

---

## [Acts\_as\_commentable, the user\_id of comments always == 0](https://www.ruby-forum.com/t/acts-as-commentable-the-user-id-of-comments-always-0/123330)

<div class="topic-metadata">

**Author:** [@infinit](https://www.ruby-forum.com/u/infinit)\
**Replies:** 2\
**Last updated:** [December 16, 2007, 11:51pm UTC](https://www.ruby-forum.com/t/acts-as-commentable-the-user-id-of-comments-always-0/123330 "2007-12-16T23:51:36Z")

</div>

I used the acts\_as\_commentable in my app. But I find that, the user\_id in comments table all equal0, I hv declaraed in the user model: has\_many :comment, and I hv tried move the comment.rb in the model directory. bu…

---

## [Issuing Ruby Commands from Rails?](https://www.ruby-forum.com/t/issuing-ruby-commands-from-rails/123260)

<div class="topic-metadata">

**Author:** [@pete](https://www.ruby-forum.com/u/pete)\
**Replies:** 5\
**Last updated:** [December 16, 2007, 11:48pm UTC](https://www.ruby-forum.com/t/issuing-ruby-commands-from-rails/123260 "2007-12-16T23:48:41Z")

</div>

Hello- I have an application where I would like to issue Ruby commands from a Rails application and pipe the resulting stuff from the command line into a Rails variable. Does anyone have a good way to do this? Examp…

---

## [NetBeans 6.0, Leopard and running a project in browser](https://www.ruby-forum.com/t/netbeans-6-0-leopard-and-running-a-project-in-browser/122746)

<div class="topic-metadata">

**Author:** [@erikgj](https://www.ruby-forum.com/u/erikgj)\
**Replies:** 5\
**Last updated:** [December 16, 2007, 10:57pm UTC](https://www.ruby-forum.com/t/netbeans-6-0-leopard-and-running-a-project-in-browser/122746 "2007-12-16T22:57:05Z")

</div>

Hello, I would like to ask if is there anyone using the latest NetBeans 6.0 under Leopard or at least on Mac Os. I can’t get it work properly. The first problem I had is that it didn’t find my web browsers automatical…

---

## [Postgres and Ruby](https://www.ruby-forum.com/t/postgres-and-ruby/120393)

<div class="topic-metadata">

**Author:** [@blindmen](https://www.ruby-forum.com/u/blindmen)\
**Replies:** 6\
**Last updated:** [December 16, 2007, 10:17pm UTC](https://www.ruby-forum.com/t/postgres-and-ruby/120393 "2007-12-16T22:17:39Z")

</div>

Hi I’m very new to Ruby on Rails. I’ve tried to create a very simple test application on postgres database. I’ve installed gem install postgres-pr driver. My database table name is players. My model file in ruby is n…

---

## [Modify behavior of updated\_at magic field](https://www.ruby-forum.com/t/modify-behavior-of-updated-at-magic-field/123346)

<div class="topic-metadata">

**Author:** [@rubynuby](https://www.ruby-forum.com/u/rubynuby)\
**Replies:** 3\
**Last updated:** [December 16, 2007, 9:59pm UTC](https://www.ruby-forum.com/t/modify-behavior-of-updated-at-magic-field/123346 "2007-12-16T21:59:32Z")

</div>

is it possible to modify magic field updated\_at so it will update only when ceratin columns are changed? if not, I guess I have to do it on my own. In that case, how do I tell if a field has changed in the, say, befo…

---

## [Make AR setter methods private?](https://www.ruby-forum.com/t/make-ar-setter-methods-private/123342)

<div class="topic-metadata">

**Author:** [@ldk2005](https://www.ruby-forum.com/u/ldk2005)\
**Replies:** 4\
**Last updated:** [December 16, 2007, 9:51pm UTC](https://www.ruby-forum.com/t/make-ar-setter-methods-private/123342 "2007-12-16T21:51:56Z")

</div>

Hi, I have a AR model that I want to limit changes to be only via instance methods that I’ve added. How do I prevent my other sw from setting the instance’s attributes? I know about #attr\_protected and #attr\_readonly.…

---

## [Undefined method \`auto\_complete\_for'](https://www.ruby-forum.com/t/undefined-method-auto-complete-for/123348)

<div class="topic-metadata">

**Author:** [@martinevans](https://www.ruby-forum.com/u/martinevans)\
**Replies:** 2\
**Last updated:** [December 16, 2007, 9:49pm UTC](https://www.ruby-forum.com/t/undefined-method-auto-complete-for/123348 "2007-12-16T21:49:34Z")

</div>

Have upgaded to 2.0.1 from 1.5.1 and now get the above error used to work fine regards Martin

---

## [Unit test preperation with migrations](https://www.ruby-forum.com/t/unit-test-preperation-with-migrations/123344)

<div class="topic-metadata">

**Author:** [@pozza](https://www.ruby-forum.com/u/pozza)\
**Replies:** 1\
**Last updated:** [December 16, 2007, 7:37pm UTC](https://www.ruby-forum.com/t/unit-test-preperation-with-migrations/123344 "2007-12-16T19:37:36Z")

</div>

I have spent sometime this afternoon learning how to unit test rails applications and integrate the Cerberus CI tool. One key area confuses me however, and I would appreciate other peoples views of how best to overcom…

---

## [Noob: Help designing Architecture for custom form-builders](https://www.ruby-forum.com/t/noob-help-designing-architecture-for-custom-form-builders/123338)

<div class="topic-metadata">

**Author:** [@vin03](https://www.ruby-forum.com/u/vin03)\
**Replies:** 0\
**Last updated:** [December 16, 2007, 6:42pm UTC](https://www.ruby-forum.com/t/noob-help-designing-architecture-for-custom-form-builders/123338 "2007-12-16T18:42:12Z")

</div>

Hi, As one of my personal projects for practice, I want to create a form builder application that is similar to what Wufoo is offering. However I could not figure out how I can build the equivalent in RoR and would a…

---

## [Fast cgi retry interval question](https://www.ruby-forum.com/t/fast-cgi-retry-interval-question/123331)

<div class="topic-metadata">

**Author:** [@frocco](https://www.ruby-forum.com/u/frocco)\
**Replies:** 0\
**Last updated:** [December 16, 2007, 5:42pm UTC](https://www.ruby-forum.com/t/fast-cgi-retry-interval-question/123331 "2007-12-16T17:42:33Z")

</div>

Sorry, this is kind of off-topic, but since most of the people who use mod\_fastcgi and fcgi.rb are probably on RoR, I though this would be most appropriate place to ask the question. My website has experienced an outa…

---

## [Check\_box not being checked](https://www.ruby-forum.com/t/check-box-not-being-checked/123284)

<div class="topic-metadata">

**Author:** [@Marcelo\_Ruiz](https://www.ruby-forum.com/u/Marcelo_Ruiz)\
**Replies:** 3\
**Last updated:** [December 16, 2007, 5:42pm UTC](https://www.ruby-forum.com/t/check-box-not-being-checked/123284 "2007-12-16T17:42:25Z")

</div>

I’m new to RoR and I’m having a little problem that I can’t solve. My model is simple. I have Lists and ListItems. I have a view that loops through all the list items, and I put the HTML for the each list item row in …

---

## [Alphabet](https://www.ruby-forum.com/t/alphabet/123295)

<div class="topic-metadata">

**Author:** [@edberner](https://www.ruby-forum.com/u/edberner)\
**Replies:** 3\
**Last updated:** [December 16, 2007, 4:30pm UTC](https://www.ruby-forum.com/t/alphabet/123295 "2007-12-16T16:30:29Z")

</div>

What is the best way to do this? A Andover B Babson … C … . … . … . … \<%= @letter = ‘a’ %\> \<% while @letter != ‘z’ %\> \<%= @letter %\> \<% for school in @schools %\> \<% if school.title.first == @letter %\> \<%= lin…

---

## [Respond to different format](https://www.ruby-forum.com/t/respond-to-different-format/123326)

<div class="topic-metadata">

**Author:** [@patrick](https://www.ruby-forum.com/u/patrick)\
**Replies:** 0\
**Last updated:** [December 16, 2007, 4:24pm UTC](https://www.ruby-forum.com/t/respond-to-different-format/123326 "2007-12-16T16:24:35Z")

</div>

Hi, I am now developing an application that require a function that output the format corrspending to the request required, such as if browser request html, it respond the data in html format, and output the csv fo…

---

## [System call calls a PHP script](https://www.ruby-forum.com/t/system-call-calls-a-php-script/123153)

<div class="topic-metadata">

**Author:** [@tbaustert](https://www.ruby-forum.com/u/tbaustert)\
**Replies:** 7\
**Last updated:** [December 16, 2007, 4:14pm UTC](https://www.ruby-forum.com/t/system-call-calls-a-php-script/123153 "2007-12-16T16:14:01Z")

</div>

Hello, I want to generate some PDFs from my Rails app. I use a PHP script to generate the PDF, and it works fine. In my Rails controller, I just have an action that calls : #{full\_command} where full\_command is some…

---

## [Locals dont workd in ApplicationHelper render partial](https://www.ruby-forum.com/t/locals-dont-workd-in-applicationhelper-render-partial/123325)

<div class="topic-metadata">

**Author:** [@gabru](https://www.ruby-forum.com/u/gabru)\
**Replies:** 0\
**Last updated:** [December 16, 2007, 3:40pm UTC](https://www.ruby-forum.com/t/locals-dont-workd-in-applicationhelper-render-partial/123325 "2007-12-16T15:40:31Z")

</div>

i have the following method in my application\_helper.rb def test render(:partial =\> ‘/application/errors’, :locals =\> { :detail\_msgs =\> ‘testing…’, :headline =\> \[‘asd’, ‘wwww’\], :msgs =\> \[‘adssaad’\]}) end when I u…

---

## [Restful action reuse in SOAP webservice](https://www.ruby-forum.com/t/restful-action-reuse-in-soap-webservice/123324)

<div class="topic-metadata">

**Author:** [@basvanwesting](https://www.ruby-forum.com/u/basvanwesting)\
**Replies:** 0\
**Last updated:** [December 16, 2007, 3:00pm UTC](https://www.ruby-forum.com/t/restful-action-reuse-in-soap-webservice/123324 "2007-12-16T15:00:46Z")

</div>

Hi, I have a problem with the following situation. I need to add SOAP support (using AWS) in a fully RESTful Rails app. I really want to reuse the existing restful action logic from the other controllers (just the ac…

---

## [Mongrel Hangs](https://www.ruby-forum.com/t/mongrel-hangs/123320)

<div class="topic-metadata">

**Author:** [@gavin](https://www.ruby-forum.com/u/gavin)\
**Replies:** 0\
**Last updated:** [December 16, 2007, 11:18am UTC](https://www.ruby-forum.com/t/mongrel-hangs/123320 "2007-12-16T11:18:44Z")

</div>

When I run script/server, Mongrel hangs. If I ctrl-c, it does this… Gavin$ script/server ^C=\> Booting Mongrel (use ‘script/server webrick’ to force WEBrick) =\> Rails application starting on http://0.0.0.0:3000 =\> Ca…

---

## [Fixture\_file\_upload in Integration tests: is it been broken for two years?](https://www.ruby-forum.com/t/fixture-file-upload-in-integration-tests-is-it-been-broken-for-two-years/123319)

<div class="topic-metadata">

**Author:** [@gabriele\_renzi](https://www.ruby-forum.com/u/gabriele_renzi)\
**Replies:** 0\
**Last updated:** [December 16, 2007, 10:57am UTC](https://www.ruby-forum.com/t/fixture-file-upload-in-integration-tests-is-it-been-broken-for-two-years/123319 "2007-12-16T10:57:04Z")

</div>

Hi everyone, I’m trying to test file uploads (with attachment\_fu) in the integration tests for a rails 2.0.1 application, with code like: post :action, :data =\> fixture\_file\_upload(‘/image.png’, ‘image/ png’) assert…

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

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