# Rails

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

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

---

## [Rails & unixODBC](https://www.ruby-forum.com/t/rails-unixodbc/160194)

<div class="topic-metadata">

**Author:** [@andypflueger](https://www.ruby-forum.com/u/andypflueger)\
**Replies:** 5\
**Last updated:** [February 13, 2009, 4:59pm UTC](https://www.ruby-forum.com/t/rails-unixodbc/160194 "2009-02-13T16:59:50Z")

</div>

Hello, I decided to embrace getting a new Rails application to see an existing MSSQL database and trying to get unixODBC, freeTDS, and ActiveRecord able to query my MSSQL database. I’m following the procedure outline…

---

## [2 forms + one to one relationship](https://www.ruby-forum.com/t/2-forms-one-to-one-relationship/160272)

<div class="topic-metadata">

**Author:** [@petan](https://www.ruby-forum.com/u/petan)\
**Replies:** 0\
**Last updated:** [February 13, 2009, 4:11pm UTC](https://www.ruby-forum.com/t/2-forms-one-to-one-relationship/160272 "2009-02-13T16:11:45Z")

</div>

Hi, I have 2 controllers (posts and images) and one to one relationship. In my post/new.rhmtl I have two forms. One is for uploading image, the image form submit button initialize lightbox to crop the image. The sec…

---

## [Get subdomain in localhost](https://www.ruby-forum.com/t/get-subdomain-in-localhost/160253)

<div class="topic-metadata">

**Author:** [@srinathbtech](https://www.ruby-forum.com/u/srinathbtech)\
**Replies:** 1\
**Last updated:** [February 13, 2009, 3:26pm UTC](https://www.ruby-forum.com/t/get-subdomain-in-localhost/160253 "2009-02-13T15:26:18Z")

</div>

Hi, I was wondering how to get subdomain name in my localhost. I’m on ubuntu and set domainnames in /etc/hosts like this 127.0.0.1 : localhost 127.0.0.1 : tokyo 127.0.0.1 : sub.tokyo when i was using puts request.d…

---

## [Another collection\_select, HABTM, :multiple question](https://www.ruby-forum.com/t/another-collection-select-habtm-multiple-question/160225)

<div class="topic-metadata">

**Author:** [@spacechurro](https://www.ruby-forum.com/u/spacechurro)\
**Replies:** 2\
**Last updated:** [February 13, 2009, 2:46pm UTC](https://www.ruby-forum.com/t/another-collection-select-habtm-multiple-question/160225 "2009-02-13T14:46:56Z")

</div>

i am currently working on a project and having a really tough time getting a collection\_select to work properly. this is using a multiple selection. this is part of a HABTM relationship, and it appears that i have ev…

---

## [Possibility to save data with javascript?](https://www.ruby-forum.com/t/possibility-to-save-data-with-javascript/160069)

<div class="topic-metadata">

**Author:** [@andi-hro](https://www.ruby-forum.com/u/andi-hro)\
**Replies:** 3\
**Last updated:** [February 13, 2009, 2:45pm UTC](https://www.ruby-forum.com/t/possibility-to-save-data-with-javascript/160069 "2009-02-13T14:45:43Z")

</div>

hey, is in ruby on rails possibility to save data with javascript? for example to call a controller/action with parameters from a javascript? thank you. andi

---

## [Using the logger from Libs directory](https://www.ruby-forum.com/t/using-the-logger-from-libs-directory/160233)

<div class="topic-metadata">

**Author:** [@sergio.sprite](https://www.ruby-forum.com/u/sergio.sprite)\
**Replies:** 2\
**Last updated:** [February 13, 2009, 2:36pm UTC](https://www.ruby-forum.com/t/using-the-logger-from-libs-directory/160233 "2009-02-13T14:36:19Z")

</div>

Hello everybody, I need to log some messages from some class on Libs directory, do you know how can I access the logger.info from this directory ? is there a way to do this ? I would appreciate your help, thanks in ad…

---

## [Paperclip attachment destroy](https://www.ruby-forum.com/t/paperclip-attachment-destroy/148546)

<div class="topic-metadata">

**Author:** [@sigma](https://www.ruby-forum.com/u/sigma)\
**Replies:** 4\
**Last updated:** [February 13, 2009, 2:04pm UTC](https://www.ruby-forum.com/t/paperclip-attachment-destroy/148546 "2009-02-13T14:04:38Z")

</div>

Hi all I’ve got a problem with the paperclip-plugin. Is it posible that the attachment is not destroy if i call the destroy- method of a model? Thank you for your help! sigma

---

## [How to show error messages in pop up or confirm screen?](https://www.ruby-forum.com/t/how-to-show-error-messages-in-pop-up-or-confirm-screen/160094)

<div class="topic-metadata">

**Author:** [@adrianod](https://www.ruby-forum.com/u/adrianod)\
**Replies:** 2\
**Last updated:** [February 13, 2009, 11:47am UTC](https://www.ruby-forum.com/t/how-to-show-error-messages-in-pop-up-or-confirm-screen/160094 "2009-02-13T11:47:42Z")

</div>

I would like to show messages when the validation fails (must be number, cant be blank, etc) but not in the main page I would like to open a pop up or better yet put it in a confirm screen where user would read and t…

---

## [@open\_transactions initialized with nil](https://www.ruby-forum.com/t/open-transactions-initialized-with-nil/160236)

<div class="topic-metadata">

**Author:** [@samwise23](https://www.ruby-forum.com/u/samwise23)\
**Replies:** 1\
**Last updated:** [February 13, 2009, 11:35am UTC](https://www.ruby-forum.com/t/open-transactions-initialized-with-nil/160236 "2009-02-13T11:35:15Z")

</div>

Hi Folks, while using the Masochism plugin for Master-Slave database setup (GitHub - technoweenie/masochism: ActiveRecord connection proxy for master/slave connections) I discovered a problem with starting transactio…

---

## [Building a directory tree into the database](https://www.ruby-forum.com/t/building-a-directory-tree-into-the-database/160209)

<div class="topic-metadata">

**Author:** [@elioncho](https://www.ruby-forum.com/u/elioncho)\
**Replies:** 1\
**Last updated:** [February 13, 2009, 11:29am UTC](https://www.ruby-forum.com/t/building-a-directory-tree-into-the-database/160209 "2009-02-13T11:29:20Z")

</div>

Hello, Does anyone can give me some pointers on building a directory tree. I want to map a directory of folders and files into a database. I am not sure how to do this dynamically. I think acts\_as\_tree could help me d…

---

## [Problem installing auto\_complete plugin in Rails 2.2.2](https://www.ruby-forum.com/t/problem-installing-auto-complete-plugin-in-rails-2-2-2/160244)

<div class="topic-metadata">

**Author:** [@spiros](https://www.ruby-forum.com/u/spiros)\
**Replies:** 0\
**Last updated:** [February 13, 2009, 11:11am UTC](https://www.ruby-forum.com/t/problem-installing-auto-complete-plugin-in-rails-2-2-2/160244 "2009-02-13T11:11:46Z")

</div>

Hello world, First of all, let me say “i am sorry” to those receiving my post for 2nd time in RubyOnRails-Talk @ Google G., I hope this forum \[ruby-forum.com\] had a switch to turn that “feature” off at will. I am con…

---

## [Problem with routes](https://www.ruby-forum.com/t/problem-with-routes/160242)

<div class="topic-metadata">

**Author:** [@remco\_h](https://www.ruby-forum.com/u/remco_h)\
**Replies:** 0\
**Last updated:** [February 13, 2009, 10:58am UTC](https://www.ruby-forum.com/t/problem-with-routes/160242 "2009-02-13T10:58:59Z")

</div>

Hi, i am lost with routes I have restfull controllers with a few non-crud actions and i did this: ActionController::Routing::Routes.draw do |map| Restful Authentication Rewrites map.resources :patienten map.resources…

---

## [Mimic the Confirmation javascript](https://www.ruby-forum.com/t/mimic-the-confirmation-javascript/160241)

<div class="topic-metadata">

**Author:** [@raimon](https://www.ruby-forum.com/u/raimon)\
**Replies:** 0\
**Last updated:** [February 13, 2009, 10:57am UTC](https://www.ruby-forum.com/t/mimic-the-confirmation-javascript/160241 "2009-02-13T10:57:47Z")

</div>

Hello, I’m using some Redbox modal windows in one application. Som of them are specific and work well, but now I want to implement a general confirmation winodow, to mimic the javascript confirm function. It started …

---

## [Page.replace\_html and \<table\>](https://www.ruby-forum.com/t/page-replace-html-and-table/160053)

<div class="topic-metadata">

**Author:** [@raimon](https://www.ruby-forum.com/u/raimon)\
**Replies:** 3\
**Last updated:** [February 13, 2009, 10:54am UTC](https://www.ruby-forum.com/t/page-replace-html-and-table/160053 "2009-02-13T10:54:17Z")

</div>

Hello, I have a page with a form and a div area that I update after submitting the form. I want to replace the Div area with new information. In the page, inside the div area, I have: \<%= render :partial =\> "list…

---

## [Transaction block still sets id on model/new\_record to false on rollback](https://www.ruby-forum.com/t/transaction-block-still-sets-id-on-model-new-record-to-false-on-rollback/160134)

<div class="topic-metadata">

**Author:** [@Farrel](https://www.ruby-forum.com/u/Farrel)\
**Replies:** 1\
**Last updated:** [February 13, 2009, 10:13am UTC](https://www.ruby-forum.com/t/transaction-block-still-sets-id-on-model-new-record-to-false-on-rollback/160134 "2009-02-13T10:13:21Z")

</div>

I’m on Rails 2.2.2 on MySQL with InnoDB table types. I’m running into a wierd bug where if I have two models in a transaction and the second model raises an exception, the first model still has it’s ID set and it’s ne…

---

## [RAKE TASK using insert or update in different Platform](https://www.ruby-forum.com/t/rake-task-using-insert-or-update-in-different-platform/160234)

<div class="topic-metadata">

**Author:** [@rakenewuser](https://www.ruby-forum.com/u/rakenewuser)\
**Replies:** 0\
**Last updated:** [February 13, 2009, 10:01am UTC](https://www.ruby-forum.com/t/rake-task-using-insert-or-update-in-different-platform/160234 "2009-02-13T10:01:29Z")

</div>

Hi, Anyone know the guideline or sample scripts for insert or update using RAKE TASK? I need to find solutions. For my main production is TABLE\_1 (mysql DB - Linux) anything happens will happens also on development T…

---

## [Multiple sites with customisations on a single app](https://www.ruby-forum.com/t/multiple-sites-with-customisations-on-a-single-app/160232)

<div class="topic-metadata">

**Author:** [@tristan](https://www.ruby-forum.com/u/tristan)\
**Replies:** 0\
**Last updated:** [February 13, 2009, 9:50am UTC](https://www.ruby-forum.com/t/multiple-sites-with-customisations-on-a-single-app/160232 "2009-02-13T09:50:24Z")

</div>

Hi everyone This is my first time on the RoR list so hello all! We are writing a CMS using Rails to host multiple sites. Many of our clients’ sites are simple four- to six-page sites with one or two custom controller…

---

## [Help for ActionMailer!](https://www.ruby-forum.com/t/help-for-actionmailer/160181)

<div class="topic-metadata">

**Author:** [@klaus.kohlbauer](https://www.ruby-forum.com/u/klaus.kohlbauer)\
**Replies:** 2\
**Last updated:** [February 13, 2009, 9:12am UTC](https://www.ruby-forum.com/t/help-for-actionmailer/160181 "2009-02-13T09:12:41Z")

</div>

Hello, I have a big problem und hoping for your help. In my application a user should be able to edit an email template file for himself and send it out e.g. to a customer. (thats the plan). For that I have created s…

---

## [Three models problem in 'new' action](https://www.ruby-forum.com/t/three-models-problem-in-new-action/160231)

<div class="topic-metadata">

**Author:** [@josegalvan](https://www.ruby-forum.com/u/josegalvan)\
**Replies:** 0\
**Last updated:** [February 13, 2009, 8:51am UTC](https://www.ruby-forum.com/t/three-models-problem-in-new-action/160231 "2009-02-13T08:51:34Z")

</div>

Hello, I have this problem : When I use three models, and associate them, then, my ‘new’ action need more data to work, How can I resolv it, or I do it in the right way ? Thanks Jose. \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* my models…

---

## [Error when execute "script/generate rspec"](https://www.ruby-forum.com/t/error-when-execute-script-generate-rspec/160222)

<div class="topic-metadata">

**Author:** [@zerogy](https://www.ruby-forum.com/u/zerogy)\
**Replies:** 2\
**Last updated:** [February 13, 2009, 7:55am UTC](https://www.ruby-forum.com/t/error-when-execute-script-generate-rspec/160222 "2009-02-13T07:55:47Z")

</div>

I want to use rspec in my new project, but when install rspec, error occured. Could anyone help me? Thanks in advance. cd vendor/plugins git clone git://github.com/dchelimsky/rspec.git git clone git://github.com/dchel…

---

## [Manually setting an auto-incremented primary key id](https://www.ruby-forum.com/t/manually-setting-an-auto-incremented-primary-key-id/160199)

<div class="topic-metadata">

**Author:** [@jamie\_f](https://www.ruby-forum.com/u/jamie_f)\
**Replies:** 2\
**Last updated:** [February 13, 2009, 4:08am UTC](https://www.ruby-forum.com/t/manually-setting-an-auto-incremented-primary-key-id/160199 "2009-02-13T04:08:36Z")

</div>

I want to create a record with a manually-set custom ID, for instance: Foo.create(:id =\> 8000, :name =\>“bar”) But when I try to do that, Rails ignores the id I pass and continues to auto-increment the id in the table.…

---

## [Updating sqLite records through migrations](https://www.ruby-forum.com/t/updating-sqlite-records-through-migrations/160215)

<div class="topic-metadata">

**Author:** [@yachtman](https://www.ruby-forum.com/u/yachtman)\
**Replies:** 1\
**Last updated:** [February 13, 2009, 3:32am UTC](https://www.ruby-forum.com/t/updating-sqlite-records-through-migrations/160215 "2009-02-13T03:32:55Z")

</div>

Here is probably a simple question for most of you, where I can’t seem to update records in sqlite3 through a migration. Any suggestions would be most appreciated… With this code, nothing happens: class AlterDataInDes…

---

## [jQuery's fancyZoom and delayedObserver conflict](https://www.ruby-forum.com/t/jquerys-fancyzoom-and-delayedobserver-conflict/159470)

<div class="topic-metadata">

**Author:** [@mhfs](https://www.ruby-forum.com/u/mhfs)\
**Replies:** 1\
**Last updated:** [February 13, 2009, 1:38am UTC](https://www.ruby-forum.com/t/jquerys-fancyzoom-and-delayedobserver-conflict/159470 "2009-02-13T01:38:51Z")

</div>

Hello list, I know this is more client-side stuff since I’m using Rails js helpers, I thought I would be posting here. http://pastie.org/379754 – the delayedObserver simply doesn’t work when fancyZoom is activated (i…

---

## [Polymorphic nested resources](https://www.ruby-forum.com/t/polymorphic-nested-resources/160212)

<div class="topic-metadata">

**Author:** [@mhfs](https://www.ruby-forum.com/u/mhfs)\
**Replies:** 1\
**Last updated:** [February 13, 2009, 1:35am UTC](https://www.ruby-forum.com/t/polymorphic-nested-resources/160212 "2009-02-13T01:35:21Z")

</div>

Hello list, What if I have a model called address that is polymorphic, and I also have an address resource (as I want to try to follow a RESTful design) – how could I make “polymorphic” nested associations between ad…

---

## [Rails Music Composer](https://www.ruby-forum.com/t/rails-music-composer/160140)

<div class="topic-metadata">

**Author:** [@GabrielG1976](https://www.ruby-forum.com/u/GabrielG1976)\
**Replies:** 3\
**Last updated:** [February 12, 2009, 10:33pm UTC](https://www.ruby-forum.com/t/rails-music-composer/160140 "2009-02-12T22:33:03Z")

</div>

I have just Created a Rails online music composing site. That allows users to create new musical compositions based off the Conversion of text into a midi Composition and then can be used with any software sequencer …

---

## [Auto Complete](https://www.ruby-forum.com/t/auto-complete/160174)

<div class="topic-metadata">

**Author:** [@miguelrodriguez](https://www.ruby-forum.com/u/miguelrodriguez)\
**Replies:** 2\
**Last updated:** [February 12, 2009, 10:30pm UTC](https://www.ruby-forum.com/t/auto-complete/160174 "2009-02-12T22:30:06Z")

</div>

What I’m trying to do: I want to create an auto completed field for locations, but didn’t want to have the locations stored in my app. My idea is to somehow use Google to fill that auto complete text field and then re…

---

## [Rails Music Composer](https://www.ruby-forum.com/t/rails-music-composer/160201)

<div class="topic-metadata">

**Author:** [@GabrielG1976](https://www.ruby-forum.com/u/GabrielG1976)\
**Replies:** 0\
**Last updated:** [February 12, 2009, 10:28pm UTC](https://www.ruby-forum.com/t/rails-music-composer/160201 "2009-02-12T22:28:20Z")

</div>

Hello Everyone, I have just Created a Rails online music composing site. That allows users to create new musical compositions based off the Conversion of text into a midi Composition. and then can be used with any s…

---

## [Download Movie through link](https://www.ruby-forum.com/t/download-movie-through-link/160148)

<div class="topic-metadata">

**Author:** [@deepruby](https://www.ruby-forum.com/u/deepruby)\
**Replies:** 6\
**Last updated:** [February 12, 2009, 9:18pm UTC](https://www.ruby-forum.com/t/download-movie-through-link/160148 "2009-02-12T21:18:21Z")

</div>

Hi, I am storing movie data into db. Now I want to access movie from db and create a link to allow download movie. But when I click on the link It simply open the movie player and does not play the movie. player giv…

---

## [Rails 2.2, abstract\_class, and associations](https://www.ruby-forum.com/t/rails-2-2-abstract-class-and-associations/160126)

<div class="topic-metadata">

**Author:** [@jim](https://www.ruby-forum.com/u/jim)\
**Replies:** 5\
**Last updated:** [February 12, 2009, 8:14pm UTC](https://www.ruby-forum.com/t/rails-2-2-abstract-class-and-associations/160126 "2009-02-12T20:14:12Z")

</div>

In my project, I’ve created an abstract model that my real models inherit from. In my abstract model, I’ve overridden method\_missing so that I can use attribute names without the field type prefix from the legacy dat…

---

## [Merging xml docs](https://www.ruby-forum.com/t/merging-xml-docs/156950)

<div class="topic-metadata">

**Author:** [@jamie](https://www.ruby-forum.com/u/jamie)\
**Replies:** 1\
**Last updated:** [February 12, 2009, 7:55pm UTC](https://www.ruby-forum.com/t/merging-xml-docs/156950 "2009-02-12T19:55:19Z")

</div>

I have two xml docs … xml1 and xml2, how do I make xml2 one of the elements in xml1

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

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