# Rails

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

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

---

## [File upload using form\_remote tag](https://www.ruby-forum.com/t/file-upload-using-form-remote-tag/168628)

<div class="topic-metadata">

**Author:** [@shameermelethil](https://www.ruby-forum.com/u/shameermelethil)\
**Replies:** 1\
**Last updated:** [January 7, 2010, 4:22pm UTC](https://www.ruby-forum.com/t/file-upload-using-form-remote-tag/168628 "2010-01-07T16:22:33Z")

</div>

Is it possible to upload files using form\_remote\_tag in rails 2.3.2. If please explain me the steps to follow. Thanks in advance Shameer Melethil

---

## [Unit testing /lib directory](https://www.ruby-forum.com/t/unit-testing-lib-directory/181222)

<div class="topic-metadata">

**Author:** [@Pasalic\_Z](https://www.ruby-forum.com/u/Pasalic_Z)\
**Replies:** 0\
**Last updated:** [January 7, 2010, 3:06pm UTC](https://www.ruby-forum.com/t/unit-testing-lib-directory/181222 "2010-01-07T15:06:44Z")

</div>

Hi I’m writing small replacement for ActiveRecord to support columns oriented databases (HBase). I put all of my code into /lib folder and created small rake file into /lib/tasks to support unit testing: #----- start…

---

## [Flyerhzm-metric\_fu = metric\_fu + rails\_best\_practices](https://www.ruby-forum.com/t/flyerhzm-metric-fu-metric-fu-rails-best-practices/181221)

<div class="topic-metadata">

**Author:** [@flyerhzm](https://www.ruby-forum.com/u/flyerhzm)\
**Replies:** 0\
**Last updated:** [January 7, 2010, 3:01pm UTC](https://www.ruby-forum.com/t/flyerhzm-metric-fu-metric-fu-rails-best-practices/181221 "2010-01-07T15:01:27Z")

</div>

I have forked metric\_fu and add rails\_best\_practices to it. rails\_best\_practices is a great gem to check your rails app codes and give you some good suggestions for better rails codes. The repository of flyerhzm-metri…

---

## [Scaffold migration](https://www.ruby-forum.com/t/scaffold-migration/181208)

<div class="topic-metadata">

**Author:** [@saboor](https://www.ruby-forum.com/u/saboor)\
**Replies:** 1\
**Last updated:** [January 7, 2010, 2:32pm UTC](https://www.ruby-forum.com/t/scaffold-migration/181208 "2010-01-07T14:32:11Z")

</div>

hi, i have build a scaffold of \[book name:string pages:int\] it build successfully, then from rake task i did db:create:all and db:migrate , all was working fine now i want to change the defination of book form previo…

---

## [How to use the same params in respond\_to for some formats?](https://www.ruby-forum.com/t/how-to-use-the-same-params-in-respond-to-for-some-formats/181220)

<div class="topic-metadata">

**Author:** [@camilleroux](https://www.ruby-forum.com/u/camilleroux)\
**Replies:** 0\
**Last updated:** [January 7, 2010, 2:21pm UTC](https://www.ruby-forum.com/t/how-to-use-the-same-params-in-respond-to-for-some-formats/181220 "2010-01-07T14:21:09Z")

</div>

Hello, I want to make an API in XML and JSON (maybe more), and I want most of the time use the same parameters for the to\_xml and the to\_json at least (same :include, :only, :except, :methods). What is the best way t…

---

## [Strange problem with query](https://www.ruby-forum.com/t/strange-problem-with-query/181217)

<div class="topic-metadata">

**Author:** [@rafaelrosafu](https://www.ruby-forum.com/u/rafaelrosafu)\
**Replies:** 0\
**Last updated:** [January 7, 2010, 1:39pm UTC](https://www.ruby-forum.com/t/strange-problem-with-query/181217 "2010-01-07T13:39:06Z")

</div>

Hi all, suppose I have the following model: class FrotaEmpresa \< ActiveRecord::Base belongs\_to :servico, :foreign\_key=\>‘sev\_codigo’ belongs\_to :tipo\_veiculo, :foreign\_key=\>‘tve\_codigo’ end in my controller I’m bui…

---

## [How to Reduce cpu and memory utilization](https://www.ruby-forum.com/t/how-to-reduce-cpu-and-memory-utilization/181198)

<div class="topic-metadata">

**Author:** [@martin\_mercy2001](https://www.ruby-forum.com/u/martin_mercy2001)\
**Replies:** 4\
**Last updated:** [January 7, 2010, 11:38am UTC](https://www.ruby-forum.com/t/how-to-reduce-cpu-and-memory-utilization/181198 "2010-01-07T11:38:17Z")

</div>

I have created a web admin panel using ROR when i run my application the mogrel server utilizes more CPU and memory? How to reduce the cpu utilization and memory utilization in general? Just for a simple add, remove, …

---

## [SMS Messaging](https://www.ruby-forum.com/t/sms-messaging/181011)

<div class="topic-metadata">

**Author:** [@Merrick\_C](https://www.ruby-forum.com/u/Merrick_C)\
**Replies:** 3\
**Last updated:** [January 7, 2010, 10:22am UTC](https://www.ruby-forum.com/t/sms-messaging/181011 "2010-01-07T10:22:49Z")

</div>

Forgive this mis targeted email, I didn’t know where else to send it to be truthful. I am building an application using Ruby on Rails, I need to know what SMS based service Highrise is using or something similar. Anyo…

---

## [Generate PDF](https://www.ruby-forum.com/t/generate-pdf/181069)

<div class="topic-metadata">

**Author:** [@korn900](https://www.ruby-forum.com/u/korn900)\
**Replies:** 3\
**Last updated:** [January 7, 2010, 10:12am UTC](https://www.ruby-forum.com/t/generate-pdf/181069 "2010-01-07T10:12:51Z")

</div>

Hi ! I need to create some pdf from my application. I have a table people with a field address and I need to generate a pdf of label of each address ( I think 10 labels per page). The pdf can have around 500 pages. …

---

## [Problem in jasper report intrgration with rails application](https://www.ruby-forum.com/t/problem-in-jasper-report-intrgration-with-rails-application/181092)

<div class="topic-metadata">

**Author:** [@soutom](https://www.ruby-forum.com/u/soutom)\
**Replies:** 1\
**Last updated:** [January 7, 2010, 9:06am UTC](https://www.ruby-forum.com/t/problem-in-jasper-report-intrgration-with-rails-application/181092 "2010-01-07T09:06:08Z")

</div>

hi all, i want to integrate jasper report with rails application. So i follow the instruction as given in the following link http://wiki.rubyonrails.org/rails/pages/HowtoIntegrateJasperReports But after that when i r…

---

## [Changing :activerecord to :models in Rails yml files](https://www.ruby-forum.com/t/changing-activerecord-to-models-in-rails-yml-files/181019)

<div class="topic-metadata">

**Author:** [@josevalim](https://www.ruby-forum.com/u/josevalim)\
**Replies:** 17\
**Last updated:** [January 7, 2010, 9:02am UTC](https://www.ruby-forum.com/t/changing-activerecord-to-models-in-rails-yml-files/181019 "2010-01-07T09:02:37Z")

</div>

Hey folks, I want to propose changing the namespace in I18n files from :activerecord to :models. The reason is to be more agnostic since with ActiveModel it will appear several plugins that are similar to ActiveRecor…

---

## [Modularity, engines and loading](https://www.ruby-forum.com/t/modularity-engines-and-loading/181197)

<div class="topic-metadata">

**Author:** [@vzmind](https://www.ruby-forum.com/u/vzmind)\
**Replies:** 0\
**Last updated:** [January 7, 2010, 7:25am UTC](https://www.ruby-forum.com/t/modularity-engines-and-loading/181197 "2010-01-07T07:25:11Z")

</div>

Hi, I am working on blankapplication.org (an OpenSource CMS 2.0). I would like to add an extension behaviour to it as it is done on Spree. I thought initially to plug new addons using engines but I came to a loading …

---

## [Image in production mode + nginx missed half page](https://www.ruby-forum.com/t/image-in-production-mode-nginx-missed-half-page/181187)

<div class="topic-metadata">

**Author:** [@artchrst](https://www.ruby-forum.com/u/artchrst)\
**Replies:** 0\
**Last updated:** [January 7, 2010, 2:32am UTC](https://www.ruby-forum.com/t/image-in-production-mode-nginx-missed-half-page/181187 "2010-01-07T02:32:54Z")

</div>

Hi Guys, I’ve updated my images with 715x500. It works fine in my frontpage in development mode. However, when I deploy to my production server (Nginx+thin+Rails), the image cannot be displayed perfectly, only around…

---

## [Create route for external file using get with no controller](https://www.ruby-forum.com/t/create-route-for-external-file-using-get-with-no-controller/181174)

<div class="topic-metadata">

**Author:** [@elricstorm](https://www.ruby-forum.com/u/elricstorm)\
**Replies:** 5\
**Last updated:** [January 6, 2010, 10:15pm UTC](https://www.ruby-forum.com/t/create-route-for-external-file-using-get-with-no-controller/181174 "2010-01-06T22:15:18Z")

</div>

I created a special flash file that will read tag cloud variables from an external text file which will be located in the same directory as the swf. The tags are kept in the database and once per day a definitions.tx…

---

## [REST URI questions](https://www.ruby-forum.com/t/rest-uri-questions/181171)

<div class="topic-metadata">

**Author:** [@LeonS](https://www.ruby-forum.com/u/LeonS)\
**Replies:** 1\
**Last updated:** [January 6, 2010, 10:15pm UTC](https://www.ruby-forum.com/t/rest-uri-questions/181171 "2010-01-06T22:15:08Z")

</div>

Hi, I stuck by creating the URIs for my Rails Application. Let me explain my app: The User has Tasks , which are organized as a Nested\_Set. So with the URI “domain/tasks” the root tasks of the user are shown. Now i …

---

## [Current selected menu element?](https://www.ruby-forum.com/t/current-selected-menu-element/181170)

<div class="topic-metadata">

**Author:** [@benol](https://www.ruby-forum.com/u/benol)\
**Replies:** 1\
**Last updated:** [January 6, 2010, 9:41pm UTC](https://www.ruby-forum.com/t/current-selected-menu-element/181170 "2010-01-06T21:41:45Z")

</div>

Hi, I am using rails 2.3.4… Any idea how to implement such thing?: def secondary\_menu\_link\_to(link\_name, link\_path) if (link\_path is the current @controller.controller\_path and @controller.action\_name) link\_to “&ra…

---

## [Select distinct records from an Array](https://www.ruby-forum.com/t/select-distinct-records-from-an-array/180929)

<div class="topic-metadata">

**Author:** [@hugues](https://www.ruby-forum.com/u/hugues)\
**Replies:** 7\
**Last updated:** [January 6, 2010, 9:04pm UTC](https://www.ruby-forum.com/t/select-distinct-records-from-an-array/180929 "2010-01-06T21:04:05Z")

</div>

Hello there, Project is about a personal trainers directory. I would like to create a listing (filter) of available physical exercices to browse the directory by physical exercice. My Models are : class PersonalTrai…

---

## [Currency locale](https://www.ruby-forum.com/t/currency-locale/181172)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [January 6, 2010, 9:03pm UTC](https://www.ruby-forum.com/t/currency-locale/181172 "2010-01-06T21:03:07Z")

</div>

Hi Andrey, The API with t/translation methods is far better, thanks :slight\_smile: Important thing is ability to localize currencies. Locales need to convey informations about: number of digits after decimal separat…

---

## [Different Usermodels with Authlogic + Declarative Authorizat](https://www.ruby-forum.com/t/different-usermodels-with-authlogic-declarative-authorizat/181066)

<div class="topic-metadata">

**Author:** [@hatra-e](https://www.ruby-forum.com/u/hatra-e)\
**Replies:** 2\
**Last updated:** [January 6, 2010, 8:31pm UTC](https://www.ruby-forum.com/t/different-usermodels-with-authlogic-declarative-authorizat/181066 "2010-01-06T20:31:48Z")

</div>

Hi there, I’m working on a Rails App, in which I use the gems Authlogic and Declarative Authorization to put Users into different roles. But because the roles are very different from each other, I thought it would be…

---

## [ActionMailer intermittent test failure](https://www.ruby-forum.com/t/actionmailer-intermittent-test-failure/181166)

<div class="topic-metadata">

**Author:** [@Curtis\_C](https://www.ruby-forum.com/u/Curtis_C)\
**Replies:** 1\
**Last updated:** [January 6, 2010, 6:53pm UTC](https://www.ruby-forum.com/t/actionmailer-intermittent-test-failure/181166 "2010-01-06T18:53:10Z")

</div>

I’ve written a test for a controller that sends email using ActionMailer. The problem is the test fails sporadically. It almost seems like ActionMailer::Base.deliveries isn’t being updated by the time the assert chec…

---

## [Gem xmlsimple behaves unexplectedly after adding aws-s3 gem](https://www.ruby-forum.com/t/gem-xmlsimple-behaves-unexplectedly-after-adding-aws-s3-gem/181157)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [January 6, 2010, 6:16pm UTC](https://www.ruby-forum.com/t/gem-xmlsimple-behaves-unexplectedly-after-adding-aws-s3-gem/181157 "2010-01-06T18:16:53Z")

</div>

Hi all, after spending a long night trying to track down some unexpected spec failures in my app I came to the conclusion that the reason was aws-s3 gem, which probably monkey patches XmlSimple class and changes its …

---

## [Testing private methods](https://www.ruby-forum.com/t/testing-private-methods/66355)

<div class="topic-metadata">

**Author:** [@Ed\_Hickey](https://www.ruby-forum.com/u/Ed_Hickey)\
**Replies:** 7\
**Last updated:** [January 6, 2010, 6:12pm UTC](https://www.ruby-forum.com/t/testing-private-methods/66355 "2010-01-06T18:12:44Z")

</div>

In my unit tests, I get errors when attempting to test private or protected model methods. I’ve tried adding public :add\_assertion to the class (read that somewhere) but I still get the same problem. Anyone have an…

---

## [Validating New Record with Related Records](https://www.ruby-forum.com/t/validating-new-record-with-related-records/181163)

<div class="topic-metadata">

**Author:** [@mikej](https://www.ruby-forum.com/u/mikej)\
**Replies:** 0\
**Last updated:** [January 6, 2010, 6:08pm UTC](https://www.ruby-forum.com/t/validating-new-record-with-related-records/181163 "2010-01-06T18:08:06Z")

</div>

I have a custom validation that validates a record by looking at related records. The problem is that until the record has been saved it has no id, therefore the relationships are not established. At the moment the …

---

## [Rails migrations--urgent](https://www.ruby-forum.com/t/rails-migrations-urgent/181151)

<div class="topic-metadata">

**Author:** [@hitesh](https://www.ruby-forum.com/u/hitesh)\
**Replies:** 1\
**Last updated:** [January 6, 2010, 5:24pm UTC](https://www.ruby-forum.com/t/rails-migrations-urgent/181151 "2010-01-06T17:24:45Z")

</div>

Hello, I am new bee to Rails and I am really in a dilemma of follwing task: I have some existing migrations and going to use some more new migrations, and I have few common fields which is not covered in my existing(…

---

## [Serialized attribute converting to string on reload](https://www.ruby-forum.com/t/serialized-attribute-converting-to-string-on-reload/181139)

<div class="topic-metadata">

**Author:** [@RailinAndWailin](https://www.ruby-forum.com/u/RailinAndWailin)\
**Replies:** 4\
**Last updated:** [January 6, 2010, 5:13pm UTC](https://www.ruby-forum.com/t/serialized-attribute-converting-to-string-on-reload/181139 "2010-01-06T17:13:06Z")

</div>

Hello, Anybody help me out? I done googled it good and didn’t find anything (which should mean that I’ve done something wrong). Not much code to talk about here, quite simply I have an attribute that is serialzied an…

---

## [Development environment bug? (config.load\_paths doesn't take)](https://www.ruby-forum.com/t/development-environment-bug-config-load-paths-doesnt-take/117522)

<div class="topic-metadata">

**Author:** [@student](https://www.ruby-forum.com/u/student)\
**Replies:** 6\
**Last updated:** [January 6, 2010, 4:25pm UTC](https://www.ruby-forum.com/t/development-environment-bug-config-load-paths-doesnt-take/117522 "2010-01-06T16:25:40Z")

</div>

This works for me in production but not development. Problem: I have a need to group models into subdirectories which in no way map to models. Suggested solution (as per article): Add the following code to the Rails…

---

## [Paramaters problem](https://www.ruby-forum.com/t/paramaters-problem/181142)

<div class="topic-metadata">

**Author:** [@ahmet](https://www.ruby-forum.com/u/ahmet)\
**Replies:** 1\
**Last updated:** [January 6, 2010, 4:06pm UTC](https://www.ruby-forum.com/t/paramaters-problem/181142 "2010-01-06T16:06:21Z")

</div>

Hi everybody, I have paramaters like this this is action on controller side :action =\> ‘new’, :result =\> session %\> and this is view side test\_controller/new?&&&&&result\[user\]=2 user controller @user = User.find(p…

---

## [AWS-S3 gem behaviour](https://www.ruby-forum.com/t/aws-s3-gem-behaviour/181156)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [January 6, 2010, 3:42pm UTC](https://www.ruby-forum.com/t/aws-s3-gem-behaviour/181156 "2010-01-06T15:42:21Z")

</div>

Hi, after spending a long night trying to track down some unexpected spec failures I came to the conclusion that

---

## [Built with Rails: http://hpricot.com](https://www.ruby-forum.com/t/built-with-rails-http-hpricot-com/181149)

<div class="topic-metadata">

**Author:** [@bikle](https://www.ruby-forum.com/u/bikle)\
**Replies:** 0\
**Last updated:** [January 6, 2010, 11:23am UTC](https://www.ruby-forum.com/t/built-with-rails-http-hpricot-com/181149 "2010-01-06T11:23:04Z")

</div>

People, I enhanced http://hpricot.com and deployed it to heroku. I use hpricot.com to build and test various hpricot expressions and then run them against a variety of websites. Hpricot.com shows you the resulting h…

---

## [Display 2nd selectbox](https://www.ruby-forum.com/t/display-2nd-selectbox/181145)

<div class="topic-metadata">

**Author:** [@Nandu](https://www.ruby-forum.com/u/Nandu)\
**Replies:** 0\
**Last updated:** [January 6, 2010, 10:18am UTC](https://www.ruby-forum.com/t/display-2nd-selectbox/181145 "2010-01-06T10:18:41Z")

</div>

I am very new to scripting and appreciate any help from you gurus… I have two selectboxes, (2nd select box should not be visisble)after selecting an option in one selectbox the other selectbox should be displayed. I …

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

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