# Rails

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

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

---

## [Observe\_form, observe\_field, dynamic forms help please](https://www.ruby-forum.com/t/observe-form-observe-field-dynamic-forms-help-please/77433)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 7\
**Last updated:** [May 29, 2009, 2:18pm UTC](https://www.ruby-forum.com/t/observe-form-observe-field-dynamic-forms-help-please/77433 "2009-05-29T14:18:57Z")

</div>

Setup: A form which initially has only one field: a 2x group of radio\_buttons. As the user selects options, additinal fields are added or removed. I started with observe\_field. I was getting some very peculiar behavio…

---

## [Dynamic Menu](https://www.ruby-forum.com/t/dynamic-menu/94110)

<div class="topic-metadata">

**Author:** [@jcernelli](https://www.ruby-forum.com/u/jcernelli)\
**Replies:** 9\
**Last updated:** [May 29, 2009, 1:39pm UTC](https://www.ruby-forum.com/t/dynamic-menu/94110 "2009-05-29T13:39:08Z")

</div>

Hi, I think I’m doing this the right way, but can’t get it going. I’m building a menu from the values in a mySQL table, and want to build it on the fly. This is something that should be working but only works halfwa…

---

## [Two destroy methods with different behavior for the model](https://www.ruby-forum.com/t/two-destroy-methods-with-different-behavior-for-the-model/168554)

<div class="topic-metadata">

**Author:** [@term](https://www.ruby-forum.com/u/term)\
**Replies:** 4\
**Last updated:** [May 29, 2009, 1:31pm UTC](https://www.ruby-forum.com/t/two-destroy-methods-with-different-behavior-for-the-model/168554 "2009-05-29T13:31:32Z")

</div>

I want to have two destroy methods for my model. First method must be a “classic” destroy method — find a record and destroy it. “Delete Forever” link in the view. Second method must find a record and mark it as delet…

---

## [What's the best way to run (many) complex queries in a rake task?](https://www.ruby-forum.com/t/whats-the-best-way-to-run-many-complex-queries-in-a-rake-task/168964)

<div class="topic-metadata">

**Author:** [@pahagon](https://www.ruby-forum.com/u/pahagon)\
**Replies:** 3\
**Last updated:** [May 29, 2009, 12:50pm UTC](https://www.ruby-forum.com/t/whats-the-best-way-to-run-many-complex-queries-in-a-rake-task/168964 "2009-05-29T12:50:21Z")

</div>

Hi everyone, I’m currently working on a project which will execute a rake task from time to time, and said taks involves a complex recommendation algorithm that can be accomplished with a complex SQL query. I may use…

---

## [Resource routes with further options](https://www.ruby-forum.com/t/resource-routes-with-further-options/169022)

<div class="topic-metadata">

**Author:** [@damaris](https://www.ruby-forum.com/u/damaris)\
**Replies:** 2\
**Last updated:** [May 29, 2009, 12:49pm UTC](https://www.ruby-forum.com/t/resource-routes-with-further-options/169022 "2009-05-29T12:49:56Z")

</div>

Hi you all, I have a resource routed in routes.rb, such as map.resources :queries Every Query object has a string with words, and I want to operate on each of these words ( each word will generate another object of t…

---

## [Ruby on Rails giving error on HP-UX-ia64](https://www.ruby-forum.com/t/ruby-on-rails-giving-error-on-hp-ux-ia64/169089)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [May 29, 2009, 8:57am UTC](https://www.ruby-forum.com/t/ruby-on-rails-giving-error-on-hp-ux-ia64/169089 "2009-05-29T08:57:44Z")

</div>

Hi All, I’m trying to install RubyonRails on HP-UX 11.23\[ia64-hpux11.23\] machine. I was succesful in building Ruby1.8.7p160 and RubyGems1.3.2. #./ruby -v ruby 1.8.7 (2009-04-08 patchlevel 160) \[ia64-hpux11.23\] #./g…

---

## [Setup redmine to send E-MAIL using Gmail](https://www.ruby-forum.com/t/setup-redmine-to-send-e-mail-using-gmail/169088)

<div class="topic-metadata">

**Author:** [@sush](https://www.ruby-forum.com/u/sush)\
**Replies:** 0\
**Last updated:** [May 29, 2009, 8:57am UTC](https://www.ruby-forum.com/t/setup-redmine-to-send-e-mail-using-gmail/169088 "2009-05-29T08:57:44Z")

</div>

I m using redmine project management software…can i add GUI interface to this…according to my reqirements…

---

## [Js problem](https://www.ruby-forum.com/t/js-problem/169084)

<div class="topic-metadata">

**Author:** [@sushrut](https://www.ruby-forum.com/u/sushrut)\
**Replies:** 0\
**Last updated:** [May 29, 2009, 6:46am UTC](https://www.ruby-forum.com/t/js-problem/169084 "2009-05-29T06:46:48Z")

</div>

how to give the tooltip text in my application? i use js for that but it can’t work so what to do?

---

## [Plz help to correct my query](https://www.ruby-forum.com/t/plz-help-to-correct-my-query/169003)

<div class="topic-metadata">

**Author:** [@venkat\_ruby](https://www.ruby-forum.com/u/venkat_ruby)\
**Replies:** 3\
**Last updated:** [May 29, 2009, 6:32am UTC](https://www.ruby-forum.com/t/plz-help-to-correct-my-query/169003 "2009-05-29T06:32:15Z")

</div>

Hi, I want to display both terminal\_id and user\_id. If i try to echo by using p i.e p @list It is displaying only terminal\_id. Please help me to correct my query. @list = NetworkTerminal.find(:all, :select =\> “netw…

---

## [ActiveScaffold - undefined method \`link' for #\<ActiveScaffold](https://www.ruby-forum.com/t/activescaffold-undefined-method-link-for-activescaffold/169068)

<div class="topic-metadata">

**Author:** [@enwood](https://www.ruby-forum.com/u/enwood)\
**Replies:** 1\
**Last updated:** [May 29, 2009, 4:04am UTC](https://www.ruby-forum.com/t/activescaffold-undefined-method-link-for-activescaffold/169068 "2009-05-29T04:04:21Z")

</div>

Has anyone encountered this error message with the ActiveScaffold plugin? I’m working on Windows XP (yes) with Ruby 1.8.6 and Rails 2.3.2. I just created a new, fresh Rails application with a single model (“users”), …

---

## [UserMailer return boolean value](https://www.ruby-forum.com/t/usermailer-return-boolean-value/169070)

<div class="topic-metadata">

**Author:** [@david](https://www.ruby-forum.com/u/david)\
**Replies:** 1\
**Last updated:** [May 29, 2009, 3:10am UTC](https://www.ruby-forum.com/t/usermailer-return-boolean-value/169070 "2009-05-29T03:10:51Z")

</div>

Is it possible to make is UserMailer returns a boolean value depending on whether an email was sent or not? I have a method to send maybe I could put it in here somehow? def send\_initial UserMailer.deliver\_initial(s…

---

## [Using js prompt() instead of a form with create method](https://www.ruby-forum.com/t/using-js-prompt-instead-of-a-form-with-create-method/169075)

<div class="topic-metadata">

**Author:** [@mk27](https://www.ruby-forum.com/u/mk27)\
**Replies:** 2\
**Last updated:** [May 29, 2009, 2:59am UTC](https://www.ruby-forum.com/t/using-js-prompt-instead-of-a-form-with-create-method/169075 "2009-05-29T02:59:42Z")

</div>

I have a new/create method that only has one field, and I’d rather use a js prompt() to get the data instead of a form. The trigger for this is not a link, it’s a span. Using “onclick” in the span, how can I call a p…

---

## [Cross-Domain Data with Rack and Rails -- http://bit.ly/BNw6T](https://www.ruby-forum.com/t/cross-domain-data-with-rack-and-rails-http-bit-ly-bnw6t/169069)

<div class="topic-metadata">

**Author:** [@LJMecca](https://www.ruby-forum.com/u/LJMecca)\
**Replies:** 0\
**Last updated:** [May 28, 2009, 11:13pm UTC](https://www.ruby-forum.com/t/cross-domain-data-with-rack-and-rails-http-bit-ly-bnw6t/169069 "2009-05-28T23:13:04Z")

</div>

A big theme from RailsConf a few weeks ago was the arrival of Rack in Rails as of version 2.3. The first topic that seemed to pique developer interest was Rails Metal – especially the speed bump of using a lighter st…

---

## [How to set default path](https://www.ruby-forum.com/t/how-to-set-default-path/169066)

<div class="topic-metadata">

**Author:** [@mk27](https://www.ruby-forum.com/u/mk27)\
**Replies:** 1\
**Last updated:** [May 28, 2009, 11:12pm UTC](https://www.ruby-forum.com/t/how-to-set-default-path/169066 "2009-05-28T23:12:29Z")

</div>

Hi gang! I want / to point to app/subject/list instead of public/index.html. I added this to routes.rb map.connect ‘:controller/:action/:id’, :controller =\> ‘subject’, :action =\> ‘list’ But that does not work…

---

## [Newbie Help (No Method Error)](https://www.ruby-forum.com/t/newbie-help-no-method-error/169057)

<div class="topic-metadata">

**Author:** [@mike343](https://www.ruby-forum.com/u/mike343)\
**Replies:** 2\
**Last updated:** [May 28, 2009, 9:34pm UTC](https://www.ruby-forum.com/t/newbie-help-no-method-error/169057 "2009-05-28T21:34:24Z")

</div>

I am following the â€œAgile Web D. with Railsâ€ and I have decided to deviate from the book a bit to discover Rails plugins. I have set up my app to use â€œpaperclipâ€ to size my photos. I have managed to get the ap…

---

## [Apps for Democracy has $35,000 in Prizes for Ruby Devs](https://www.ruby-forum.com/t/apps-for-democracy-has-35-000-in-prizes-for-ruby-devs/169059)

<div class="topic-metadata">

**Author:** [@corbett3000](https://www.ruby-forum.com/u/corbett3000)\
**Replies:** 0\
**Last updated:** [May 28, 2009, 9:25pm UTC](https://www.ruby-forum.com/t/apps-for-democracy-has-35-000-in-prizes-for-ruby-devs/169059 "2009-05-28T21:25:27Z")

</div>

Hi all, We’re running a development contest for the city of Washington DC call Apps for Democracy that has $35k up for grabs for the best community site that ties in the city’s 311 system. Full info is here: http://w…

---

## [Java kicks Rails's butt - it says right here!](https://www.ruby-forum.com/t/java-kicks-railss-butt-it-says-right-here/168892)

<div class="topic-metadata">

**Author:** [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Replies:** 16\
**Last updated:** [May 28, 2009, 9:09pm UTC](https://www.ruby-forum.com/t/java-kicks-railss-butt-it-says-right-here/168892 "2009-05-28T21:09:27Z")

</div>

http://java.sys-con.com/node/965189 I am certainly going back to Java, just as soon as I figure out how to configure Tomcat. Until then, anyone care to take on this logic? Has anyone here used Java the way they say…

---

## [Rake db:create, db:migrate ok but rake RAILS\_ENV=production db:create, db:migrate fails](https://www.ruby-forum.com/t/rake-db-create-db-migrate-ok-but-rake-rails-env-production-db-create-db-migrate-fails/169055)

<div class="topic-metadata">

**Author:** [@simonsaid](https://www.ruby-forum.com/u/simonsaid)\
**Replies:** 0\
**Last updated:** [May 28, 2009, 8:54pm UTC](https://www.ruby-forum.com/t/rake-db-create-db-migrate-ok-but-rake-rails-env-production-db-create-db-migrate-fails/169055 "2009-05-28T20:54:10Z")

</div>

Hello, anybody have any clue why the following is happening: if i do “rake db:drop, rake db:create, rake db:migrate” everything is fine but if i do “rake RAILS\_ENV=testing db:drop”, then “rake RAILS\_ENV=testing db:cr…

---

## [Know what was updated](https://www.ruby-forum.com/t/know-what-was-updated/169013)

<div class="topic-metadata">

**Author:** [@blueomega](https://www.ruby-forum.com/u/blueomega)\
**Replies:** 5\
**Last updated:** [May 28, 2009, 8:45pm UTC](https://www.ruby-forum.com/t/know-what-was-updated/169013 "2009-05-28T20:45:20Z")

</div>

I am doing a rss feed who reports all the changes in the program. all changes are sent to a database where the afected item, who made changed, time of change and a string reporting the change is kept the problem is th…

---

## [Altering text field value on form load](https://www.ruby-forum.com/t/altering-text-field-value-on-form-load/169054)

<div class="topic-metadata">

**Author:** [@JannaB](https://www.ruby-forum.com/u/JannaB)\
**Replies:** 0\
**Last updated:** [May 28, 2009, 8:37pm UTC](https://www.ruby-forum.com/t/altering-text-field-value-on-form-load/169054 "2009-05-28T20:37:43Z")

</div>

Suppose I have a model, ‘Associate’, and it has a string member, ‘branch’. Sometimes branch can end with a percent sign (%) and sometimes not. I have a form to display the Associate data. In the branch field, I am si…

---

## [Re: ActiveResource as API test rig? Two jsons?](https://www.ruby-forum.com/t/re-activeresource-as-api-test-rig-two-jsons/169053)

<div class="topic-metadata">

**Author:** [@marcbey](https://www.ruby-forum.com/u/marcbey)\
**Replies:** 0\
**Last updated:** [May 28, 2009, 8:34pm UTC](https://www.ruby-forum.com/t/re-activeresource-as-api-test-rig-two-jsons/169053 "2009-05-28T20:34:12Z")

</div>

bump…

---

## [Status: 500 Internal Server Error when starting ruby applica](https://www.ruby-forum.com/t/status-500-internal-server-error-when-starting-ruby-applica/169052)

<div class="topic-metadata">

**Author:** [@readrabbit](https://www.ruby-forum.com/u/readrabbit)\
**Replies:** 0\
**Last updated:** [May 28, 2009, 8:27pm UTC](https://www.ruby-forum.com/t/status-500-internal-server-error-when-starting-ruby-applica/169052 "2009-05-28T20:27:16Z")

</div>

I am trying to run an Ruby on Rails application developed internally. Any input would be greatly appreciatedâ€¦ When I start the server I get the following warning: \[shajizaidi@worf script\]$ ./server =\> Booting WEBri…

---

## [Rails application without database](https://www.ruby-forum.com/t/rails-application-without-database/169012)

<div class="topic-metadata">

**Author:** [@sudhi](https://www.ruby-forum.com/u/sudhi)\
**Replies:** 2\
**Last updated:** [May 28, 2009, 8:24pm UTC](https://www.ruby-forum.com/t/rails-application-without-database/169012 "2009-05-28T20:24:19Z")

</div>

Hi, I have a rails Application which only talks to REST Interfaces, I do not have any database. I am able run the app with no link to mysql with following changes config.frameworks -= \[ :active\_record, :active\_resour…

---

## [How to create dependent record automatically](https://www.ruby-forum.com/t/how-to-create-dependent-record-automatically/169017)

<div class="topic-metadata">

**Author:** [@Vipin](https://www.ruby-forum.com/u/Vipin)\
**Replies:** 8\
**Last updated:** [May 28, 2009, 8:21pm UTC](https://www.ruby-forum.com/t/how-to-create-dependent-record-automatically/169017 "2009-05-28T20:21:51Z")

</div>

hi I am facing a problem. I have two models A and B which have relations as follows A has\_one B B belongs\_to A Now I want to ensure that whenever an ‘A’ record is created, automatically a ‘B’ record is also created…

---

## [Use callbacks to determine model field changes?](https://www.ruby-forum.com/t/use-callbacks-to-determine-model-field-changes/168942)

<div class="topic-metadata">

**Author:** [@coolmenu](https://www.ruby-forum.com/u/coolmenu)\
**Replies:** 3\
**Last updated:** [May 28, 2009, 8:16pm UTC](https://www.ruby-forum.com/t/use-callbacks-to-determine-model-field-changes/168942 "2009-05-28T20:16:33Z")

</div>

What’s the best way to examine what fields on a model are changing? Would you use a callback to do that and how? I guess the simplest example of this is how lighthouseapp documents changes that a person makes to a tic…

---

## [How to test that a specific error message is thrown](https://www.ruby-forum.com/t/how-to-test-that-a-specific-error-message-is-thrown/169040)

<div class="topic-metadata">

**Author:** [@jimb](https://www.ruby-forum.com/u/jimb)\
**Replies:** 6\
**Last updated:** [May 28, 2009, 8:10pm UTC](https://www.ruby-forum.com/t/how-to-test-that-a-specific-error-message-is-thrown/169040 "2009-05-28T20:10:40Z")

</div>

Hi, If I have this line in my model: validates\_presence\_of :name, :message =\> “Please enter a name” and I test this with the following code: def test\_should\_require\_name user= User.new(valid\_user\_attributes(:name =\> …

---

## [I18n and count question](https://www.ruby-forum.com/t/i18n-and-count-question/169047)

<div class="topic-metadata">

**Author:** [@arvias](https://www.ruby-forum.com/u/arvias)\
**Replies:** 0\
**Last updated:** [May 28, 2009, 7:34pm UTC](https://www.ruby-forum.com/t/i18n-and-count-question/169047 "2009-05-28T19:34:16Z")

</div>

Hi. What is the proper way to handle situations where you need pluralization with and without adding the count? The best I could think of is to write it twice: item: one: ‘item’ other: ‘items’ c\_item: one: ‘one i…

---

## [How to create contact ( tableless ) page in RESTful Rails](https://www.ruby-forum.com/t/how-to-create-contact-tableless-page-in-restful-rails/169043)

<div class="topic-metadata">

**Author:** [@gokulamurthy](https://www.ruby-forum.com/u/gokulamurthy)\
**Replies:** 1\
**Last updated:** [May 28, 2009, 7:27pm UTC](https://www.ruby-forum.com/t/how-to-create-contact-tableless-page-in-restful-rails/169043 "2009-05-28T19:27:12Z")

</div>

Hello to all, how to create contact ( tableless ) page in RESTful Rails ?? please send me any links or code snippets to work on this. Thanks in Advance Rails Thinker

---

## [Nice way to set attributes to nil if blank](https://www.ruby-forum.com/t/nice-way-to-set-attributes-to-nil-if-blank/168999)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 6\
**Last updated:** [May 28, 2009, 6:39pm UTC](https://www.ruby-forum.com/t/nice-way-to-set-attributes-to-nil-if-blank/168999 "2009-05-28T18:39:39Z")

</div>

I’ve got a form for editing a model called Property. Property has two fields, web\_color and thumbnail\_path, that are nil by default, and the model has some behaviour to generate defaults for them when nil, which is t…

---

## [Confused on how rails 2.3.2 renders templates](https://www.ruby-forum.com/t/confused-on-how-rails-2-3-2-renders-templates/169041)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [May 28, 2009, 6:03pm UTC](https://www.ruby-forum.com/t/confused-on-how-rails-2-3-2-renders-templates/169041 "2009-05-28T18:03:15Z")

</div>

I am migrating to rails 2.3.2 What I found confusing is that in some cases when I have a template named: “something.html.erb” it is looking for “something.erb”, but in other cases “something.html.erb” works fine. I…

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

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