# Rails

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

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

---

## [Active Record Query cache not working](https://www.ruby-forum.com/t/active-record-query-cache-not-working/158965)

<div class="topic-metadata">

**Author:** [@frankmt](https://www.ruby-forum.com/u/frankmt)\
**Replies:** 0\
**Last updated:** [January 29, 2009, 9:53pm UTC](https://www.ruby-forum.com/t/active-record-query-cache-not-working/158965 "2009-01-29T21:53:41Z")

</div>

I have a Rails 2.1 app running on MySQl where the ActiveRecord query cache is not working for some specific expensive queries they have, and just for those ones, meaning that in the same controller action another quer…

---

## [Newbie Help Please! Update 2 Tables with one form](https://www.ruby-forum.com/t/newbie-help-please-update-2-tables-with-one-form/158948)

<div class="topic-metadata">

**Author:** [@seanmctex](https://www.ruby-forum.com/u/seanmctex)\
**Replies:** 4\
**Last updated:** [January 29, 2009, 9:47pm UTC](https://www.ruby-forum.com/t/newbie-help-please-update-2-tables-with-one-form/158948 "2009-01-29T21:47:50Z")

</div>

I have a form: \<% form\_tag :action =\> ‘create’ do %\> \<%= hidden\_field\_tag ‘plan’, params\[:plan\] %\> \<% fields\_for :account do |f| %\> \<%= f.text\_field :name %\> \<%= f.text\_field :domain %\>.\<%= AppConfig\['base\_d…

---

## [Nested sets, threads, and trees](https://www.ruby-forum.com/t/nested-sets-threads-and-trees/158675)

<div class="topic-metadata">

**Author:** [@marnen](https://www.ruby-forum.com/u/marnen)\
**Replies:** 1\
**Last updated:** [January 29, 2009, 8:50pm UTC](https://www.ruby-forum.com/t/nested-sets-threads-and-trees/158675 "2009-01-29T20:50:05Z")

</div>

Hi everyone! This may be more a database question than a Rails question, but here goes. I have a few questions about implementing tree structures in my Rails app. It looks like I’ll run into performance issues any wa…

---

## [:active\_record\_store + :table\_name\_with\_underscore session issues](https://www.ruby-forum.com/t/active-record-store-table-name-with-underscore-session-issues/158868)

<div class="topic-metadata">

**Author:** [@destiney](https://www.ruby-forum.com/u/destiney)\
**Replies:** 3\
**Last updated:** [January 29, 2009, 8:07pm UTC](https://www.ruby-forum.com/t/active-record-store-table-name-with-underscore-session-issues/158868 "2009-01-29T20:07:57Z")

</div>

Today I created a new Rails 2.2.2 project. I’m using Oracle and activerecord-oracle-adapter (1.0.0.9250). I’m using ActiveRecord::Base.primary\_key\_prefix\_type = :table\_name\_with\_underscore, which is a spec for the pro…

---

## [How to get rid of an ActiveRecord warning "already initialized constant"](https://www.ruby-forum.com/t/how-to-get-rid-of-an-activerecord-warning-already-initialized-constant/158954)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 0\
**Last updated:** [January 29, 2009, 7:06pm UTC](https://www.ruby-forum.com/t/how-to-get-rid-of-an-activerecord-warning-already-initialized-constant/158954 "2009-01-29T19:06:33Z")

</div>

I need to get a proxy class for a specific AR validation I reuse a piece of code (from Globalize), where it’s set as a constant : module Globalize module Model module ActiveRecord class \<\< self def create\_proxy\_c…

---

## [Strange replace\_html image error going from 1.2.5 to 2.1.0](https://www.ruby-forum.com/t/strange-replace-html-image-error-going-from-1-2-5-to-2-1-0/158906)

<div class="topic-metadata">

**Author:** [@adeel](https://www.ruby-forum.com/u/adeel)\
**Replies:** 2\
**Last updated:** [January 29, 2009, 6:49pm UTC](https://www.ruby-forum.com/t/strange-replace-html-image-error-going-from-1-2-5-to-2-1-0/158906 "2009-01-29T18:49:24Z")

</div>

Hi I’m tasked with upgrading an old app from 1.2.5 to 2.1.0. There is a basic image rotation triggered by a link\_to\_remote button. The image gets rotated by Mini-Magick, saved, and then the div is updated on the page …

---

## [Removing an association from a derived class](https://www.ruby-forum.com/t/removing-an-association-from-a-derived-class/158894)

<div class="topic-metadata">

**Author:** [@pankaj](https://www.ruby-forum.com/u/pankaj)\
**Replies:** 1\
**Last updated:** [January 29, 2009, 5:49pm UTC](https://www.ruby-forum.com/t/removing-an-association-from-a-derived-class/158894 "2009-01-29T17:49:18Z")

</div>

I am using single table inheritance. class User \< ActiveRecord::Base has\_many :abc end class Student \< User end The student class should not inherit the has\_many :abc relationship. How can we override it? Is there…

---

## [Letting users create forms using web interface](https://www.ruby-forum.com/t/letting-users-create-forms-using-web-interface/158926)

<div class="topic-metadata">

**Author:** [@joey-alva](https://www.ruby-forum.com/u/joey-alva)\
**Replies:** 2\
**Last updated:** [January 29, 2009, 5:35pm UTC](https://www.ruby-forum.com/t/letting-users-create-forms-using-web-interface/158926 "2009-01-29T17:35:45Z")

</div>

Hi, I am working on an RoR application and one of the features of the application would need the following functionality. Any user should be able to create forms (or questionnaires). He should be able to specify (on …

---

## [Can't Install Rails. Can any one help Please!](https://www.ruby-forum.com/t/cant-install-rails-can-any-one-help-please/158925)

<div class="topic-metadata">

**Author:** [@jonbaer](https://www.ruby-forum.com/u/jonbaer)\
**Replies:** 1\
**Last updated:** [January 29, 2009, 4:31pm UTC](https://www.ruby-forum.com/t/cant-install-rails-can-any-one-help-please/158925 "2009-01-29T16:31:05Z")

</div>

I keep getting an error message when i try an install rails. I am using xp.These are the steps i took. Download the One-click ruby installer from rubyforge http://rubyforge.org/frs/?group\_id=167 (warning this is a b…

---

## [A series of views (how to flow)](https://www.ruby-forum.com/t/a-series-of-views-how-to-flow/158907)

<div class="topic-metadata">

**Author:** [@bingobob](https://www.ruby-forum.com/u/bingobob)\
**Replies:** 3\
**Last updated:** [January 29, 2009, 4:25pm UTC](https://www.ruby-forum.com/t/a-series-of-views-how-to-flow/158907 "2009-01-29T16:25:11Z")

</div>

I just want to setup a series of pages so that a user clicks through to create a new contact in my test app (a simple address book). Such that the flow is like this for the user, each action is a new page. NEW\_CONTACT…

---

## [Timezone question](https://www.ruby-forum.com/t/timezone-question/158924)

<div class="topic-metadata">

**Author:** [@stephen\_OSD](https://www.ruby-forum.com/u/stephen_OSD)\
**Replies:** 2\
**Last updated:** [January 29, 2009, 4:00pm UTC](https://www.ruby-forum.com/t/timezone-question/158924 "2009-01-29T16:00:55Z")

</div>

I have an app that stores appointments. Appointments can recur daily, weekly etc or just be one off. The application needs to notify users 15 minutes before each appointment. Now, I know that I can use various Rails …

---

## [\[ANN\] Rails Boxcar - Now with Ruby Enterprise Edition / Phusion](https://www.ruby-forum.com/t/ann-rails-boxcar-now-with-ruby-enterprise-edition-phusion/158934)

<div class="topic-metadata">

**Author:** [@robby247365](https://www.ruby-forum.com/u/robby247365)\
**Replies:** 0\
**Last updated:** [January 29, 2009, 3:53pm UTC](https://www.ruby-forum.com/t/ann-rails-boxcar-now-with-ruby-enterprise-edition-phusion/158934 "2009-01-29T15:53:15Z")

</div>

Hi all, We’ve just launched a new version of Rails Boxcar, a streamlined deployment environment for hosting Ruby on Rails applications. Boxcar is now shipping with the following pre-installed and ready for you to de…

---

## [Downloading the files from specific location](https://www.ruby-forum.com/t/downloading-the-files-from-specific-location/158928)

<div class="topic-metadata">

**Author:** [@srikanth](https://www.ruby-forum.com/u/srikanth)\
**Replies:** 2\
**Last updated:** [January 29, 2009, 3:50pm UTC](https://www.ruby-forum.com/t/downloading-the-files-from-specific-location/158928 "2009-01-29T15:50:14Z")

</div>

Hi, I have group of streams in public/data folder. Here i want to download the any selected stream from datafolder. I have tried to download using ‘send\_data’ in my show method of controller like below: send\_data(@…

---

## [Mysql::Error: Duplicate entry](https://www.ruby-forum.com/t/mysql-duplicate-entry/158867)

<div class="topic-metadata">

**Author:** [@ruby\_ruby](https://www.ruby-forum.com/u/ruby_ruby)\
**Replies:** 2\
**Last updated:** [January 29, 2009, 3:47pm UTC](https://www.ruby-forum.com/t/mysql-duplicate-entry/158867 "2009-01-29T15:47:07Z")

</div>

hello , I am designing a project for a news website and I am new to ROR I am facing a problem with the add news function this is the error Mysql::Error: Duplicate entry ‘’ for key 1: INSERT INTO articals (body, titl…

---

## [Trying to unpack httparty into my rails project](https://www.ruby-forum.com/t/trying-to-unpack-httparty-into-my-rails-project/158930)

<div class="topic-metadata">

**Author:** [@veyron](https://www.ruby-forum.com/u/veyron)\
**Replies:** 0\
**Last updated:** [January 29, 2009, 3:37pm UTC](https://www.ruby-forum.com/t/trying-to-unpack-httparty-into-my-rails-project/158930 "2009-01-29T15:37:50Z")

</div>

Has anyone had success doing this? Aside from freezing my version of rails, I haven’t done too much unpacking of gems into my rails apps. I have the following in my app -vendor httparty json Is there anything I …

---

## [How to prevent a newline after a button\_to](https://www.ruby-forum.com/t/how-to-prevent-a-newline-after-a-button-to/158909)

<div class="topic-metadata">

**Author:** [@bingobob](https://www.ruby-forum.com/u/bingobob)\
**Replies:** 1\
**Last updated:** [January 29, 2009, 3:17pm UTC](https://www.ruby-forum.com/t/how-to-prevent-a-newline-after-a-button-to/158909 "2009-01-29T15:17:06Z")

</div>

How do you prevent a newline after a button\_to. I thought \<%= button\_to blabla -%\> was meant to do it, but it didn’t I think I got it generated tags around the button code. How do you do it? thanks

---

## [Best Practices for Rails Web Application Testing?](https://www.ruby-forum.com/t/best-practices-for-rails-web-application-testing/158927)

<div class="topic-metadata">

**Author:** [@armstheykill](https://www.ruby-forum.com/u/armstheykill)\
**Replies:** 0\
**Last updated:** [January 29, 2009, 2:41pm UTC](https://www.ruby-forum.com/t/best-practices-for-rails-web-application-testing/158927 "2009-01-29T14:41:33Z")

</div>

Hi all, I am going to paint a probably familiar scene. My first rails project was a supposedly simple web application, which has now been under development for 2 years, has expanded to about 12 models, and is a full…

---

## [Help: OpenId and restful\_acl](https://www.ruby-forum.com/t/help-openid-and-restful-acl/157890)

<div class="topic-metadata">

**Author:** [@shahroon\_ali](https://www.ruby-forum.com/u/shahroon_ali)\
**Replies:** 4\
**Last updated:** [January 29, 2009, 2:32pm UTC](https://www.ruby-forum.com/t/help-openid-and-restful-acl/157890 "2009-01-29T14:32:44Z")

</div>

Hi All, I have restful\_authentication with restful\_acl installed on my app, now I want to use OpenId with restful\_acl,so my question is… does this make any problems for me or not? I haven’t explored the OpenI…

---

## [Prototype not working with rails 2.2.2?](https://www.ruby-forum.com/t/prototype-not-working-with-rails-2-2-2/196889)

<div class="topic-metadata">

**Author:** [@riky](https://www.ruby-forum.com/u/riky)\
**Replies:** 5\
**Last updated:** [January 29, 2009, 1:59pm UTC](https://www.ruby-forum.com/t/prototype-not-working-with-rails-2-2-2/196889 "2009-01-29T13:59:03Z")

</div>

Hi, i made an application using rails and prototype and all worked fine… But today i upgraded rails to 2.2.2 and from that moment when i open the webpage with firefox it gives me an error like “object is null” and so…

---

## [MSIE doesn't work with format.html](https://www.ruby-forum.com/t/msie-doesnt-work-with-format-html/158923)

<div class="topic-metadata">

**Author:** [@zero0x](https://www.ruby-forum.com/u/zero0x)\
**Replies:** 0\
**Last updated:** [January 29, 2009, 1:48pm UTC](https://www.ruby-forum.com/t/msie-doesnt-work-with-format-html/158923 "2009-01-29T13:48:21Z")

</div>

Hey there … This is part of restful\_authentication: def access\_denied respond\_to do |format| format.html do store\_location redirect\_to :controller =\> “session”, :action =\> “new” end format.any do request\_http\_ba…

---

## [Active\_record\_store for cookies?](https://www.ruby-forum.com/t/active-record-store-for-cookies/158921)

<div class="topic-metadata">

**Author:** [@tekhne](https://www.ruby-forum.com/u/tekhne)\
**Replies:** 0\
**Last updated:** [January 29, 2009, 1:45pm UTC](https://www.ruby-forum.com/t/active-record-store-for-cookies/158921 "2009-01-29T13:45:16Z")

</div>

By setting config.action\_controller.session\_store to :active\_record\_store in environment.rb the sessions just become references to records stored on the server and do not hold any ‘real’ data. Is there any way to have…

---

## [NoMethodError: undefined method \`expenses'](https://www.ruby-forum.com/t/nomethoderror-undefined-method-expenses/158897)

<div class="topic-metadata">

**Author:** [@arjackson](https://www.ruby-forum.com/u/arjackson)\
**Replies:** 2\
**Last updated:** [January 29, 2009, 12:47pm UTC](https://www.ruby-forum.com/t/nomethoderror-undefined-method-expenses/158897 "2009-01-29T12:47:58Z")

</div>

Hi, I am trying to figure out why I am receiving the following error. I am following an Apple Developers Rail Application tutorial. event.expenses.create(:vendor =\> vendor1, :amount =\>75.00) NameError: undefined l…

---

## [Update not working on production environment](https://www.ruby-forum.com/t/update-not-working-on-production-environment/158716)

<div class="topic-metadata">

**Author:** [@hema\_mca](https://www.ruby-forum.com/u/hema_mca)\
**Replies:** 2\
**Last updated:** [January 29, 2009, 12:42pm UTC](https://www.ruby-forum.com/t/update-not-working-on-production-environment/158716 "2009-01-29T12:42:39Z")

</div>

Hi All, I am new to ruby on rails,we are developing a integrated application which can be accessed by many companies… We developed application on development environment,recently we switched to production environmen…

---

## [Best practices for develop a web service (server+client)?](https://www.ruby-forum.com/t/best-practices-for-develop-a-web-service-server-client/158851)

<div class="topic-metadata">

**Author:** [@xdmx](https://www.ruby-forum.com/u/xdmx)\
**Replies:** 5\
**Last updated:** [January 29, 2009, 12:40pm UTC](https://www.ruby-forum.com/t/best-practices-for-develop-a-web-service-server-client/158851 "2009-01-29T12:40:11Z")

</div>

Hi, i’ve two applications (APP1 and APP2) and i want that APP2 is able to get data from APP1. I think that a simple rest web service is the way to go. Do you have some good examples/tutorials? I’ve googled but i find …

---

## [Prototype not working with rails 2.2.2?](https://www.ruby-forum.com/t/prototype-not-working-with-rails-2-2-2/158913)

<div class="topic-metadata">

**Author:** [@riky](https://www.ruby-forum.com/u/riky)\
**Replies:** 0\
**Last updated:** [January 29, 2009, 11:06am UTC](https://www.ruby-forum.com/t/prototype-not-working-with-rails-2-2-2/158913 "2009-01-29T11:06:59Z")

</div>

Hi, i made an application using rails and prototype and all worked fine… But today i upgraded rails to 2.2.2 and from that moment when i open the webpage with firefox it gives me an error like “object is null” and so…

---

## [No action responded to data error using link\_to .download a file from specific location](https://www.ruby-forum.com/t/no-action-responded-to-data-error-using-link-to-download-a-file-from-specific-location/158912)

<div class="topic-metadata">

**Author:** [@srikanth](https://www.ruby-forum.com/u/srikanth)\
**Replies:** 0\
**Last updated:** [January 29, 2009, 10:53am UTC](https://www.ruby-forum.com/t/no-action-responded-to-data-error-using-link-to-download-a-file-from-specific-location/158912 "2009-01-29T10:53:31Z")

</div>

Hi , I have appliaction which has various type of streams. And iam providing a link to stremname . ex:suppose i have stream called test.mpeg4 in public/data/test.mpeg4 folder using to link to stream. \<%= link\_to s…

---

## [Deprecation warning I get but the error is more than that I think](https://www.ruby-forum.com/t/deprecation-warning-i-get-but-the-error-is-more-than-that-i-think/157311)

<div class="topic-metadata">

**Author:** [@bearblu](https://www.ruby-forum.com/u/bearblu)\
**Replies:** 2\
**Last updated:** [January 29, 2009, 10:28am UTC](https://www.ruby-forum.com/t/deprecation-warning-i-get-but-the-error-is-more-than-that-i-think/157311 "2009-01-29T10:28:19Z")

</div>

The following code from the RailsSpace book: def correct\_error\_message(boundary, length) error\_messages = ActiveRecord::Errors.default\_error\_messages if boundary == :max sprintf(error\_messages\[:too\_long\], length) el…

---

## [Update 2 tables with one form](https://www.ruby-forum.com/t/update-2-tables-with-one-form/158911)

<div class="topic-metadata">

**Author:** [@Sean\_McGilvray](https://www.ruby-forum.com/u/Sean_McGilvray)\
**Replies:** 0\
**Last updated:** [January 29, 2009, 10:28am UTC](https://www.ruby-forum.com/t/update-2-tables-with-one-form/158911 "2009-01-29T10:28:19Z")

</div>

I have a form: \<% form\_tag :action =\> ‘create’ do %\> \<%= hidden\_field\_tag ‘plan’, params\[:plan\] %\> \<% fields\_for :account do |f| %\> \<%= f.text\_field :name %\> \<%= f.text\_field :domain %\>.\<%= AppConfig\['base\_d…

---

## [How to give onchange for select\_year rails helper](https://www.ruby-forum.com/t/how-to-give-onchange-for-select-year-rails-helper/158820)

<div class="topic-metadata">

**Author:** [@mjayakumar2k6](https://www.ruby-forum.com/u/mjayakumar2k6)\
**Replies:** 1\
**Last updated:** [January 29, 2009, 9:13am UTC](https://www.ruby-forum.com/t/how-to-give-onchange-for-select-year-rails-helper/158820 "2009-01-29T09:13:34Z")

</div>

\<%=select\_year(Date.today,:include\_blank=\>true, :start\_year =\> Date.today.strftime("%Y").to\_i, :end\_year =\> 1999)%\> i am using rhis helper… now i want to give onchange here… Please help me to solve this … thanks in a…

---

## [Any one help](https://www.ruby-forum.com/t/any-one-help/158892)

<div class="topic-metadata">

**Author:** [@lookshankar](https://www.ruby-forum.com/u/lookshankar)\
**Replies:** 2\
**Last updated:** [January 29, 2009, 5:41am UTC](https://www.ruby-forum.com/t/any-one-help/158892 "2009-01-29T05:41:46Z")

</div>

id | what | when | color | to | description | 1 | test |01/01/2009 | red |04/01/2009 | hi this is test | 2 | test2 |02/01/2009 | green |04/01/2009 | hi this is test | 3 | test3 |01/01/2009 …

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

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