# Rails

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

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

---

## [Newbie confused by div\_for](https://www.ruby-forum.com/t/newbie-confused-by-div-for/163299)

<div class="topic-metadata">

**Author:** [@combas](https://www.ruby-forum.com/u/combas)\
**Replies:** 2\
**Last updated:** [March 19, 2009, 12:33am UTC](https://www.ruby-forum.com/t/newbie-confused-by-div-for/163299 "2009-03-19T00:33:30Z")

</div>

Hi, Absolute Rails beginner here. in app/views/players/show.html.rb: \<%= render :partial =\> @player.items %\> in app/views/items/\_item.html.erb \<% div\_for item do %\> \<%= h(item.name) %\> \<% end %\> That works fine.…

---

## [Localizing images](https://www.ruby-forum.com/t/localizing-images/160525)

<div class="topic-metadata">

**Author:** [@zeba-momin](https://www.ruby-forum.com/u/zeba-momin)\
**Replies:** 1\
**Last updated:** [March 19, 2009, 12:06am UTC](https://www.ruby-forum.com/t/localizing-images/160525 "2009-03-19T00:06:43Z")

</div>

Hi, I’m using rails 2.2.2 and i18n for localization… I want to know…how do I localize the text which are a part of images…??? Currently I’m offering English and German as the language options… I have made exact copi…

---

## [Two belongs\_to refering the same model?](https://www.ruby-forum.com/t/two-belongs-to-refering-the-same-model/143385)

<div class="topic-metadata">

**Author:** [@micktaiwan](https://www.ruby-forum.com/u/micktaiwan)\
**Replies:** 6\
**Last updated:** [March 18, 2009, 11:20pm UTC](https://www.ruby-forum.com/t/two-belongs-to-refering-the-same-model/143385 "2009-03-18T23:20:01Z")

</div>

Hi, My task manager has a task model: class Task \< ActiveRecord::Base belongs\_to :project belongs\_to :user # responsible of the task end By adding belongs\_to :user, my task objets have a user method: name = Task.f…

---

## [Version of SqlSessionStore for Rails 2.3](https://www.ruby-forum.com/t/version-of-sqlsessionstore-for-rails-2-3/163294)

<div class="topic-metadata">

**Author:** [@nwiger](https://www.ruby-forum.com/u/nwiger)\
**Replies:** 0\
**Last updated:** [March 18, 2009, 11:16pm UTC](https://www.ruby-forum.com/t/version-of-sqlsessionstore-for-rails-2-3/163294 "2009-03-18T23:16:31Z")

</div>

If you’re using SqlSessionStore (originally from Stefan K. of railsexpress.de) and upgrade to Rails 2.3, it will break. I have a github version that I have updated for Rails 2.3, and also added a new “native columns” …

---

## [ActiveRecord and SOAP](https://www.ruby-forum.com/t/activerecord-and-soap/163274)

<div class="topic-metadata">

**Author:** [@slava](https://www.ruby-forum.com/u/slava)\
**Replies:** 2\
**Last updated:** [March 18, 2009, 11:15pm UTC](https://www.ruby-forum.com/t/activerecord-and-soap/163274 "2009-03-18T23:15:56Z")

</div>

I need to get some of the data for my models from SOAP based services and some from a rails db. I am relatively new to Rails and not sure how to do it right. class Product \< ActiveRecord::Base # products should be l…

---

## [How to store account information separately and across multiple applications?](https://www.ruby-forum.com/t/how-to-store-account-information-separately-and-across-multiple-applications/163291)

<div class="topic-metadata">

**Author:** [@snowbird122](https://www.ruby-forum.com/u/snowbird122)\
**Replies:** 1\
**Last updated:** [March 18, 2009, 11:14pm UTC](https://www.ruby-forum.com/t/how-to-store-account-information-separately-and-across-multiple-applications/163291 "2009-03-18T23:14:10Z")

</div>

We are currently working on a solution to centralize our userbase. The central userbase will contain primary account information that will be extended on an application-specific basis. For instance, all users of our …

---

## [Simple auto-complete tutorial](https://www.ruby-forum.com/t/simple-auto-complete-tutorial/163292)

<div class="topic-metadata">

**Author:** [@davox](https://www.ruby-forum.com/u/davox)\
**Replies:** 0\
**Last updated:** [March 18, 2009, 11:09pm UTC](https://www.ruby-forum.com/t/simple-auto-complete-tutorial/163292 "2009-03-18T23:09:28Z")

</div>

I’m putting this here because it took too long to set up: ============================== Things you’ll need for auto\_complete since everyone else was too lazy to write down: Example model is ‘list’ Example field is …

---

## [Problem with paging and MS SQL](https://www.ruby-forum.com/t/problem-with-paging-and-ms-sql/163288)

<div class="topic-metadata">

**Author:** [@porcbelly](https://www.ruby-forum.com/u/porcbelly)\
**Replies:** 0\
**Last updated:** [March 18, 2009, 11:04pm UTC](https://www.ruby-forum.com/t/problem-with-paging-and-ms-sql/163288 "2009-03-18T23:04:45Z")

</div>

am trying to get the index page going on my table I am using a table on Micrsoft SQL Server, when showing a single row from the table it works OK. but when accessing the index I am gettingthe following error message …

---

## [Forcing delivery of plain text email when both plain text and html templates are present](https://www.ruby-forum.com/t/forcing-delivery-of-plain-text-email-when-both-plain-text-and-html-templates-are-present/163287)

<div class="topic-metadata">

**Author:** [@lunaclaire](https://www.ruby-forum.com/u/lunaclaire)\
**Replies:** 0\
**Last updated:** [March 18, 2009, 10:57pm UTC](https://www.ruby-forum.com/t/forcing-delivery-of-plain-text-email-when-both-plain-text-and-html-templates-are-present/163287 "2009-03-18T22:57:42Z")

</div>

I have a new user requirement that’s causing a problem… I have a user notification for which I build both plaintext and html templates and rails takes care of assembling a multipart/alternative msg that contains both …

---

## [4 Rails apps using the same table. How to streamline?](https://www.ruby-forum.com/t/4-rails-apps-using-the-same-table-how-to-streamline/163285)

<div class="topic-metadata">

**Author:** [@LaughingNinja](https://www.ruby-forum.com/u/LaughingNinja)\
**Replies:** 0\
**Last updated:** [March 18, 2009, 10:25pm UTC](https://www.ruby-forum.com/t/4-rails-apps-using-the-same-table-how-to-streamline/163285 "2009-03-18T22:25:59Z")

</div>

Hi, I have 4 apps using similar User tables(3 open source projects and one in-house app). I’m trying to merge into one shared database User table (external to all 4 apps). I’m using the following code in the User mo…

---

## [Flex and Rails - NoMethodError](https://www.ruby-forum.com/t/flex-and-rails-nomethoderror/163179)

<div class="topic-metadata">

**Author:** [@enzor](https://www.ruby-forum.com/u/enzor)\
**Replies:** 8\
**Last updated:** [March 18, 2009, 10:25pm UTC](https://www.ruby-forum.com/t/flex-and-rails-nomethoderror/163179 "2009-03-18T22:25:59Z")

</div>

Hi all!! Recently , i tryed to integrate flex and rail, and it was a nice work, really fast and flexible, until a curious bug On my local development machine, i try to destroy an item trough an id, and all goes well. …

---

## [Rake db:test:purge , nil.object detected](https://www.ruby-forum.com/t/rake-dbpurge-nil-object-detected/163276)

<div class="topic-metadata">

**Author:** [@pietia](https://www.ruby-forum.com/u/pietia)\
**Replies:** 1\
**Last updated:** [March 18, 2009, 10:01pm UTC](https://www.ruby-forum.com/t/rake-dbpurge-nil-object-detected/163276 "2009-03-18T22:01:19Z")

</div>

Hii have problem running rake db:test:purge ( my test database is empty ) : adter running with trace it shouts : matthew:rails code pietia$ rake db:test:purge --trace (in /Users/pietia/Documents/praca/projekty/silk/ra…

---

## [Disabel "pluralize\_table\_names" in Rails 2.3.2](https://www.ruby-forum.com/t/disabel-pluralize-table-names-in-rails-2-3-2/163167)

<div class="topic-metadata">

**Author:** [@giga](https://www.ruby-forum.com/u/giga)\
**Replies:** 3\
**Last updated:** [March 18, 2009, 9:47pm UTC](https://www.ruby-forum.com/t/disabel-pluralize-table-names-in-rails-2-3-2/163167 "2009-03-18T21:47:43Z")

</div>

What is it in Rails 2.3.2? ActiveRecord::Base.pluralize\_table\_names = false

---

## [Validates\_presence\_of](https://www.ruby-forum.com/t/validates-presence-of/163165)

<div class="topic-metadata">

**Author:** [@shuaib85](https://www.ruby-forum.com/u/shuaib85)\
**Replies:** 2\
**Last updated:** [March 18, 2009, 9:34pm UTC](https://www.ruby-forum.com/t/validates-presence-of/163165 "2009-03-18T21:34:09Z")

</div>

Hi all I want to check the presence of either one of two fields for instance, phone number or mobile number, if either one presents, allow the submission of the form validates\_presence\_of :phone, OR :mobile any idea…

---

## [I18n error with Rails 2.2.2](https://www.ruby-forum.com/t/i18n-error-with-rails-2-2-2/160237)

<div class="topic-metadata">

**Author:** [@zeba-momin](https://www.ruby-forum.com/u/zeba-momin)\
**Replies:** 1\
**Last updated:** [March 18, 2009, 8:48pm UTC](https://www.ruby-forum.com/t/i18n-error-with-rails-2-2-2/160237 "2009-03-18T20:48:36Z")

</div>

hi, I’m using i18n with Rails 2.2.2 to internationalize my rails application. I’ve followed the steps as specified at: But …I get the following error when I try to run it: You have a nil object when you didn’t expe…

---

## [Changin var from partial](https://www.ruby-forum.com/t/changin-var-from-partial/163258)

<div class="topic-metadata">

**Author:** [@Luciano](https://www.ruby-forum.com/u/Luciano)\
**Replies:** 5\
**Last updated:** [March 18, 2009, 8:13pm UTC](https://www.ruby-forum.com/t/changin-var-from-partial/163258 "2009-03-18T20:13:03Z")

</div>

Hello, I have a simple link\_to\_function to add a group of form fiels, to use observe\_field I must have unique names… I created a var to store the itens count but the partial is not updating it’s value. \_form.html.e…

---

## [Where to put test/mocks/development?](https://www.ruby-forum.com/t/where-to-put-test-mocks-development/163266)

<div class="topic-metadata">

**Author:** [@jeff](https://www.ruby-forum.com/u/jeff)\
**Replies:** 0\
**Last updated:** [March 18, 2009, 8:09pm UTC](https://www.ruby-forum.com/t/where-to-put-test-mocks-development/163266 "2009-03-18T20:09:32Z")

</div>

According to the Rails 2.1 changeset, creating mock objects for use in test and development environments is ‘antiquated’. If that’s so, where should you put them? I’m upgrading an app from 2.0.5 to 2.1.0 and we have m…

---

## [Rails 2.3.2 ActiveResource fieldnames uncamelizing](https://www.ruby-forum.com/t/rails-2-3-2-activeresource-fieldnames-uncamelizing/163169)

<div class="topic-metadata">

**Author:** [@stewbawka](https://www.ruby-forum.com/u/stewbawka)\
**Replies:** 4\
**Last updated:** [March 18, 2009, 8:03pm UTC](https://www.ruby-forum.com/t/rails-2-3-2-activeresource-fieldnames-uncamelizing/163169 "2009-03-18T20:03:41Z")

</div>

I’m having some major issues with the new veresion of rails… I have some activeresource models that connect to tables that don’t follow the rails naming conventions… when i try to access an object or hash via active r…

---

## [Uninitialized constant AuthenticatedSystem](https://www.ruby-forum.com/t/uninitialized-constant-authenticatedsystem/163263)

<div class="topic-metadata">

**Author:** [@sprsquish](https://www.ruby-forum.com/u/sprsquish)\
**Replies:** 0\
**Last updated:** [March 18, 2009, 7:40pm UTC](https://www.ruby-forum.com/t/uninitialized-constant-authenticatedsystem/163263 "2009-03-18T19:40:46Z")

</div>

I’ve just had a little snafu installing restful\_authentication in a new app, and thought I would list it here for archival purposes. Firstly, there are messages about files not existing. My fix was to manually create…

---

## [Issues with database/object caching and testing](https://www.ruby-forum.com/t/issues-with-database-object-caching-and-testing/163188)

<div class="topic-metadata">

**Author:** [@rickybby](https://www.ruby-forum.com/u/rickybby)\
**Replies:** 2\
**Last updated:** [March 18, 2009, 7:40pm UTC](https://www.ruby-forum.com/t/issues-with-database-object-caching-and-testing/163188 "2009-03-18T19:40:08Z")

</div>

Hi all, I just burned two hours of development time trying to debug this issue. Can someone please tell me if there is a way to disable database caching when running unit tests or another way to avoid running into thi…

---

## [ActionMailer works for gmail/yahoo, but not for other email addresses...HELP!](https://www.ruby-forum.com/t/actionmailer-works-for-gmail-yahoo-but-not-for-other-email-addresses-help/163173)

<div class="topic-metadata">

**Author:** [@tony](https://www.ruby-forum.com/u/tony)\
**Replies:** 1\
**Last updated:** [March 18, 2009, 7:36pm UTC](https://www.ruby-forum.com/t/actionmailer-works-for-gmail-yahoo-but-not-for-other-email-addresses-help/163173 "2009-03-18T19:36:02Z")

</div>

I have a rails app that can send emails to gmail, yahoo accounts. But when it comes to more obscure accounts like removed\_email\_address@domain.invalid or removed\_email\_address@domain.invalid, the mail never arrives ev…

---

## [Problem when trying to freeze gem (XP user)](https://www.ruby-forum.com/t/problem-when-trying-to-freeze-gem-xp-user/163132)

<div class="topic-metadata">

**Author:** [@sultan](https://www.ruby-forum.com/u/sultan)\
**Replies:** 6\
**Last updated:** [March 18, 2009, 7:35pm UTC](https://www.ruby-forum.com/t/problem-when-trying-to-freeze-gem-xp-user/163132 "2009-03-18T19:35:26Z")

</div>

I am on XP. This is the first time I am trying to freeze to a gem. This is what I get: rake rails:freeze:gems --trace (in C:/Documents and Settings/Sultan/My Documents/Aptana Studio/ upload) \*\* Invoke rails:freeze:g…

---

## [Web Designer â€” The International](https://www.ruby-forum.com/t/web-designer-a-the-international/163256)

<div class="topic-metadata">

**Author:** [@Alexandre\_RSLabrie](https://www.ruby-forum.com/u/Alexandre_RSLabrie)\
**Replies:** 1\
**Last updated:** [March 18, 2009, 7:08pm UTC](https://www.ruby-forum.com/t/web-designer-a-the-international/163256 "2009-03-18T19:08:59Z")

</div>

The International is a not-for-profit newspaper. Our activities focus on the development and expansion of peace journalism. We are helping our readers to develop a better understanding of cultural differences, of the …

---

## [Has many association problem](https://www.ruby-forum.com/t/has-many-association-problem/163092)

<div class="topic-metadata">

**Author:** [@on9west](https://www.ruby-forum.com/u/on9west)\
**Replies:** 2\
**Last updated:** [March 18, 2009, 7:08pm UTC](https://www.ruby-forum.com/t/has-many-association-problem/163092 "2009-03-18T19:08:24Z")

</div>

Dear all I have the following 2 models, with 2 difference data sources. I would like to create a has\_many relation to SX1::Request pat = SX9::Patient.find(“123456789”) pat.pat\_encounter\_group =\> 99999 By defaul…

---

## [Rails Query within Query](https://www.ruby-forum.com/t/rails-query-within-query/162714)

<div class="topic-metadata">

**Author:** [@aviir](https://www.ruby-forum.com/u/aviir)\
**Replies:** 6\
**Last updated:** [March 18, 2009, 6:59pm UTC](https://www.ruby-forum.com/t/rails-query-within-query/162714 "2009-03-18T18:59:24Z")

</div>

Hello, I am looking for a better way to do the following (my code examples are crappy pseudocode): I have two associated models, Book and Chapter, where book has\_many chapters. I want to first select several books, …

---

## [Upload file without using file\_field](https://www.ruby-forum.com/t/upload-file-without-using-file-field/163218)

<div class="topic-metadata">

**Author:** [@sudhi](https://www.ruby-forum.com/u/sudhi)\
**Replies:** 4\
**Last updated:** [March 18, 2009, 6:48pm UTC](https://www.ruby-forum.com/t/upload-file-without-using-file-field/163218 "2009-03-18T18:48:26Z")

</div>

Hi, I wanted to have a textbox which would have the file name specified and on submit in the controller I wanted to save this file on the server file system. Any pointers would helpful. Please note I do not want to u…

---

## [Is there something like form\_remote\_tag that does an Ajax.Updater vs Ajax.Request](https://www.ruby-forum.com/t/is-there-something-like-form-remote-tag-that-does-an-ajax-updater-vs-ajax-request/163259)

<div class="topic-metadata">

**Author:** [@knox](https://www.ruby-forum.com/u/knox)\
**Replies:** 1\
**Last updated:** [March 18, 2009, 6:39pm UTC](https://www.ruby-forum.com/t/is-there-something-like-form-remote-tag-that-does-an-ajax-updater-vs-ajax-request/163259 "2009-03-18T18:39:02Z")

</div>

I am looking for a form helper tag that will output a form tag that uses Ajax.Updater instead of Ajax.Request. Does one exist? I haven’t seen anything in the API docs. I am relatively new to rails, but I have been …

---

## [Handling database table dependenciese](https://www.ruby-forum.com/t/handling-database-table-dependenciese/163217)

<div class="topic-metadata">

**Author:** [@msmsms](https://www.ruby-forum.com/u/msmsms)\
**Replies:** 1\
**Last updated:** [March 18, 2009, 5:06pm UTC](https://www.ruby-forum.com/t/handling-database-table-dependenciese/163217 "2009-03-18T17:06:21Z")

</div>

Hey, thanks for reading this post. How do you handle dependencies? A really simple example: I’ve got a table called “entity” and another table, let’s say, “entity\_type”. The entity types can be changed, of course, th…

---

## [Recommended webserver for deploying Rails](https://www.ruby-forum.com/t/recommended-webserver-for-deploying-rails/163185)

<div class="topic-metadata">

**Author:** [@builtbysimple](https://www.ruby-forum.com/u/builtbysimple)\
**Replies:** 4\
**Last updated:** [March 18, 2009, 4:55pm UTC](https://www.ruby-forum.com/t/recommended-webserver-for-deploying-rails/163185 "2009-03-18T16:55:22Z")

</div>

Dear all, What is the best architecture in terms of performance for Rails. Is lighttpd + mongrel the most recommended deployment architecture for Rails? Or is there any better architecture that outperform this archit…

---

## [How do I match strings?](https://www.ruby-forum.com/t/how-do-i-match-strings/163177)

<div class="topic-metadata">

**Author:** [@farfignugen](https://www.ruby-forum.com/u/farfignugen)\
**Replies:** 3\
**Last updated:** [March 18, 2009, 4:52pm UTC](https://www.ruby-forum.com/t/how-do-i-match-strings/163177 "2009-03-18T16:52:40Z")

</div>

Ok I know that sounds newbish, but I don’t want to match the entire string. I just want to match the first 25 characters or so. I have a hash that looks like somestuff\[:something\] Now I want somestuff\[:something\] to …

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

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