# Rails

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

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

---

## [Javascript unescape](https://www.ruby-forum.com/t/javascript-unescape/142084)

<div class="topic-metadata">

**Author:** [@sazwqa](https://www.ruby-forum.com/u/sazwqa)\
**Replies:** 0\
**Last updated:** [July 3, 2008, 10:25am UTC](https://www.ruby-forum.com/t/javascript-unescape/142084 "2008-07-03T10:25:06Z")

</div>

In one of my applications I use the results from google ajax api (which outputs JSON) and I’m getting an unescaped string like this: “Sam\\u0026#39;s Home Page” which is basically : “Sam’s Home Page” what is happenin…

---

## [Attachment\_fu, minimum width and height, how?](https://www.ruby-forum.com/t/attachment-fu-minimum-width-and-height-how/142046)

<div class="topic-metadata">

**Author:** [@xdmx](https://www.ruby-forum.com/u/xdmx)\
**Replies:** 1\
**Last updated:** [July 3, 2008, 9:47am UTC](https://www.ruby-forum.com/t/attachment-fu-minimum-width-and-height-how/142046 "2008-07-03T09:47:33Z")

</div>

Hi guys, i’m using attachment\_fu for uploading images, but i’ve to check that the width and the height are at least 200px, how can i do this? i’ve tried to do a validate errors.add(:width, ‘’) if self.parent\_id.nil? a…

---

## [Tiny mce](https://www.ruby-forum.com/t/tiny-mce/141993)

<div class="topic-metadata">

**Author:** [@jaiganez](https://www.ruby-forum.com/u/jaiganez)\
**Replies:** 4\
**Last updated:** [July 3, 2008, 8:02am UTC](https://www.ruby-forum.com/t/tiny-mce/141993 "2008-07-03T08:02:31Z")

</div>

i ve installed tiny mce plugins…and extracted it to public/javascript folder…how can i write textarea tag in rhtml and how to call tinymce function…??? is there any link for tinymce step by step guide… ???

---

## [Sub-domain handling?](https://www.ruby-forum.com/t/sub-domain-handling/142069)

<div class="topic-metadata">

**Author:** [@Rajmohan\_B](https://www.ruby-forum.com/u/Rajmohan_B)\
**Replies:** 1\
**Last updated:** [July 3, 2008, 6:32am UTC](https://www.ruby-forum.com/t/sub-domain-handling/142069 "2008-07-03T06:32:02Z")

</div>

All, I am not sure if this is sub-domain handling, but am interested on how this can be handled in rails. How can an app handle the traffic to, say - http://part1.mydomain.com. The other normal traffic I guess will…

---

## [ActiveShipping throwing error in build\_access\_request](https://www.ruby-forum.com/t/activeshipping-throwing-error-in-build-access-request/142064)

<div class="topic-metadata">

**Author:** [@Nik\_B](https://www.ruby-forum.com/u/Nik_B)\
**Replies:** 0\
**Last updated:** [July 3, 2008, 4:16am UTC](https://www.ruby-forum.com/t/activeshipping-throwing-error-in-build-access-request/142064 "2008-07-03T04:16:10Z")

</div>

I’m using ActiveShipping to try and query for shipping rates - and when I’m getting an error when it’s building xmlnode. The full code calls and the stack trace are here: http://pastie.org/226833 but here are snippet…

---

## [Belongs\_to, has\_many relationship using other foreign key](https://www.ruby-forum.com/t/belongs-to-has-many-relationship-using-other-foreign-key/142057)

<div class="topic-metadata">

**Author:** [@mitch\_newbie](https://www.ruby-forum.com/u/mitch_newbie)\
**Replies:** 2\
**Last updated:** [July 3, 2008, 2:54am UTC](https://www.ruby-forum.com/t/belongs-to-has-many-relationship-using-other-foreign-key/142057 "2008-07-03T02:54:58Z")

</div>

I am creating a relationship between two tables and objects. public\_user has\_many :orders orders belongs\_to :public\_user however I need to connect them using a foreign key other than the public\_user\_id. Namely the…

---

## [A rails 2.1 friendly attribute rater?](https://www.ruby-forum.com/t/a-rails-2-1-friendly-attribute-rater/142059)

<div class="topic-metadata">

**Author:** [@bob](https://www.ruby-forum.com/u/bob)\
**Replies:** 0\
**Last updated:** [July 3, 2008, 1:56am UTC](https://www.ruby-forum.com/t/a-rails-2-1-friendly-attribute-rater/142059 "2008-07-03T01:56:30Z")

</div>

I’ve got a Model with 12 statements I want to let the user rate from 1 to 6. Instead of just having them enter a value in 12 fields with the statements as labels, I want to display 12 raters (1-6 stars, responds to mo…

---

## [Runtime smtp settings](https://www.ruby-forum.com/t/runtime-smtp-settings/142056)

<div class="topic-metadata">

**Author:** [@ankit2584](https://www.ruby-forum.com/u/ankit2584)\
**Replies:** 0\
**Last updated:** [July 3, 2008, 12:38am UTC](https://www.ruby-forum.com/t/runtime-smtp-settings/142056 "2008-07-03T00:38:15Z")

</div>

Hi, How can i have runtime smtp settings. I need to change the settings depending on from which email address(smetimes Yahoo, sometimes gmail) i need to send the mail Thank you.

---

## [Crashing after Update](https://www.ruby-forum.com/t/crashing-after-update/142000)

<div class="topic-metadata">

**Author:** [@gbesch](https://www.ruby-forum.com/u/gbesch)\
**Replies:** 3\
**Last updated:** [July 3, 2008, 12:33am UTC](https://www.ruby-forum.com/t/crashing-after-update/142000 "2008-07-03T00:33:14Z")

</div>

Hello All! I’ve been running Rails 2.0.2 with Ruby 1.8.6 for the last six months. I developed an application that runs fine on two different servers – or at least, it used to. I used Mongrel as a development server,…

---

## [Default behavior on unrecognized route in development and production environment](https://www.ruby-forum.com/t/default-behavior-on-unrecognized-route-in-development-and-production-environment/142045)

<div class="topic-metadata">

**Author:** [@waddilove](https://www.ruby-forum.com/u/waddilove)\
**Replies:** 3\
**Last updated:** [July 3, 2008, 12:12am UTC](https://www.ruby-forum.com/t/default-behavior-on-unrecognized-route-in-development-and-production-environment/142045 "2008-07-03T00:12:11Z")

</div>

Hello, The default behavior for a new rails 2.1 with mongrel 1.1.5 for an unrecognized route in both a production and development environment is to generate a Routing Exception. I was under the impression the default…

---

## [Do you develop stuff locally or on a server?](https://www.ruby-forum.com/t/do-you-develop-stuff-locally-or-on-a-server/141965)

<div class="topic-metadata">

**Author:** [@newbee-robert](https://www.ruby-forum.com/u/newbee-robert)\
**Replies:** 11\
**Last updated:** [July 3, 2008, 12:04am UTC](https://www.ruby-forum.com/t/do-you-develop-stuff-locally-or-on-a-server/141965 "2008-07-03T00:04:33Z")

</div>

Sorry if this is an obvious question but I’ve been searching around for an hour with no luck. As a novice programmer, I have no idea what good programming practice is. Iâ€™m trying to code a web app with a friend, and…

---

## [Legacy database and rails with its auto incrementing primary key problems](https://www.ruby-forum.com/t/legacy-database-and-rails-with-its-auto-incrementing-primary-key-problems/142053)

<div class="topic-metadata">

**Author:** [@cinderedmonkey](https://www.ruby-forum.com/u/cinderedmonkey)\
**Replies:** 0\
**Last updated:** [July 2, 2008, 11:56pm UTC](https://www.ruby-forum.com/t/legacy-database-and-rails-with-its-auto-incrementing-primary-key-problems/142053 "2008-07-02T23:56:21Z")

</div>

I’m sorta stuck as to what to do. I’m porting a legacy database where the primary key were not auto incrementing fields. An example create\_table: components do |t| t.integer :componentid … end and create\_table: …

---

## [Assert\_tag not working](https://www.ruby-forum.com/t/assert-tag-not-working/121642)

<div class="topic-metadata">

**Author:** [@deliak](https://www.ruby-forum.com/u/deliak)\
**Replies:** 4\
**Last updated:** [July 2, 2008, 10:39pm UTC](https://www.ruby-forum.com/t/assert-tag-not-working/121642 "2008-07-02T22:39:37Z")

</div>

Hi all, in a test I’m doing I’m looking for a div of class errorExplanation to know if an update passed validation, but even if the rendered html has it, as you can see below, the assert\_tag fails. What am I doing wro…

---

## [\[git\] Can't switch back to branch after unfreezing and freezing rails](https://www.ruby-forum.com/t/git-cant-switch-back-to-branch-after-unfreezing-and-freezing-rails/142034)

<div class="topic-metadata">

**Author:** [@g0nzo](https://www.ruby-forum.com/u/g0nzo)\
**Replies:** 1\
**Last updated:** [July 2, 2008, 10:30pm UTC](https://www.ruby-forum.com/t/git-cant-switch-back-to-branch-after-unfreezing-and-freezing-rails/142034 "2008-07-02T22:30:49Z")

</div>

Hi, it’s not directly Rails related, but as many Rails developers switched to git, maybe someone can help. I got an old app with frozen Rails that I wanted to refactor/update. Checked it out from svn repo and initial…

---

## [Will\_paginate memory leak?](https://www.ruby-forum.com/t/will-paginate-memory-leak/142043)

<div class="topic-metadata">

**Author:** [@nextpulse](https://www.ruby-forum.com/u/nextpulse)\
**Replies:** 0\
**Last updated:** [July 2, 2008, 9:48pm UTC](https://www.ruby-forum.com/t/will-paginate-memory-leak/142043 "2008-07-02T21:48:40Z")

</div>

I am using the latest will\_paginate gem and noticed that it seems to be leaking memory. I did a simple test of repeated calling a paginate on an activate record and memory usage just keeps growing and not being releas…

---

## [Pattern for creating child objects](https://www.ruby-forum.com/t/pattern-for-creating-child-objects/142044)

<div class="topic-metadata">

**Author:** [@adam](https://www.ruby-forum.com/u/adam)\
**Replies:** 1\
**Last updated:** [July 2, 2008, 9:42pm UTC](https://www.ruby-forum.com/t/pattern-for-creating-child-objects/142044 "2008-07-02T21:42:49Z")

</div>

Hi, complete newbie question but I’d like to understand the recommended controller pattern for creating child objects of a parent. The starting point is a display action for the parent: def show I have a button on the…

---

## [MySQL gem vs RoR default library](https://www.ruby-forum.com/t/mysql-gem-vs-ror-default-library/142041)

<div class="topic-metadata">

**Author:** [@gsb](https://www.ruby-forum.com/u/gsb)\
**Replies:** 1\
**Last updated:** [July 2, 2008, 9:06pm UTC](https://www.ruby-forum.com/t/mysql-gem-vs-ror-default-library/142041 "2008-07-02T21:06:19Z")

</div>

I have Rails v 2.0.2 Ruby v 1.8.6 MySQL db v 5.x I am confused as to whether we should use the MySQL gem or the RoR default MySQL support library. The consultants that had worked on the initial phase of the project …

---

## [Input text fields in multiple records of the same model](https://www.ruby-forum.com/t/input-text-fields-in-multiple-records-of-the-same-model/142039)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [July 2, 2008, 9:04pm UTC](https://www.ruby-forum.com/t/input-text-fields-in-multiple-records-of-the-same-model/142039 "2008-07-02T21:04:33Z")

</div>

I have a form where the user can view a list of line items that has description (read only) and quantity (input field). Can someone please give me pointers on how to allow users to enter the quantity for the line item…

---

## [ZenTest failure on startup](https://www.ruby-forum.com/t/zentest-failure-on-startup/141966)

<div class="topic-metadata">

**Author:** [@Don\_F](https://www.ruby-forum.com/u/Don_F)\
**Replies:** 2\
**Last updated:** [July 2, 2008, 8:16pm UTC](https://www.ruby-forum.com/t/zentest-failure-on-startup/141966 "2008-07-02T20:16:19Z")

</div>

I was running zentest 3.5 and rails 1.2.6 for some time. I upgraded my gems and got ZenTest 3.9.3. It stopped working with a failure on start up. I just dropped back to the previous version and was fine. I just upgra…

---

## [Reloading problem in development](https://www.ruby-forum.com/t/reloading-problem-in-development/141999)

<div class="topic-metadata">

**Author:** [@roallen](https://www.ruby-forum.com/u/roallen)\
**Replies:** 11\
**Last updated:** [July 2, 2008, 8:08pm UTC](https://www.ruby-forum.com/t/reloading-problem-in-development/141999 "2008-07-02T20:08:18Z")

</div>

I just upgraded from 1.2.3 to 2.1.0 and now I’m seeing a model reloading problem in development. If I set config.cache\_classes = true, the problem goes away (which obviously isn’t a very good workaround in developmen…

---

## [L10n of numbers?](https://www.ruby-forum.com/t/l10n-of-numbers/125255)

<div class="topic-metadata">

**Author:** [@Isak\_H](https://www.ruby-forum.com/u/Isak_H)\
**Replies:** 4\
**Last updated:** [July 2, 2008, 8:00pm UTC](https://www.ruby-forum.com/t/l10n-of-numbers/125255 "2008-07-02T20:00:34Z")

</div>

I need to localize numbers in text fields and have been looking at the various L10n plugins that claim to have number support. Support seems to mean that the plugin includes a Number#to\_localized\_string method, which …

---

## [RJS/Ajax insert\_html problem](https://www.ruby-forum.com/t/rjs-ajax-insert-html-problem/142029)

<div class="topic-metadata">

**Author:** [@mwalsh](https://www.ruby-forum.com/u/mwalsh)\
**Replies:** 2\
**Last updated:** [July 2, 2008, 7:22pm UTC](https://www.ruby-forum.com/t/rjs-ajax-insert-html-problem/142029 "2008-07-02T19:22:24Z")

</div>

I’m getting weird results using an Ajax call to render a partial. My RJS is getting executed properly as nearly as I can tell but instead of rendering the partial, it renders the Javascript that should be getting exec…

---

## [\[ANN/ADV\] Summer Rails training courses from Ruby Power and Light, in Edison, NJ](https://www.ruby-forum.com/t/ann-adv-summer-rails-training-courses-from-ruby-power-and-light-in-edison-nj/142027)

<div class="topic-metadata">

**Author:** [@David\_ASBlack](https://www.ruby-forum.com/u/David_ASBlack)\
**Replies:** 0\
**Last updated:** [July 2, 2008, 6:40pm UTC](https://www.ruby-forum.com/t/ann-adv-summer-rails-training-courses-from-ruby-power-and-light-in-edison-nj/142027 "2008-07-02T18:40:32Z")

</div>

Hi everyone – A little bit of date and course shuffling has taken place, with the following very pleasing results: Ruby Power and Light will be offering the following courses, both held in the training facilities of …

---

## [Adsense reader](https://www.ruby-forum.com/t/adsense-reader/142025)

<div class="topic-metadata">

**Author:** [@silkcom](https://www.ruby-forum.com/u/silkcom)\
**Replies:** 0\
**Last updated:** [July 2, 2008, 6:33pm UTC](https://www.ruby-forum.com/t/adsense-reader/142025 "2008-07-02T18:33:30Z")

</div>

Hello all, I’ve been trying to make an adsense reader for my rails app, and I’m running into a lot of trouble. Here’s what I want: On my admin page I’d like to be able to display the $ in my adsense account. (Like …

---

## [Acts\_as\_paranoid is making me crazy](https://www.ruby-forum.com/t/acts-as-paranoid-is-making-me-crazy/135105)

<div class="topic-metadata">

**Author:** [@chrisolsen](https://www.ruby-forum.com/u/chrisolsen)\
**Replies:** 4\
**Last updated:** [July 2, 2008, 5:58pm UTC](https://www.ruby-forum.com/t/acts-as-paranoid-is-making-me-crazy/135105 "2008-07-02T17:58:23Z")

</div>

Acts\_as\_paranoid is giving me a headache when performing migrations. For some reason when I perform a migration I get a “stack level too deep” error. If I comment out the database inserts that are performed (countrie…

---

## [Update\_all not changing updated\_at](https://www.ruby-forum.com/t/update-all-not-changing-updated-at/142016)

<div class="topic-metadata">

**Author:** [@dino\_d](https://www.ruby-forum.com/u/dino_d)\
**Replies:** 3\
**Last updated:** [July 2, 2008, 5:10pm UTC](https://www.ruby-forum.com/t/update-all-not-changing-updated-at/142016 "2008-07-02T17:10:13Z")

</div>

Hi everyone- Model.update\_all works and changes the records, but it’s not changing the updated\_at field. Am I doing something wrong or is this by design? Thanks, Dino

---

## [Migrate from SQLite3 to MySQL](https://www.ruby-forum.com/t/migrate-from-sqlite3-to-mysql/142018)

<div class="topic-metadata">

**Author:** [@jasonwold](https://www.ruby-forum.com/u/jasonwold)\
**Replies:** 0\
**Last updated:** [July 2, 2008, 5:09pm UTC](https://www.ruby-forum.com/t/migrate-from-sqlite3-to-mysql/142018 "2008-07-02T17:09:02Z")

</div>

Are there any tricks or tips for migrating a development database in SQLite to a production database in MySQL? thanks, Jason

---

## [InstantRails](https://www.ruby-forum.com/t/instantrails/141856)

<div class="topic-metadata">

**Author:** [@bruparel](https://www.ruby-forum.com/u/bruparel)\
**Replies:** 8\
**Last updated:** [July 2, 2008, 4:59pm UTC](https://www.ruby-forum.com/t/instantrails/141856 "2008-07-02T16:59:43Z")

</div>

Does anyone know if InstantRails will be upgraded for Rails 2.1? I see a lot of threads where people are discussing problems upgrading from 2.0 to 2.1. I would rather wait for InstantRails2.1 if it was close? Thanks…

---

## [:select in find does not work with RESTful routes](https://www.ruby-forum.com/t/select-in-find-does-not-work-with-restful-routes/142008)

<div class="topic-metadata">

**Author:** [@batasrki](https://www.ruby-forum.com/u/batasrki)\
**Replies:** 2\
**Last updated:** [July 2, 2008, 4:39pm UTC](https://www.ruby-forum.com/t/select-in-find-does-not-work-with-restful-routes/142008 "2008-07-02T16:39:58Z")

</div>

Hello all, I haven’t been able to find an answer to this, so I thought the collective intelligence of this group might be able to help me out. Basically, I have something close to a blog engine written. Now, I do rea…

---

## [Problem posting to a nested resource URL via AJAX](https://www.ruby-forum.com/t/problem-posting-to-a-nested-resource-url-via-ajax/142012)

<div class="topic-metadata">

**Author:** [@df-sean](https://www.ruby-forum.com/u/df-sean)\
**Replies:** 0\
**Last updated:** [July 2, 2008, 4:30pm UTC](https://www.ruby-forum.com/t/problem-posting-to-a-nested-resource-url-via-ajax/142012 "2008-07-02T16:30:53Z")

</div>

I want to get an updated list of states depending on the country the user selects. I’m using REST so I would like to post to countries/x/ states where x is the value of the select. I’m trying to use observe\_field bu…

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

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