# Rails

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

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

---

## [Habtm confusion](https://www.ruby-forum.com/t/habtm-confusion/109590)

<div class="topic-metadata">

**Author:** [@frew](https://www.ruby-forum.com/u/frew)\
**Replies:** 5\
**Last updated:** [July 19, 2007, 1:24am UTC](https://www.ruby-forum.com/t/habtm-confusion/109590 "2007-07-19T01:24:55Z")

</div>

Hello friends! I am trying to make a database that will have a group of people set to committees, and a person can be in multiple committees, and a committee obviously has multiple people. The people are senators at …

---

## [Form reset through rjs](https://www.ruby-forum.com/t/form-reset-through-rjs/109673)

<div class="topic-metadata">

**Author:** [@pabloz](https://www.ruby-forum.com/u/pabloz)\
**Replies:** 1\
**Last updated:** [July 19, 2007, 1:15am UTC](https://www.ruby-forum.com/t/form-reset-through-rjs/109673 "2007-07-19T01:15:54Z")

</div>

I have update.rjs if @category.errors.length \> 0 page.replace\_html ‘flash\_box’, error\_messages\_for(:category) page.show ‘flash\_box’ else page.hide ‘flash\_box’ page.replace\_html @category.dom\_id, :partial =\> “catego…

---

## [Remote\_form\_for behavior on javascript submit();](https://www.ruby-forum.com/t/remote-form-for-behavior-on-javascript-submit/109252)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [July 19, 2007, 1:14am UTC](https://www.ruby-forum.com/t/remote-form-for-behavior-on-javascript-submit/109252 "2007-07-19T01:14:54Z")

</div>

Hey all, Tried this on the IRC channel but after an hour i figured nobody that was on knew, so i’ll try it here. I have a rhtml page with: \<% remote\_form\_for(:performance\_goal, :url =\> user\_performance\_goal\_path(@us…

---

## [Application naming convention](https://www.ruby-forum.com/t/application-naming-convention/109761)

<div class="topic-metadata">

**Author:** [@bdmcnitt](https://www.ruby-forum.com/u/bdmcnitt)\
**Replies:** 3\
**Last updated:** [July 19, 2007, 1:00am UTC](https://www.ruby-forum.com/t/application-naming-convention/109761 "2007-07-19T01:00:52Z")

</div>

I’m creating a new rails app. The application is named BigIdea. Should I create this project using: rails bigidea or rails big\_idea I know both will work, but just want to get off to the right start using the p…

---

## [One Session, Many Apps](https://www.ruby-forum.com/t/one-session-many-apps/109739)

<div class="topic-metadata">

**Author:** [@Jarod\_R](https://www.ruby-forum.com/u/Jarod_R)\
**Replies:** 7\
**Last updated:** [July 19, 2007, 12:59am UTC](https://www.ruby-forum.com/t/one-session-many-apps/109739 "2007-07-19T00:59:52Z")

</div>

I’m looking for a way to share one ActiveRecordStore session between multiple apps. I’m sure its possible, but not sure how. Ideas?

---

## [Routing with namespaces using edge rails](https://www.ruby-forum.com/t/routing-with-namespaces-using-edge-rails/109784)

<div class="topic-metadata">

**Author:** [@peter](https://www.ruby-forum.com/u/peter)\
**Replies:** 0\
**Last updated:** [July 19, 2007, 12:47am UTC](https://www.ruby-forum.com/t/routing-with-namespaces-using-edge-rails/109784 "2007-07-19T00:47:51Z")

</div>

Hi, I was wondering if anyone came across a similar scenario when working with namespaced routes with edge rails. Consider an application with controllers customers and products that also have other resources. map.r…

---

## [Static urls for dynamic conent (routing question)](https://www.ruby-forum.com/t/static-urls-for-dynamic-conent-routing-question/109782)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [July 19, 2007, 12:46am UTC](https://www.ruby-forum.com/t/static-urls-for-dynamic-conent-routing-question/109782 "2007-07-19T00:46:51Z")

</div>

Hi, I wanna provide static urls for my users, and I figured out that I can do it with the following: map.user ‘:username’, :controller =\> ‘users’, :action =\> ‘show’ however, I also have the following in my routes.rb,…

---

## [Help with posting XML](https://www.ruby-forum.com/t/help-with-posting-xml/109780)

<div class="topic-metadata">

**Author:** [@jjkiesch](https://www.ruby-forum.com/u/jjkiesch)\
**Replies:** 0\
**Last updated:** [July 19, 2007, 12:41am UTC](https://www.ruby-forum.com/t/help-with-posting-xml/109780 "2007-07-19T00:41:50Z")

</div>

i am trying to use the online tools provided by UPS to calculate shipping information. i’ve read a lot about creating web services on rails using REST but when it comes to web services on the client end, i’m not sure …

---

## [Mailer template names and underscores weirdness](https://www.ruby-forum.com/t/mailer-template-names-and-underscores-weirdness/109777)

<div class="topic-metadata">

**Author:** [@starmaerker](https://www.ruby-forum.com/u/starmaerker)\
**Replies:** 0\
**Last updated:** [July 19, 2007, 12:34am UTC](https://www.ruby-forum.com/t/mailer-template-names-and-underscores-weirdness/109777 "2007-07-19T00:34:50Z")

</div>

Recently, in one of my projects that mailers stopped working. It was complaining that it couldn’t find a rhtml, rjs, etc… file. by looking at the stack trace, it appears to be appending an underscore to the file name …

---

## [Strange error: Could anybody please help?](https://www.ruby-forum.com/t/strange-error-could-anybody-please-help/109774)

<div class="topic-metadata">

**Author:** [@arif](https://www.ruby-forum.com/u/arif)\
**Replies:** 1\
**Last updated:** [July 19, 2007, 12:33am UTC](https://www.ruby-forum.com/t/strange-error-could-anybody-please-help/109774 "2007-07-19T00:33:50Z")

</div>

Hi, I have a RAILS model named ‘sac\_database’ with a column ‘databae\_name’. It works fine when I try to show the records found from my database, for example, this works fine in my view (list.rhtml): \<% @sac\_database…

---

## [Prompt box](https://www.ruby-forum.com/t/prompt-box/109773)

<div class="topic-metadata">

**Author:** [@snantz](https://www.ruby-forum.com/u/snantz)\
**Replies:** 0\
**Last updated:** [July 18, 2007, 11:44pm UTC](https://www.ruby-forum.com/t/prompt-box/109773 "2007-07-18T23:44:43Z")

</div>

I need to add a prompt to a form whenerver someone tries to submit so bad data. Basically what I have is a form that takes credit card info. On submit a method gets called that validates the card number. If that valid…

---

## [SQL Server AR adapter and BULK INSERT](https://www.ruby-forum.com/t/sql-server-ar-adapter-and-bulk-insert/108790)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 1\
**Last updated:** [July 18, 2007, 11:11pm UTC](https://www.ruby-forum.com/t/sql-server-ar-adapter-and-bulk-insert/108790 "2007-07-18T23:11:33Z")

</div>

All, If you don’t know about how to bulk import data into SQL Server with the BULK INSERT statement, you can stop reading. Rails 1.1.6 SQL Server Adapter (ODBC mode) I have a situation where I am performing a BULK I…

---

## [In\_place\_editor\_field problem](https://www.ruby-forum.com/t/in-place-editor-field-problem/109767)

<div class="topic-metadata">

**Author:** [@dnstevenson](https://www.ruby-forum.com/u/dnstevenson)\
**Replies:** 3\
**Last updated:** [July 18, 2007, 10:55pm UTC](https://www.ruby-forum.com/t/in-place-editor-field-problem/109767 "2007-07-18T22:55:09Z")

</div>

I have a bit of a problem… I am rendering a table of objects using a partial with a collection of those objects. Inside of the partial, I’m trying to use an in\_place\_editor\_field tag using the current object form the…

---

## [Strange error: Could anybody please help?](https://www.ruby-forum.com/t/strange-error-could-anybody-please-help/109763)

<div class="topic-metadata">

**Author:** [@arif](https://www.ruby-forum.com/u/arif)\
**Replies:** 0\
**Last updated:** [July 18, 2007, 7:39pm UTC](https://www.ruby-forum.com/t/strange-error-could-anybody-please-help/109763 "2007-07-18T19:39:32Z")

</div>

Hi, I have a RAILS model named ‘sac\_database’ with a column ‘databae\_name’. It works fine when I try to show the records found from my database, for example, this works fine in my view (list.rhtml): \<% @sac\_database.…

---

## [Mysql gem couldn't be installed](https://www.ruby-forum.com/t/mysql-gem-couldnt-be-installed/109762)

<div class="topic-metadata">

**Author:** [@xyzt](https://www.ruby-forum.com/u/xyzt)\
**Replies:** 1\
**Last updated:** [July 18, 2007, 7:28pm UTC](https://www.ruby-forum.com/t/mysql-gem-couldnt-be-installed/109762 "2007-07-18T19:28:38Z")

</div>

Hello I want to install mysql gem but i recive error while installing it. Here’s my error trace: darkstar:/home/haluk/rubyprojects/firstapp# gem install mysql Select which gem to install for your platform (i486-linux…

---

## [Console load failure on windows](https://www.ruby-forum.com/t/console-load-failure-on-windows/54969)

<div class="topic-metadata">

**Author:** [@olbrich](https://www.ruby-forum.com/u/olbrich)\
**Replies:** 1\
**Last updated:** [July 18, 2007, 5:25pm UTC](https://www.ruby-forum.com/t/console-load-failure-on-windows/54969 "2007-07-18T17:25:28Z")

</div>

I had a very odd problem recently that manifested itself like this… C:\\rails\_apps\\cookbook\>ruby script/console Loading development environment. c:/ruby/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:21:in require\_…

---

## [Getting the session variables after a redirect\_to](https://www.ruby-forum.com/t/getting-the-session-variables-after-a-redirect-to/109750)

<div class="topic-metadata">

**Author:** [@mffreire](https://www.ruby-forum.com/u/mffreire)\
**Replies:** 3\
**Last updated:** [July 18, 2007, 5:19pm UTC](https://www.ruby-forum.com/t/getting-the-session-variables-after-a-redirect-to/109750 "2007-07-18T17:19:44Z")

</div>

Hi! I set some session variables on a login\_controller and i want to access them after a redirect\_to (:controller =\> “auditor”, action =\> “check”). The problem is that the session variable are comming empty in the au…

---

## ["Subselect" type functionality in ActiveRecord](https://www.ruby-forum.com/t/subselect-type-functionality-in-activerecord/109178)

<div class="topic-metadata">

**Author:** [@jeannibee](https://www.ruby-forum.com/u/jeannibee)\
**Replies:** 4\
**Last updated:** [July 18, 2007, 4:59pm UTC](https://www.ruby-forum.com/t/subselect-type-functionality-in-activerecord/109178 "2007-07-18T16:59:16Z")

</div>

Hi Is there any way (Using my Model clases) to be able to do a sort of subselect. Ex: select a, b, c from table\_a where a not in (SELECT aa from table\_b ); I really hope I don’t have to select all the models from ea…

---

## [Understanding :through =\> ... :source =\>](https://www.ruby-forum.com/t/understanding-through-source/109703)

<div class="topic-metadata">

**Author:** [@sshefer](https://www.ruby-forum.com/u/sshefer)\
**Replies:** 2\
**Last updated:** [July 18, 2007, 4:45pm UTC](https://www.ruby-forum.com/t/understanding-through-source/109703 "2007-07-18T16:45:15Z")

</div>

I’m trying to understand :through and :source with the following example. I have a User, Job, and Interview models. An interview has an interviewer and interviewee. I would like to use the User model for this and I…

---

## [ActiveRecord load time](https://www.ruby-forum.com/t/activerecord-load-time/109684)

<div class="topic-metadata">

**Author:** [@eclubb](https://www.ruby-forum.com/u/eclubb)\
**Replies:** 2\
**Last updated:** [July 18, 2007, 4:40pm UTC](https://www.ruby-forum.com/t/activerecord-load-time/109684 "2007-07-18T16:40:14Z")

</div>

I’m using ActiveRecord outside of Rails. The time for a script to execute “require ‘active\_record’” is about 2.5 seconds on my 666 MHz machine. Is there any way to speed it up (aside from a faster processor)? Maybe…

---

## [Saving Images to a BLOB database column - and getting them b](https://www.ruby-forum.com/t/saving-images-to-a-blob-database-column-and-getting-them-b/109743)

<div class="topic-metadata">

**Author:** [@magiclava](https://www.ruby-forum.com/u/magiclava)\
**Replies:** 0\
**Last updated:** [July 18, 2007, 3:24pm UTC](https://www.ruby-forum.com/t/saving-images-to-a-blob-database-column-and-getting-them-b/109743 "2007-07-18T15:24:54Z")

</div>

Hi, I’d like to save an image file from a local drive to a blob database column. I can read the file ok, but i’m not sure how to send it to the database. Additionally i would like to read the database and display t…

---

## [Trying to build a nested RESTful route in code?](https://www.ruby-forum.com/t/trying-to-build-a-nested-restful-route-in-code/109737)

<div class="topic-metadata">

**Author:** [@Kathleen\_Kennedy](https://www.ruby-forum.com/u/Kathleen_Kennedy)\
**Replies:** 0\
**Last updated:** [July 18, 2007, 2:32pm UTC](https://www.ruby-forum.com/t/trying-to-build-a-nested-restful-route-in-code/109737 "2007-07-18T14:32:48Z")

</div>

Everyone on this forum seems to be doing well with RESTful routes and I am enjoying them tremendously. I am attempting to use this approach in a very non-standard way. So here goes the foundation of my question. In a…

---

## [Trying to build a nested RESTful route in code?](https://www.ruby-forum.com/t/trying-to-build-a-nested-restful-route-in-code/109736)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [July 18, 2007, 2:30pm UTC](https://www.ruby-forum.com/t/trying-to-build-a-nested-restful-route-in-code/109736 "2007-07-18T14:30:48Z")

</div>

I’ve never received a reply on this forum and don’t know if I’m doing this right, but here goes??? Everyone on this forum seems to be doing well with RESTful routes and I am enjoying them tremendously. I am attempting…

---

## [Displaying form body in email](https://www.ruby-forum.com/t/displaying-form-body-in-email/109729)

<div class="topic-metadata">

**Author:** [@tomzoo](https://www.ruby-forum.com/u/tomzoo)\
**Replies:** 1\
**Last updated:** [July 18, 2007, 2:10pm UTC](https://www.ruby-forum.com/t/displaying-form-body-in-email/109729 "2007-07-18T14:10:24Z")

</div>

Hi, total newb here. I want to send an email via a form. I am at a stage where I can send an email but am not sure how to display the email content that should come from the form body. At the moment I have a subjec…

---

## [How to reliable get the title of a web page?](https://www.ruby-forum.com/t/how-to-reliable-get-the-title-of-a-web-page/109731)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 0\
**Last updated:** [July 18, 2007, 1:13pm UTC](https://www.ruby-forum.com/t/how-to-reliable-get-the-title-of-a-web-page/109731 "2007-07-18T13:13:46Z")

</div>

In one of my forms, i want the user to enter a url and then the title of the associated web page to be automatically filled in, by looking it up from the page. Currently i’m doing that using hpricot, which can pull ou…

---

## [How to pass an array of model objects on a view](https://www.ruby-forum.com/t/how-to-pass-an-array-of-model-objects-on-a-view/109725)

<div class="topic-metadata">

**Author:** [@sven](https://www.ruby-forum.com/u/sven)\
**Replies:** 1\
**Last updated:** [July 18, 2007, 12:36pm UTC](https://www.ruby-forum.com/t/how-to-pass-an-array-of-model-objects-on-a-view/109725 "2007-07-18T12:36:23Z")

</div>

hello, I am just beginning to understand how ruby on rails works. I have the following problem: In the controller I would like to create an array of model objects: @arr\_journeys = Array.new(3, Journey.new) In the vi…

---

## [Rules for passing arrays between requests](https://www.ruby-forum.com/t/rules-for-passing-arrays-between-requests/109696)

<div class="topic-metadata">

**Author:** [@mike](https://www.ruby-forum.com/u/mike)\
**Replies:** 4\
**Last updated:** [July 18, 2007, 12:35pm UTC](https://www.ruby-forum.com/t/rules-for-passing-arrays-between-requests/109696 "2007-07-18T12:35:23Z")

</div>

i currently have a feature on my application that requires an array persist over multiple requests. i originally put it in a session var and deleted it when i was done. this was great but i got to thinking it might be…

---

## [Truncate table to reset id back to 1](https://www.ruby-forum.com/t/truncate-table-to-reset-id-back-to-1/109716)

<div class="topic-metadata">

**Author:** [@nobobyhere](https://www.ruby-forum.com/u/nobobyhere)\
**Replies:** 1\
**Last updated:** [July 18, 2007, 12:33pm UTC](https://www.ruby-forum.com/t/truncate-table-to-reset-id-back-to-1/109716 "2007-07-18T12:33:22Z")

</div>

What im using now is ActiveRecord::Base.connection.execute(‘TRUNCATE table\_products’) to reset the id back to 1. Is there another way without using direct sql command to reset the id back to 1?

---

## [Sporadic clustering + caching problem](https://www.ruby-forum.com/t/sporadic-clustering-caching-problem/109726)

<div class="topic-metadata">

**Author:** [@nsputnik](https://www.ruby-forum.com/u/nsputnik)\
**Replies:** 0\
**Last updated:** [July 18, 2007, 12:12pm UTC](https://www.ruby-forum.com/t/sporadic-clustering-caching-problem/109726 "2007-07-18T12:12:58Z")

</div>

So, I’ve seeing some quirking behavior with my app after launching it into my production environment (railsmachine). The weirdness only (sporadically) occurs when I’m running a mongrel cluster. The app runs fine (loca…

---

## [Very strange date problem for the month may](https://www.ruby-forum.com/t/very-strange-date-problem-for-the-month-may/109724)

<div class="topic-metadata">

**Author:** [@remcoh](https://www.ruby-forum.com/u/remcoh)\
**Replies:** 0\
**Last updated:** [July 18, 2007, 11:41am UTC](https://www.ruby-forum.com/t/very-strange-date-problem-for-the-month-may/109724 "2007-07-18T11:41:10Z")

</div>

Hi, I use the calendar\_date\_select plugin (Google Code Archive - Long-term storage for Google Code Project Hosting.) which is working fine, but the strange thing is: if i debug my application, i can see that the date…

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

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