# Rails

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

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

---

## [Error: nested-routes with nested-model having foreign keys](https://www.ruby-forum.com/t/error-nested-routes-with-nested-model-having-foreign-keys/177789)

<div class="topic-metadata">

**Author:** [@nin\_d](https://www.ruby-forum.com/u/nin_d)\
**Replies:** 4\
**Last updated:** [October 24, 2009, 2:37pm UTC](https://www.ruby-forum.com/t/error-nested-routes-with-nested-model-having-foreign-keys/177789 "2009-10-24T14:37:33Z")

</div>

Hi, I have this Test, User and Project models where every test belongs\_to a project and project has\_many tests. Test also belongs\_to User as ‘owner’. Then i followed railcast#139 to create nested route as - map.reso…

---

## [Inheritance Problem](https://www.ruby-forum.com/t/inheritance-problem/177812)

<div class="topic-metadata">

**Author:** [@xinu](https://www.ruby-forum.com/u/xinu)\
**Replies:** 1\
**Last updated:** [October 24, 2009, 12:35pm UTC](https://www.ruby-forum.com/t/inheritance-problem/177812 "2009-10-24T12:35:49Z")

</div>

Hello. I have a question to inheritance in Rails(2.3.4). I have this three models. class Vehicle \< ActiveRecord::Base end class Car \< Vehicle end class RallyCar \< Car end And this Migration: class CreateVehicle…

---

## [Am I reinventing polymorphic associations?](https://www.ruby-forum.com/t/am-i-reinventing-polymorphic-associations/177383)

<div class="topic-metadata">

**Author:** [@scottj97](https://www.ruby-forum.com/u/scottj97)\
**Replies:** 11\
**Last updated:** [October 24, 2009, 12:03pm UTC](https://www.ruby-forum.com/t/am-i-reinventing-polymorphic-associations/177383 "2009-10-24T12:03:37Z")

</div>

Am I reinventing polymorphic associations? I have a fairly standard blog with comments model, with the following additions: (1) Multiple models can accept comments (blog post, bug report, etc). (2) Each group of comm…

---

## [Observe field is not working](https://www.ruby-forum.com/t/observe-field-is-not-working/177772)

<div class="topic-metadata">

**Author:** [@ssbava](https://www.ruby-forum.com/u/ssbava)\
**Replies:** 3\
**Last updated:** [October 24, 2009, 9:44am UTC](https://www.ruby-forum.com/t/observe-field-is-not-working/177772 "2009-10-24T09:44:19Z")

</div>

Hi all, I used observe field in my site as \<%=text\_field :one,:new\_col%\> \<%= observe\_field(: :one\_new\_col, :url =\> { :action =\> :live\_search }), :frequency =\> 0.5, :update =\> :hits, :with =\> ‘query’ %\> And I got…

---

## [Rails 2.3.4 migrations: rename\_column on primary key results in wailing, gnashing of teeth](https://www.ruby-forum.com/t/rails-2-3-4-migrations-rename-column-on-primary-key-results-in-wailing-gnashing-of-teeth/177763)

<div class="topic-metadata">

**Author:** [@ntran](https://www.ruby-forum.com/u/ntran)\
**Replies:** 3\
**Last updated:** [October 24, 2009, 4:36am UTC](https://www.ruby-forum.com/t/rails-2-3-4-migrations-rename-column-on-primary-key-results-in-wailing-gnashing-of-teeth/177763 "2009-10-24T04:36:35Z")

</div>

Howdy folks I recently updated one of our apps to Rails 2.3.4 from 2.1.2. The following migrations, which worked previously, now fail: Migration 1: class CreateInitialSchema \< ActiveRecord::Migration self.up create…

---

## [Need Ruby on rails 2.0 tutorial](https://www.ruby-forum.com/t/need-ruby-on-rails-2-0-tutorial/177629)

<div class="topic-metadata">

**Author:** [@karthik2tvl](https://www.ruby-forum.com/u/karthik2tvl)\
**Replies:** 3\
**Last updated:** [October 24, 2009, 2:41am UTC](https://www.ruby-forum.com/t/need-ruby-on-rails-2-0-tutorial/177629 "2009-10-24T02:41:47Z")

</div>

friends, i need ror 2.0v tutorial… if any one have send me…thanks in adv… regards karthik

---

## [Selecting from a large pool of items](https://www.ruby-forum.com/t/selecting-from-a-large-pool-of-items/177775)

<div class="topic-metadata">

**Author:** [@RVince](https://www.ruby-forum.com/u/RVince)\
**Replies:** 2\
**Last updated:** [October 24, 2009, 1:40am UTC](https://www.ruby-forum.com/t/selecting-from-a-large-pool-of-items/177775 "2009-10-24T01:40:55Z")

</div>

I have a redbox with a form in it and one of the controls in the form would typically be a select box. However, in my select box, I want to include every role in a given table as options, and that could get monstrousl…

---

## [Getting related object from the active record](https://www.ruby-forum.com/t/getting-related-object-from-the-active-record/177779)

<div class="topic-metadata">

**Author:** [@introvert](https://www.ruby-forum.com/u/introvert)\
**Replies:** 2\
**Last updated:** [October 24, 2009, 12:42am UTC](https://www.ruby-forum.com/t/getting-related-object-from-the-active-record/177779 "2009-10-24T00:42:58Z")

</div>

Hello. How do I access blog object/model from the following active record class: class Entry \< ActiveRecord::Base belongs\_to :blog def self.test puts blog.title end end In the example above I want to print the b…

---

## [Verifying Good Setup of RoR + PostgreSQL](https://www.ruby-forum.com/t/verifying-good-setup-of-ror-postgresql/60271)

<div class="topic-metadata">

**Author:** [@c.k.lester](https://www.ruby-forum.com/u/c.k.lester)\
**Replies:** 11\
**Last updated:** [October 23, 2009, 10:52pm UTC](https://www.ruby-forum.com/t/verifying-good-setup-of-ror-postgresql/60271 "2009-10-23T22:52:56Z")

</div>

I’ve been reading the RoR tutorials and wiki help stuff, but I’m stuck. :frowning: I’ve got RoR installed properly and get the “Welcome aboard! You’re riding the rails.” I have an “article” controller, “article” model…

---

## [Unwanted line break](https://www.ruby-forum.com/t/unwanted-line-break/177783)

<div class="topic-metadata">

**Author:** [@RVince](https://www.ruby-forum.com/u/RVince)\
**Replies:** 4\
**Last updated:** [October 23, 2009, 10:50pm UTC](https://www.ruby-forum.com/t/unwanted-line-break/177783 "2009-10-23T22:50:12Z")

</div>

In using form helpers, where I specify: \<%= f.label “Amount $” %\> \<%= f.text\_field :amount %\> I get a line break between the label and the text field. How do I precent that? Thanks, Rvince

---

## [Active Merchant: processor\_id option for Braintree](https://www.ruby-forum.com/t/active-merchant-processor-id-option-for-braintree/177801)

<div class="topic-metadata">

**Author:** [@dustin](https://www.ruby-forum.com/u/dustin)\
**Replies:** 0\
**Last updated:** [October 23, 2009, 10:25pm UTC](https://www.ruby-forum.com/t/active-merchant-processor-id-option-for-braintree/177801 "2009-10-23T22:25:59Z")

</div>

How could I expand upon AM to support the processor\_id option for the Braintree gateway? I am working on an app that will support multiple merchant accounts. Thanks! Dustin

---

## [Friendly\_id questions](https://www.ruby-forum.com/t/friendly-id-questions/177798)

<div class="topic-metadata">

**Author:** [@TuteC](https://www.ruby-forum.com/u/TuteC)\
**Replies:** 0\
**Last updated:** [October 23, 2009, 9:40pm UTC](https://www.ruby-forum.com/t/friendly-id-questions/177798 "2009-10-23T21:40:54Z")

</div>

Hi everyone. I’m starting a project, and I’m now using friendly\_id plugin to fetch “estudios”. I’ve got two questions: It acts weird with accented i. If I have an estudio “ÁÉÍÓÚ”, it shows: http://localhost:3000/es…

---

## [Gem for User to User inter-site messages](https://www.ruby-forum.com/t/gem-for-user-to-user-inter-site-messages/177781)

<div class="topic-metadata">

**Author:** [@imnotquitejack](https://www.ruby-forum.com/u/imnotquitejack)\
**Replies:** 1\
**Last updated:** [October 23, 2009, 9:25pm UTC](https://www.ruby-forum.com/t/gem-for-user-to-user-inter-site-messages/177781 "2009-10-23T21:25:05Z")

</div>

Does anyone know of a good basic ruby gem for allows users to send (inter-site) messages to other users within a web site? Thanks!

---

## [Plugin dependencies](https://www.ruby-forum.com/t/plugin-dependencies/177790)

<div class="topic-metadata">

**Author:** [@marnen](https://www.ruby-forum.com/u/marnen)\
**Replies:** 2\
**Last updated:** [October 23, 2009, 9:15pm UTC](https://www.ruby-forum.com/t/plugin-dependencies/177790 "2009-10-23T21:15:59Z")

</div>

Hi everyone! I’m writing my first ever Rails plugin, and I’m trying to figure out what the best way (in 2.3) to manage plugin dependencies is. Google doesn’t seem to yield much that is applicable to my current situat…

---

## [ArgumentError with Remarkable](https://www.ruby-forum.com/t/argumenterror-with-remarkable/177058)

<div class="topic-metadata">

**Author:** [@marnen](https://www.ruby-forum.com/u/marnen)\
**Replies:** 1\
**Last updated:** [October 23, 2009, 8:19pm UTC](https://www.ruby-forum.com/t/argumenterror-with-remarkable/177058 "2009-10-23T20:19:35Z")

</div>

Hi everyone. The Remarkable Google group appears to be kind of quiet, so I thought I’d ask this here. I have an application using Rails 2.3.4, RSpec 1.2.9, and Ruby 1.8.7 (on Snow Leopard, in case that’s significant)…

---

## [Stream content to template/layout](https://www.ruby-forum.com/t/stream-content-to-template-layout/177788)

<div class="topic-metadata">

**Author:** [@pjpatten](https://www.ruby-forum.com/u/pjpatten)\
**Replies:** 2\
**Last updated:** [October 23, 2009, 7:58pm UTC](https://www.ruby-forum.com/t/stream-content-to-template-layout/177788 "2009-10-23T19:58:45Z")

</div>

Hi there, I would like to integrate contents from a 3rd party content mangement system into my rails app. The CMS has some web services which deliver HTML that is ready to be displayed on the site, so no parsing or p…

---

## [Wrong value for belongs\_to?](https://www.ruby-forum.com/t/wrong-value-for-belongs-to/177375)

<div class="topic-metadata">

**Author:** [@RussK](https://www.ruby-forum.com/u/RussK)\
**Replies:** 8\
**Last updated:** [October 23, 2009, 7:05pm UTC](https://www.ruby-forum.com/t/wrong-value-for-belongs-to/177375 "2009-10-23T19:05:09Z")

</div>

I have a class that represents a simple tree (but usually it’s flat). It appears that the belongs\_to relationship is returning the wrong ID. The class looks like: class AssetNode \< ActiveRecord::Base belongs\_to :ass…

---

## [Deployment syntax error: fine in dev - what's happening?](https://www.ruby-forum.com/t/deployment-syntax-error-fine-in-dev-whats-happening/177778)

<div class="topic-metadata">

**Author:** [@snowbug](https://www.ruby-forum.com/u/snowbug)\
**Replies:** 2\
**Last updated:** [October 23, 2009, 4:41pm UTC](https://www.ruby-forum.com/t/deployment-syntax-error-fine-in-dev-whats-happening/177778 "2009-10-23T16:41:42Z")

</div>

I’m deploying an app (using Capistrano) to a staging server prior to final deployment. The app runs fine in dev, but in staging it throws a syntax error. How can that be? The error is: /Library/Ruby/Site/1.8/rubygem…

---

## [Ruby-debug and Ruby 1.9.1](https://www.ruby-forum.com/t/ruby-debug-and-ruby-1-9-1/177711)

<div class="topic-metadata">

**Author:** [@msojka](https://www.ruby-forum.com/u/msojka)\
**Replies:** 2\
**Last updated:** [October 23, 2009, 4:03pm UTC](https://www.ruby-forum.com/t/ruby-debug-and-ruby-1-9-1/177711 "2009-10-23T16:03:39Z")

</div>

Has anyone built ruby-debug for Ruby 1.9.1? I am on Leopard. A check around the Web yielded issues with the pair, but no solution (I’ll keep looking), hence my question. Martin

---

## [Sanitize html with :before\_save depending on logged in user](https://www.ruby-forum.com/t/sanitize-html-with-before-save-depending-on-logged-in-user/177774)

<div class="topic-metadata">

**Author:** [@emmek](https://www.ruby-forum.com/u/emmek)\
**Replies:** 0\
**Last updated:** [October 23, 2009, 3:24pm UTC](https://www.ruby-forum.com/t/sanitize-html-with-before-save-depending-on-logged-in-user/177774 "2009-10-23T15:24:09Z")

</div>

I woud like to sanitize attributes (with 'sanitize" gem) but unless the model is being saved by admin. (Suppose this model doesn’t have any relationship with user model) In model.rb: :before\_save set\_html\_plain def s…

---

## [The specified procedure could not be found - Init\_win32api (LoadError)](https://www.ruby-forum.com/t/the-specified-procedure-could-not-be-found-init-win32api-loaderror/177771)

<div class="topic-metadata">

**Author:** [@SushilKarwa](https://www.ruby-forum.com/u/SushilKarwa)\
**Replies:** 0\
**Last updated:** [October 23, 2009, 2:53pm UTC](https://www.ruby-forum.com/t/the-specified-procedure-could-not-be-found-init-win32api-loaderror/177771 "2009-10-23T14:53:59Z")

</div>

Hi All, I just installed Ruby1.8.6 using One step installer and installed following gems in order rspec watir dbi In one my script i use - require ‘win32api’ When I run this script I get the following error. C:/r…

---

## [UFT8 String looks great in MySql, garbage in browser](https://www.ruby-forum.com/t/uft8-string-looks-great-in-mysql-garbage-in-browser/177735)

<div class="topic-metadata">

**Author:** [@jazcyk](https://www.ruby-forum.com/u/jazcyk)\
**Replies:** 11\
**Last updated:** [October 23, 2009, 2:23pm UTC](https://www.ruby-forum.com/t/uft8-string-looks-great-in-mysql-garbage-in-browser/177735 "2009-10-23T14:23:00Z")

</div>

Hi, I have some seed data in MySql which contains non-ASCII characters (as you’d imagine as these are worldwide placenames that I’m storing). In MySql on the command line they look great, they’re all formatted perfec…

---

## [Activemerchant](https://www.ruby-forum.com/t/activemerchant/177767)

<div class="topic-metadata">

**Author:** [@smit\_shah](https://www.ruby-forum.com/u/smit_shah)\
**Replies:** 1\
**Last updated:** [October 23, 2009, 1:50pm UTC](https://www.ruby-forum.com/t/activemerchant/177767 "2009-10-23T13:50:46Z")

</div>

Hi All… I have implemented activemerchant using gem. I am using both STANDERD & EXPRESS checkout. My EXPRESS works very well but when I use STANDERD one, paypal gives me error like “This transaction cannot be proces…

---

## [Two Ruby Developers needed in Delaware](https://www.ruby-forum.com/t/two-ruby-developers-needed-in-delaware/177766)

<div class="topic-metadata">

**Author:** [@Radke](https://www.ruby-forum.com/u/Radke)\
**Replies:** 0\
**Last updated:** [October 23, 2009, 11:01am UTC](https://www.ruby-forum.com/t/two-ruby-developers-needed-in-delaware/177766 "2009-10-23T11:01:01Z")

</div>

We are currently looking to fill at least 2 developer positions on a multi-project, multi-person team. We are hiring full time, long-term, but are open to shorter-term project work that can be renewed if necessary. Ou…

---

## [Wierd HTML rendering problem](https://www.ruby-forum.com/t/wierd-html-rendering-problem/177584)

<div class="topic-metadata">

**Author:** [@theambler](https://www.ruby-forum.com/u/theambler)\
**Replies:** 6\
**Last updated:** [October 23, 2009, 11:00am UTC](https://www.ruby-forum.com/t/wierd-html-rendering-problem/177584 "2009-10-23T11:00:26Z")

</div>

This I can’t fathom: I have a Rails application which renders the following two links ro create new objects as part of a taskbar date | file | But when the page renders, the first link is clickable, while the sec…

---

## [ActiveRecord tests under Ruby 1.9](https://www.ruby-forum.com/t/activerecord-tests-under-ruby-1-9/176678)

<div class="topic-metadata">

**Author:** [@ricklach](https://www.ruby-forum.com/u/ricklach)\
**Replies:** 1\
**Last updated:** [October 23, 2009, 9:46am UTC](https://www.ruby-forum.com/t/activerecord-tests-under-ruby-1-9/176678 "2009-10-23T09:46:41Z")

</div>

I’ve recently updated to Rails 2.3.4 which I run under both Ruby 1.8.7p173 and 1.9.1p243. I also built both postgresql and mysql from source and installed these with a current sqlite3. The relevant adapter gems are …

---

## [Can not save a json string](https://www.ruby-forum.com/t/can-not-save-a-json-string/177764)

<div class="topic-metadata">

**Author:** [@mgreenly](https://www.ruby-forum.com/u/mgreenly)\
**Replies:** 1\
**Last updated:** [October 23, 2009, 9:19am UTC](https://www.ruby-forum.com/t/can-not-save-a-json-string/177764 "2009-10-23T09:19:29Z")

</div>

I have a json string like below ‘{“id”:null,“name”:null,“count”:26,“nodes”:\[{“id”:“node\_1”,“name”:“node\_1”,“type”:“start”,“shape”:“oval”,“number”:1,“left”:100,“top”:80,“width”:20,“height”:20,“property”:null},{“id”:“node…

---

## [Undefined method \`has\_key?'](https://www.ruby-forum.com/t/undefined-method-has-key/177759)

<div class="topic-metadata">

**Author:** [@mgreenly](https://www.ruby-forum.com/u/mgreenly)\
**Replies:** 2\
**Last updated:** [October 23, 2009, 8:50am UTC](https://www.ruby-forum.com/t/undefined-method-has-key/177759 "2009-10-23T08:50:41Z")

</div>

I update rails from 2.0.2 to 2.2.3, the line below can work at old version but report error at new version \<%= render\_partial “\_jsdatacombo” %\> the error is: undefined method \`has\_key?’ for “\_jsdatacombo”:String It …

---

## [JQuery Multi drag/sort](https://www.ruby-forum.com/t/jquery-multi-drag-sort/177761)

<div class="topic-metadata">

**Author:** [@srinathbtech](https://www.ruby-forum.com/u/srinathbtech)\
**Replies:** 0\
**Last updated:** [October 23, 2009, 8:11am UTC](https://www.ruby-forum.com/t/jquery-multi-drag-sort/177761 "2009-10-23T08:11:50Z")

</div>

I am looking for a multi drag and drop and multi sortable feature . There will be two divs ListA and ListB where elements in ListA should be able to drag and drop on target ie ListB. I should be able to sort elements …

---

## [Net::SSH AuthenticationFailed on some hosts but 'ssh' works](https://www.ruby-forum.com/t/net-ssh-authenticationfailed-on-some-hosts-but-ssh-works/157223)

<div class="topic-metadata">

**Author:** [@badger](https://www.ruby-forum.com/u/badger)\
**Replies:** 2\
**Last updated:** [October 23, 2009, 7:27am UTC](https://www.ruby-forum.com/t/net-ssh-authenticationfailed-on-some-hosts-but-ssh-works/157223 "2009-10-23T07:27:32Z")

</div>

I have a custom capistrano recipe that runs commands on a couple of remote hosts, using publickey ssh, and has been working for several months. Recently (in the last week or so), something changed I have not been able…

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

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