# Rails

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

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

---

## [Confuse with AR association](https://www.ruby-forum.com/t/confuse-with-ar-association/160087)

<div class="topic-metadata">

**Author:** [@on9west](https://www.ruby-forum.com/u/on9west)\
**Replies:** 3\
**Last updated:** [February 11, 2009, 7:45pm UTC](https://www.ruby-forum.com/t/confuse-with-ar-association/160087 "2009-02-11T19:45:41Z")

</div>

Dear all Refer to rails.info Why :physician and :patient some with (s), and some not…? It actually refer to the class name or table name? \*\* really confuse \>\_\<. Can someone explain it? Is it a convention of rail? Tha…

---

## [Observe\_form doesn't seem to work from inside of a table](https://www.ruby-forum.com/t/observe-form-doesnt-seem-to-work-from-inside-of-a-table/160093)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [February 11, 2009, 7:34pm UTC](https://www.ruby-forum.com/t/observe-form-doesnt-seem-to-work-from-inside-of-a-table/160093 "2009-02-11T19:34:54Z")

</div>

If I do observe\_form as below, the ajax call never occurs, but If I remove the table it works fine. This is just a test to troubleshoot as I had narrowed down my problem to this, I actually wanted a form per row of th…

---

## [Ruby on Rails: Talk | Google Groups](https://www.ruby-forum.com/t/ruby-on-rails-talk-google-groups/160085)

<div class="topic-metadata">

**Author:** [@Heinrich\_Beck](https://www.ruby-forum.com/u/Heinrich_Beck)\
**Replies:** 1\
**Last updated:** [February 11, 2009, 6:54pm UTC](https://www.ruby-forum.com/t/ruby-on-rails-talk-google-groups/160085 "2009-02-11T18:54:57Z")

</div>

This is more an architectural question… I am looking to create a domain that sells widgets (as an example) widgets.com Now I have three sales reps, that each sell different kinds of widgets, and do not need to know a…

---

## [What does config.threadsafe! actually do?](https://www.ruby-forum.com/t/what-does-config-threadsafe-actually-do/160015)

<div class="topic-metadata">

**Author:** [@jrochkind](https://www.ruby-forum.com/u/jrochkind)\
**Replies:** 2\
**Last updated:** [February 11, 2009, 4:54pm UTC](https://www.ruby-forum.com/t/what-does-config-threadsafe-actually-do/160015 "2009-02-11T16:54:02Z")

</div>

Does anyone know what config.threadsafe! actually does, what effect(s) it has? I’m even sure where to go looking in the source code for effects of a config variable like that, but if someone has source to recommend, …

---

## [Can replace\_html change the value of an input text?](https://www.ruby-forum.com/t/can-replace-html-change-the-value-of-an-input-text/160080)

<div class="topic-metadata">

**Author:** [@raimon](https://www.ruby-forum.com/u/raimon)\
**Replies:** 0\
**Last updated:** [February 11, 2009, 4:46pm UTC](https://www.ruby-forum.com/t/can-replace-html-change-the-value-of-an-input-text/160080 "2009-02-11T16:46:59Z")

</div>

Hello, I’m updating one area with one partial, using a page of .js.rjs, and the code: page.replace\_html(“div\_list”, :partial =\> “list”, :object =\> @expedients) Also, I would like to empty the field value that I use…

---

## [Templating-like system recommendations?](https://www.ruby-forum.com/t/templating-like-system-recommendations/159948)

<div class="topic-metadata">

**Author:** [@philswenson](https://www.ruby-forum.com/u/philswenson)\
**Replies:** 3\
**Last updated:** [February 11, 2009, 3:12pm UTC](https://www.ruby-forum.com/t/templating-like-system-recommendations/159948 "2009-02-11T15:12:58Z")

</div>

Hi, We want to add a significant new feature into our inhouse RoR system - we want to let admins create web pages that display data pulled from our database. We (I think) have figured out how to give them the data, b…

---

## [ActiveRecord ssl Postgres connections](https://www.ruby-forum.com/t/activerecord-ssl-postgres-connections/160076)

<div class="topic-metadata">

**Author:** [@planetmcd](https://www.ruby-forum.com/u/planetmcd)\
**Replies:** 0\
**Last updated:** [February 11, 2009, 3:01pm UTC](https://www.ruby-forum.com/t/activerecord-ssl-postgres-connections/160076 "2009-02-11T15:01:00Z")

</div>

Hello All, I’m looking to see if I can coerce ActiveRecord to connect to a remote Postgres server via ssl. Htere seems to be a way to do it with MySQL, but I don’t see similar capability in the Postgres Adapter. Has …

---

## [Active Record Associations](https://www.ruby-forum.com/t/active-record-associations/159967)

<div class="topic-metadata">

**Author:** [@giga](https://www.ruby-forum.com/u/giga)\
**Replies:** 8\
**Last updated:** [February 11, 2009, 3:00pm UTC](https://www.ruby-forum.com/t/active-record-associations/159967 "2009-02-11T15:00:59Z")

</div>

I have tables: users (id, name) computers (id, name) mobiltelefons (id, name) OwnComputers (id, user\_id, computer\_id) OwnMobiltelefons (id, user\_id, mobiltelefon\_id) So is it has\_many :through or has\_and\_belongs\_t…

---

## [XML::Parser#string is deprecated : Getting too many warnings](https://www.ruby-forum.com/t/xml-parser-string-is-deprecated-getting-too-many-warnings/160071)

<div class="topic-metadata">

**Author:** [@manisha](https://www.ruby-forum.com/u/manisha)\
**Replies:** 0\
**Last updated:** [February 11, 2009, 2:29pm UTC](https://www.ruby-forum.com/t/xml-parser-string-is-deprecated-getting-too-many-warnings/160071 "2009-02-11T14:29:31Z")

</div>

Hi , I am doing XML parsing to get data from xml documents inside a Rails project. I get my job done but there are too many warnings in between.I dont understand how can i avoid this. the error warnings are : warnin…

---

## [How to add Bookmarks in Ruby on Rails](https://www.ruby-forum.com/t/how-to-add-bookmarks-in-ruby-on-rails/160068)

<div class="topic-metadata">

**Author:** [@sim](https://www.ruby-forum.com/u/sim)\
**Replies:** 0\
**Last updated:** [February 11, 2009, 1:44pm UTC](https://www.ruby-forum.com/t/how-to-add-bookmarks-in-ruby-on-rails/160068 "2009-02-11T13:44:32Z")

</div>

I want to add few bookmarks from a page which will link to other titles on a homepage. Thank you in advance for your help.

---

## [General iplementation question Do I need polymorphic here](https://www.ruby-forum.com/t/general-iplementation-question-do-i-need-polymorphic-here/160039)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 1\
**Last updated:** [February 11, 2009, 1:01pm UTC](https://www.ruby-forum.com/t/general-iplementation-question-do-i-need-polymorphic-here/160039 "2009-02-11T13:01:08Z")

</div>

Hi I have to create a request for an organization and also to create a request for many Contacts…Now what I do is treating all these in a single table say request and it has all the fields like organization\_name, con…

---

## [Sessions do not update created\_at column?](https://www.ruby-forum.com/t/sessions-do-not-update-created-at-column/160048)

<div class="topic-metadata">

**Author:** [@artchrst](https://www.ruby-forum.com/u/artchrst)\
**Replies:** 6\
**Last updated:** [February 11, 2009, 12:58pm UTC](https://www.ruby-forum.com/t/sessions-do-not-update-created-at-column/160048 "2009-02-11T12:58:22Z")

</div>

Hi All, I added a column to the sessions table called “created\_at” in order to allow the created time to be recorded. However, different from other Models, the column does not update automatically. Therefore, what c…

---

## [Remote\_form\_for file\_field strangeness](https://www.ruby-forum.com/t/remote-form-for-file-field-strangeness/160061)

<div class="topic-metadata">

**Author:** [@tatyree](https://www.ruby-forum.com/u/tatyree)\
**Replies:** 0\
**Last updated:** [February 11, 2009, 12:36pm UTC](https://www.ruby-forum.com/t/remote-form-for-file-field-strangeness/160061 "2009-02-11T12:36:36Z")

</div>

Does anyone see any problem with this form? form\_remote\_for(Photo.new, :html =\> {:multipart =\> true, :target =\> :uploader}) do |f| .form\_element = f.label :photo = f.file\_field :collateral = hidden\_field\_tag :cont…

---

## [Sending explicit js to browser from RJS](https://www.ruby-forum.com/t/sending-explicit-js-to-browser-from-rjs/160062)

<div class="topic-metadata">

**Author:** [@sa125](https://www.ruby-forum.com/u/sa125)\
**Replies:** 0\
**Last updated:** [February 11, 2009, 12:26pm UTC](https://www.ruby-forum.com/t/sending-explicit-js-to-browser-from-rjs/160062 "2009-02-11T12:26:53Z")

</div>

I am using jQuery with the rails defaults in my app and would like to call jQuery commands from my RJS templates or from respond\_to blocks. I’ve seen this used in a railscast: page \<\< “jQuery(‘some\_id’).css(‘color’,‘r…

---

## [Db:migrate and Mysql error](https://www.ruby-forum.com/t/db-migrate-and-mysql-error/159847)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [February 11, 2009, 12:22pm UTC](https://www.ruby-forum.com/t/db-migrate-and-mysql-error/159847 "2009-02-11T12:22:31Z")

</div>

Hi, Am getting the error “undefined method \`each’ for #Mysql:0x483f2d0” when I try to run a “rake db:migrate” on a very simple example for a Mysql database. This follows a very basic setup procedure that works with s…

---

## [Refactoring RJS](https://www.ruby-forum.com/t/refactoring-rjs/160058)

<div class="topic-metadata">

**Author:** [@david](https://www.ruby-forum.com/u/david)\
**Replies:** 0\
**Last updated:** [February 11, 2009, 11:41am UTC](https://www.ruby-forum.com/t/refactoring-rjs/160058 "2009-02-11T11:41:55Z")

</div>

I have some RJS that could use some refactoring. I use the function called with afterFinish twice and Im wondering what the best way to refactor is. This is all inline rjs in the controller mind you: page.visua…

---

## [NB 6.5, OS/X, Rails Gem Version error](https://www.ruby-forum.com/t/nb-6-5-os-x-rails-gem-version-error/160043)

<div class="topic-metadata">

**Author:** [@elmo](https://www.ruby-forum.com/u/elmo)\
**Replies:** 1\
**Last updated:** [February 11, 2009, 11:30am UTC](https://www.ruby-forum.com/t/nb-6-5-os-x-rails-gem-version-error/160043 "2009-02-11T11:30:07Z")

</div>

I am getting the following error message when I attempt to start WEBRick: Missing the Rails 2.1.1 gem. Please gem install -v=2.1.1 rails, update your RAILS\_GEM\_VERSION setting in config/environment.rb for the Rails v…

---

## [Initialize database connection when my rails project start](https://www.ruby-forum.com/t/initialize-database-connection-when-my-rails-project-start/160046)

<div class="topic-metadata">

**Author:** [@on9west](https://www.ruby-forum.com/u/on9west)\
**Replies:** 2\
**Last updated:** [February 11, 2009, 11:05am UTC](https://www.ruby-forum.com/t/initialize-database-connection-when-my-rails-project-start/160046 "2009-02-11T11:05:06Z")

</div>

Dear all I have the following ruby code that can establish multiple(around 300) database connection and stored them in a hash (conn\_pool). I can use conn\_pool\[“Keys”\].connection.execute(“select \* from table”) to get …

---

## [Write checkbox values in database](https://www.ruby-forum.com/t/write-checkbox-values-in-database/160037)

<div class="topic-metadata">

**Author:** [@rmswarna](https://www.ruby-forum.com/u/rmswarna)\
**Replies:** 2\
**Last updated:** [February 11, 2009, 10:50am UTC](https://www.ruby-forum.com/t/write-checkbox-values-in-database/160037 "2009-02-11T10:50:22Z")

</div>

Hi, I am new to rails. Any support from your side would be very helpful. I have a model called child and another model called childcategory. I have given the code in app/views/children/show.html.erb of child. \<% remo…

---

## [HABTM & pagination confused](https://www.ruby-forum.com/t/habtm-pagination-confused/160036)

<div class="topic-metadata">

**Author:** [@Abhishek\_shukla](https://www.ruby-forum.com/u/Abhishek_shukla)\
**Replies:** 3\
**Last updated:** [February 11, 2009, 10:48am UTC](https://www.ruby-forum.com/t/habtm-pagination-confused/160036 "2009-02-11T10:48:57Z")

</div>

Hello friends, Here is my code though which i am getting value @students = \[\] Seminar.find(params\[:id\]).students.each do |student| @students \<\< student end As now i want to implememt pagination… But no idea how sho…

---

## [Form\_remote\_tag and \<table\> doesn't pass params?](https://www.ruby-forum.com/t/form-remote-tag-and-table-doesnt-pass-params/160050)

<div class="topic-metadata">

**Author:** [@raimon](https://www.ruby-forum.com/u/raimon)\
**Replies:** 0\
**Last updated:** [February 11, 2009, 10:28am UTC](https://www.ruby-forum.com/t/form-remote-tag-and-table-doesnt-pass-params/160050 "2009-02-11T10:28:36Z")

</div>

Hello, This code works as expected: \<% form\_remote\_tag(:url =\> {:action =\> ‘create\_ajax’}) do %\> Referencia \<%= text\_field ‘expedient’, ‘reference’ %\> \<%= submit\_tag ‘Send Email’ %\> \<% end %\> Processing Expedients…

---

## [Vim on Rails](https://www.ruby-forum.com/t/vim-on-rails/160049)

<div class="topic-metadata">

**Author:** [@Hunt\_J](https://www.ruby-forum.com/u/Hunt_J)\
**Replies:** 0\
**Last updated:** [February 11, 2009, 10:28am UTC](https://www.ruby-forum.com/t/vim-on-rails/160049 "2009-02-11T10:28:24Z")

</div>

Is there any group focused on usage of Vim on Ruby on Rails development? Possibly an emailing list (Google Group)?

---

## [DOM Popup kit error](https://www.ruby-forum.com/t/dom-popup-kit-error/160047)

<div class="topic-metadata">

**Author:** [@zeba-momin](https://www.ruby-forum.com/u/zeba-momin)\
**Replies:** 0\
**Last updated:** [February 11, 2009, 10:16am UTC](https://www.ruby-forum.com/t/dom-popup-kit-error/160047 "2009-02-11T10:16:42Z")

</div>

hi, I’m using the DOM Popup kit to display chromeless popup windows in my application. But I’m getting a javascript error as: Object.extend is not a function. at the line: initialize: function(popup, link) { var o…

---

## [ActionMailer getaddrinfo: Name or service not known](https://www.ruby-forum.com/t/actionmailer-getaddrinfo-name-or-service-not-known/160045)

<div class="topic-metadata">

**Author:** [@jtspimp](https://www.ruby-forum.com/u/jtspimp)\
**Replies:** 0\
**Last updated:** [February 11, 2009, 10:00am UTC](https://www.ruby-forum.com/t/actionmailer-getaddrinfo-name-or-service-not-known/160045 "2009-02-11T10:00:10Z")

</div>

When I deploy my rails 2.2.2 app to bluehost, I’m having trouble with the ActionMailer SMTP settings. When I attempt to send emails through Rails/SMTP, I get the following error message: getaddrinfo: Name or service …

---

## [Using same partial with diff ajax requests](https://www.ruby-forum.com/t/using-same-partial-with-diff-ajax-requests/160034)

<div class="topic-metadata">

**Author:** [@david](https://www.ruby-forum.com/u/david)\
**Replies:** 1\
**Last updated:** [February 11, 2009, 9:36am UTC](https://www.ruby-forum.com/t/using-same-partial-with-diff-ajax-requests/160034 "2009-02-11T09:36:38Z")

</div>

Im wondering what the best design implementation with DRY in mind in the following situation. I have a number of situations where I am rendering the same partial with different ajax requests. For example, I have an …

---

## [Spree on Windows](https://www.ruby-forum.com/t/spree-on-windows/160038)

<div class="topic-metadata">

**Author:** [@maged](https://www.ruby-forum.com/u/maged)\
**Replies:** 1\
**Last updated:** [February 11, 2009, 8:59am UTC](https://www.ruby-forum.com/t/spree-on-windows/160038 "2009-02-11T08:59:38Z")

</div>

hi all , when I tried to run rake db:bootstrap for Spree, I got a weird error rake aborted! Mysql::Error: Can’t create/write to file ‘C:\\WINDOWS\\TEMP#sql\_1b0\_0.MYI’ (Errcode: 13): SHOW FIELDS FROM option\_values\_vari…

---

## [GlassFish Portfolio Announcement](https://www.ruby-forum.com/t/glassfish-portfolio-announcement/160028)

<div class="topic-metadata">

**Author:** [@magpie](https://www.ruby-forum.com/u/magpie)\
**Replies:** 0\
**Last updated:** [February 11, 2009, 4:28am UTC](https://www.ruby-forum.com/t/glassfish-portfolio-announcement/160028 "2009-02-11T04:28:47Z")

</div>

What does the new GlassFish Portfolio (Hardware | Oracle), especially the web stack mean for Ruby and Rails ? It would be nice to have a standard up to date stack to deploy on. Also, they mention mod\_ruby - don’t the…

---

## [Update + validation error](https://www.ruby-forum.com/t/update-validation-error/160024)

<div class="topic-metadata">

**Author:** [@mpathare](https://www.ruby-forum.com/u/mpathare)\
**Replies:** 2\
**Last updated:** [February 11, 2009, 4:11am UTC](https://www.ruby-forum.com/t/update-validation-error/160024 "2009-02-11T04:11:42Z")

</div>

I have a Player model with some validations. I am using a partial form to create and update player info. I have the following like in the view \<%= error\_messages\_for ‘player’ %\> On create the validation errors are cor…

---

## [RJS alert with a prototype div](https://www.ruby-forum.com/t/rjs-alert-with-a-prototype-div/160020)

<div class="topic-metadata">

**Author:** [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Replies:** 4\
**Last updated:** [February 11, 2009, 2:39am UTC](https://www.ruby-forum.com/t/rjs-alert-with-a-prototype-div/160020 "2009-02-11T02:39:16Z")

</div>

I am trying to do an alert showing the value of a div in an RJS: page.alert("$(‘slot3’).value") It gives me an alert but just shows me what is inside the brackets. $(‘slot3’).value. Any ideas?

---

## [Scaling Rails Screencasts](https://www.ruby-forum.com/t/scaling-rails-screencasts/159964)

<div class="topic-metadata">

**Author:** [@patched](https://www.ruby-forum.com/u/patched)\
**Replies:** 1\
**Last updated:** [February 11, 2009, 2:02am UTC](https://www.ruby-forum.com/t/scaling-rails-screencasts/159964 "2009-02-11T02:02:37Z")

</div>

Hey guys, If you’re interested in learning more about how to properly Scale a Rails app, I just released 7 free Scaling Rails Screencasts which you can view here: http://railslab.newrelic.com/scaling-rails Yes, it …

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

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