# Rails

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

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

---

## [Polymorphic :through associations](https://www.ruby-forum.com/t/polymorphic-through-associations/140433)

<div class="topic-metadata">

**Author:** [@twoism](https://www.ruby-forum.com/u/twoism)\
**Replies:** 1\
**Last updated:** [June 21, 2008, 11:03pm UTC](https://www.ruby-forum.com/t/polymorphic-through-associations/140433 "2008-06-21T23:03:22Z")

</div>

Could someone please help me with this association scheme? I am familiar with habtm as well as the :through association but this one has me stumped. Here is an example DB. Tags Table: id name Taggables Table: id t…

---

## [Routing problem following tutorial rails-20-and-scaffolding-step-by-step.html](https://www.ruby-forum.com/t/routing-problem-following-tutorial-rails-20-and-scaffolding-step-by-step-html/141066)

<div class="topic-metadata">

**Author:** [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Replies:** 9\
**Last updated:** [June 21, 2008, 10:08pm UTC](https://www.ruby-forum.com/t/routing-problem-following-tutorial-rails-20-and-scaffolding-step-by-step-html/141066 "2008-06-21T22:08:56Z")

</div>

Hi, I’m following the excellent tutorial fairleads: Rails 2.0 and Scaffolding Step by Step. I apparently have a routing problem. I followed every step precisely until: ruby script/generate scaffold Movie title:strin…

---

## [Error trying out simple example on ubuntu](https://www.ruby-forum.com/t/error-trying-out-simple-example-on-ubuntu/141077)

<div class="topic-metadata">

**Author:** [@princenamor](https://www.ruby-forum.com/u/princenamor)\
**Replies:** 1\
**Last updated:** [June 21, 2008, 9:05pm UTC](https://www.ruby-forum.com/t/error-trying-out-simple-example-on-ubuntu/141077 "2008-06-21T21:05:44Z")

</div>

I’m trying to follow a simple tutorial at http://wiki.rubyonrails.org/rails/pages/Tutorial, I run ./script/generate controller hello index but it pulls up a 500 error when I access the page. The error logs say: /!\\…

---

## [How I git clone rails 1-2-stable?](https://www.ruby-forum.com/t/how-i-git-clone-rails-1-2-stable/141084)

<div class="topic-metadata">

**Author:** [@phor\_gruber](https://www.ruby-forum.com/u/phor_gruber)\
**Replies:** 2\
**Last updated:** [June 21, 2008, 8:56pm UTC](https://www.ruby-forum.com/t/how-i-git-clone-rails-1-2-stable/141084 "2008-06-21T20:56:47Z")

</div>

RoR People, I looked at this URL: http://dev.rubyonrails.org/ I see that I can do this: git clone git://github.com/rails/rails.git I tried it and it gave me RoR 2.1. How do I git clone rails 1-2-stable ? What is …

---

## [Rails alternative to Flash slideshows?](https://www.ruby-forum.com/t/rails-alternative-to-flash-slideshows/140917)

<div class="topic-metadata">

**Author:** [@S-gw](https://www.ruby-forum.com/u/S-gw)\
**Replies:** 3\
**Last updated:** [June 21, 2008, 8:24pm UTC](https://www.ruby-forum.com/t/rails-alternative-to-flash-slideshows/140917 "2008-06-21T20:24:49Z")

</div>

Does Rails (I guess prototype) have some tools to create “slideshows” as an alternative to Flash? I just want a series of images (as a sub-part of a web page, not be the whole page) to fade into each other, and to adv…

---

## [Load plugins from an external folder](https://www.ruby-forum.com/t/load-plugins-from-an-external-folder/140991)

<div class="topic-metadata">

**Author:** [@jney](https://www.ruby-forum.com/u/jney)\
**Replies:** 4\
**Last updated:** [June 21, 2008, 7:18pm UTC](https://www.ruby-forum.com/t/load-plugins-from-an-external-folder/140991 "2008-06-21T19:18:22Z")

</div>

How to load plugins which aren’t in the folder vendor/plugins (in my case in another rails project) regards

---

## [Rendering a partial as part of JSON object](https://www.ruby-forum.com/t/rendering-a-partial-as-part-of-json-object/141071)

<div class="topic-metadata">

**Author:** [@zencocoon](https://www.ruby-forum.com/u/zencocoon)\
**Replies:** 2\
**Last updated:** [June 21, 2008, 7:17pm UTC](https://www.ruby-forum.com/t/rendering-a-partial-as-part-of-json-object/141071 "2008-06-21T19:17:47Z")

</div>

Hi, I would like a controller to return a JSON object to my request but would need to render a partial as string, contained in this JSON object. Something like : This doesn’t work as it makes more than one call to r…

---

## [Rails 2.1 Generating a RESTful controller?](https://www.ruby-forum.com/t/rails-2-1-generating-a-restful-controller/141081)

<div class="topic-metadata">

**Author:** [@farfignugen](https://www.ruby-forum.com/u/farfignugen)\
**Replies:** 2\
**Last updated:** [June 21, 2008, 6:58pm UTC](https://www.ruby-forum.com/t/rails-2-1-generating-a-restful-controller/141081 "2008-06-21T18:58:34Z")

</div>

I’ve recently made the upgrade to rails 2 and it seems to really encourage restful design now. So I’ve been looking into that and I am getting the hang of it, but it really bothers me to have to manually setup the RES…

---

## [Taking Rails offline in Leopard](https://www.ruby-forum.com/t/taking-rails-offline-in-leopard/141078)

<div class="topic-metadata">

**Author:** [@inari](https://www.ruby-forum.com/u/inari)\
**Replies:** 0\
**Last updated:** [June 21, 2008, 6:37pm UTC](https://www.ruby-forum.com/t/taking-rails-offline-in-leopard/141078 "2008-06-21T18:37:47Z")

</div>

Hey all, I wrote up this tutorial about taking Rails apps offline in Leopard and would love any thoughts, feedback, or corrections you have for it. Thanks! http://blog.jasoncrystal.com/?p=7 -Jason

---

## [Rails 2.1 console prints ActiveRecord object in different format with rails 1.2.3](https://www.ruby-forum.com/t/rails-2-1-console-prints-activerecord-object-in-different-format-with-rails-1-2-3/141075)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [June 21, 2008, 6:31pm UTC](https://www.ruby-forum.com/t/rails-2-1-console-prints-activerecord-object-in-different-format-with-rails-1-2-3/141075 "2008-06-21T18:31:19Z")

</div>

Ok, I have a project that using rails 2.1. I run ruby script/console and here is what I see: BannerFile.find :last =\> #\<BannerFile id: 29, banner\_position\_id: 8, client: “E2Ma Consumer Profiling”, name: “H&M kledin…

---

## [Using loop to add items to array](https://www.ruby-forum.com/t/using-loop-to-add-items-to-array/141052)

<div class="topic-metadata">

**Author:** [@pepa007](https://www.ruby-forum.com/u/pepa007)\
**Replies:** 6\
**Last updated:** [June 21, 2008, 6:26pm UTC](https://www.ruby-forum.com/t/using-loop-to-add-items-to-array/141052 "2008-06-21T18:26:36Z")

</div>

Hi, I’m trying to find all rows in database where ‘title’ is a substring of my specified string. That means if my string is “whatever”, then I want all rows with title being “whateve”, “whatev”, “whate”, “what”. etc. …

---

## [Re: Anyone integrated with Avalara?](https://www.ruby-forum.com/t/re-anyone-integrated-with-avalara/141072)

<div class="topic-metadata">

**Author:** [@Rick\_AvalaraSDKSupp](https://www.ruby-forum.com/u/Rick_AvalaraSDKSupp)\
**Replies:** 0\
**Last updated:** [June 21, 2008, 6:26pm UTC](https://www.ruby-forum.com/t/re-anyone-integrated-with-avalara/141072 "2008-06-21T18:26:35Z")

</div>

Hi Nik: Rick Troemel here, Avalara Tech Support. Avalara is a WSDL web service, used to calculate sales tax for intra and inter-state transacitons. Many of our clients are ecommerce applications like yourself. Pro…

---

## [Git and Rails; How do I pass the PATH environment variable to script/plugin?](https://www.ruby-forum.com/t/git-and-rails-how-do-i-pass-the-path-environment-variable-to-script-plugin/141074)

<div class="topic-metadata">

**Author:** [@phor\_gruber](https://www.ruby-forum.com/u/phor_gruber)\
**Replies:** 0\
**Last updated:** [June 21, 2008, 6:26pm UTC](https://www.ruby-forum.com/t/git-and-rails-how-do-i-pass-the-path-environment-variable-to-script-plugin/141074 "2008-06-21T18:26:35Z")

</div>

RoR People, I’m trying to use script/plugin and git. I see this error: mac2:/pt/webprops/mmhq/mm12/mymoney maco$ ruby script/plugin install git://github.com/activescaffold/active\_scaffold.git removing: /pt/webprops/…

---

## [NICEUSD --- This will help you in scaffolding](https://www.ruby-forum.com/t/niceusd-this-will-help-you-in-scaffolding/141062)

<div class="topic-metadata">

**Author:** [@rahil](https://www.ruby-forum.com/u/rahil)\
**Replies:** 2\
**Last updated:** [June 21, 2008, 5:25pm UTC](https://www.ruby-forum.com/t/niceusd-this-will-help-you-in-scaffolding/141062 "2008-06-21T17:25:26Z")

</div>

Hi, Who does not like $USD, and everyone thinks they are nice to have it. Yes… Its the same way, it would be nice to remember all those 7 assets in your scaffolding. I created a ShortName called " NICEUSD " that help…

---

## [Communication between browser and BackgrounDRb](https://www.ruby-forum.com/t/communication-between-browser-and-backgroundrb/141057)

<div class="topic-metadata">

**Author:** [@milo](https://www.ruby-forum.com/u/milo)\
**Replies:** 1\
**Last updated:** [June 21, 2008, 4:18pm UTC](https://www.ruby-forum.com/t/communication-between-browser-and-backgroundrb/141057 "2008-06-21T16:18:54Z")

</div>

I’m already using BackgrounDRb to execute a long-running job on an application, which is ideal because all it needs to do at the end of the job is to e-mail the user telling them the URL to download the results of the…

---

## [Form validation](https://www.ruby-forum.com/t/form-validation/140996)

<div class="topic-metadata">

**Author:** [@ajitonrails](https://www.ruby-forum.com/u/ajitonrails)\
**Replies:** 1\
**Last updated:** [June 21, 2008, 3:16pm UTC](https://www.ruby-forum.com/t/form-validation/140996 "2008-06-21T15:16:04Z")

</div>

Hello all i have a registration form. i am validating say, password field using validates\_presence\_of :password, :if =\> :password\_required? validates\_presence\_of :password\_confirmation, :if =\> :password\_required? va…

---

## [Javascript help](https://www.ruby-forum.com/t/javascript-help/141009)

<div class="topic-metadata">

**Author:** [@vshyam121](https://www.ruby-forum.com/u/vshyam121)\
**Replies:** 1\
**Last updated:** [June 21, 2008, 3:04pm UTC](https://www.ruby-forum.com/t/javascript-help/141009 "2008-06-21T15:04:26Z")

</div>

Hi, Right now I have a bunch of rhtml files with links in them that you can navigate through. For example, one file has these category links under the finance category: Tax Bills Banks etc… The user can click on …

---

## [Logical Conditional Model Level Validation](https://www.ruby-forum.com/t/logical-conditional-model-level-validation/141055)

<div class="topic-metadata">

**Author:** [@mrbless](https://www.ruby-forum.com/u/mrbless)\
**Replies:** 1\
**Last updated:** [June 21, 2008, 2:10pm UTC](https://www.ruby-forum.com/t/logical-conditional-model-level-validation/141055 "2008-06-21T14:10:35Z")

</div>

Guys I have a model say Contacts and it has following attributes id,email and address Now I want to store only those tuple whose email as well as address attributes are unique. I have tried this one validates\_unique…

---

## [Bug with datetime\_select option :order](https://www.ruby-forum.com/t/bug-with-datetime-select-option-order/140999)

<div class="topic-metadata">

**Author:** [@Bensoussan\_M](https://www.ruby-forum.com/u/Bensoussan_M)\
**Replies:** 4\
**Last updated:** [June 21, 2008, 11:42am UTC](https://www.ruby-forum.com/t/bug-with-datetime-select-option-order/140999 "2008-06-21T11:42:51Z")

</div>

I tried to do a time\_select like that : \<%= time\_select “drive” “departure” %\> but it raises : can’t convert nil to string so, i tried : \<%= datetime\_select "drive, “departure”, :order =\> \[:hour, :minute\] %\> and as…

---

## [Error in View](https://www.ruby-forum.com/t/error-in-view/141049)

<div class="topic-metadata">

**Author:** [@Ashit\_V](https://www.ruby-forum.com/u/Ashit_V)\
**Replies:** 7\
**Last updated:** [June 21, 2008, 9:46am UTC](https://www.ruby-forum.com/t/error-in-view/141049 "2008-06-21T09:46:42Z")

</div>

Hello, 'm new to RoR. I was facing one prob and 'm unable to figure out my mistake. can anyone pls help me? the error is SyntaxError in Pages#index Showing pages/index.html.erb where line #4 raised: compile error …

---

## [Drag-and-drop forms-based development system](https://www.ruby-forum.com/t/drag-and-drop-forms-based-development-system/141048)

<div class="topic-metadata">

**Author:** [@genghis](https://www.ruby-forum.com/u/genghis)\
**Replies:** 0\
**Last updated:** [June 21, 2008, 8:48am UTC](https://www.ruby-forum.com/t/drag-and-drop-forms-based-development-system/141048 "2008-06-21T08:48:43Z")

</div>

Hello, Does anyone know of a database backended forms development system in Rails with data-aware drag-and-drop user–interface objects? Pretty much like Oracle Forms Developer. Need one, badly. Thanks! gk

---

## [Git and script/plugin; How I pass the PATH variable?](https://www.ruby-forum.com/t/git-and-script-plugin-how-i-pass-the-path-variable/141045)

<div class="topic-metadata">

**Author:** [@phor\_gruber](https://www.ruby-forum.com/u/phor_gruber)\
**Replies:** 0\
**Last updated:** [June 21, 2008, 7:22am UTC](https://www.ruby-forum.com/t/git-and-script-plugin-how-i-pass-the-path-variable/141045 "2008-06-21T07:22:30Z")

</div>

RoR People, I’m trying to use script/plugin and git. I see this error: mac2:/pt/webprops/mmhq/mm12/mymoney maco$ ruby script/plugin install git://github.com/activescaffold/active\_scaffold.git removing: /pt/webprops…

---

## [How can I drop all table data in one hit, from within ruby code (controller or model)?](https://www.ruby-forum.com/t/how-can-i-drop-all-table-data-in-one-hit-from-within-ruby-code-controller-or-model/141042)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 1\
**Last updated:** [June 21, 2008, 6:38am UTC](https://www.ruby-forum.com/t/how-can-i-drop-all-table-data-in-one-hit-from-within-ruby-code-controller-or-model/141042 "2008-06-21T06:38:15Z")

</div>

how can I drop all table data in one hit, from within ruby code (controller or model)? (i.e. prior to updating my projections table I need to delete all existing data first) thanks

---

## [Rails and mysql](https://www.ruby-forum.com/t/rails-and-mysql/141004)

<div class="topic-metadata">

**Author:** [@daociyiyou](https://www.ruby-forum.com/u/daociyiyou)\
**Replies:** 6\
**Last updated:** [June 21, 2008, 3:04am UTC](https://www.ruby-forum.com/t/rails-and-mysql/141004 "2008-06-21T03:04:10Z")

</div>

Hello: I have been used to mysql.But how to install it with rails 2.1? I can find many instructions for sqlite with rais2.1 except mysql.

---

## [Can 'tasks' belong to 'user' and 'project' at the same time?](https://www.ruby-forum.com/t/can-tasks-belong-to-user-and-project-at-the-same-time/141007)

<div class="topic-metadata">

**Author:** [@nik](https://www.ruby-forum.com/u/nik)\
**Replies:** 2\
**Last updated:** [June 21, 2008, 2:00am UTC](https://www.ruby-forum.com/t/can-tasks-belong-to-user-and-project-at-the-same-time/141007 "2008-06-21T02:00:59Z")

</div>

Hello All! I have ‘project’ and ‘task’ model that is set to belongs\_to ‘user’, and ‘user’ has\_many ‘projects’ and ‘task’, and I have the config/ routes.db using map.resource :users, :has\_many \[:projects, :tasks\] I c…

---

## [Rspec - has\_many-belongs\_to controller question](https://www.ruby-forum.com/t/rspec-has-many-belongs-to-controller-question/141036)

<div class="topic-metadata">

**Author:** [@John\_I](https://www.ruby-forum.com/u/John_I)\
**Replies:** 0\
**Last updated:** [June 21, 2008, 12:21am UTC](https://www.ruby-forum.com/t/rspec-has-many-belongs-to-controller-question/141036 "2008-06-21T00:21:16Z")

</div>

I’m using restful-authentication from RSPEC 1.1.4 from Home · dchelimsky/rspec-rails Wiki · GitHub (downloaded this week) The spec for loging in work I even have it working checking for authentication on the teache…

---

## [Premature end of script headers; dispatch.cgi - ok](https://www.ruby-forum.com/t/premature-end-of-script-headers-dispatch-cgi-ok/140844)

<div class="topic-metadata">

**Author:** [@mr\_tibs](https://www.ruby-forum.com/u/mr_tibs)\
**Replies:** 8\
**Last updated:** [June 21, 2008, 12:01am UTC](https://www.ruby-forum.com/t/premature-end-of-script-headers-dispatch-cgi-ok/140844 "2008-06-21T00:01:19Z")

</div>

Hi, I’m getting the dreaded “Premature end of script headers: dispatch.cgi” message on my production server. Before I list all the things that I tried, let me mention that I already have a Rails app working on this s…

---

## [Multiple Check Boxes](https://www.ruby-forum.com/t/multiple-check-boxes/141031)

<div class="topic-metadata">

**Author:** [@jason](https://www.ruby-forum.com/u/jason)\
**Replies:** 1\
**Last updated:** [June 20, 2008, 11:32pm UTC](https://www.ruby-forum.com/t/multiple-check-boxes/141031 "2008-06-20T23:32:32Z")

</div>

i’ve been digging on google most of the day trying to find the holy grail of check box resources, but have yet to find it. I’m trying to create a form with multiple checkboxes, and when the user submits the form, have…

---

## [Queries in development log using ODBC adapter](https://www.ruby-forum.com/t/queries-in-development-log-using-odbc-adapter/141029)

<div class="topic-metadata">

**Author:** [@starmaerker](https://www.ruby-forum.com/u/starmaerker)\
**Replies:** 0\
**Last updated:** [June 20, 2008, 10:31pm UTC](https://www.ruby-forum.com/t/queries-in-development-log-using-odbc-adapter/141029 "2008-06-20T22:31:22Z")

</div>

Hi all. I’m in a project right now where I’m using the ODBC adapter to connect to a MS Sqlserver DB (believe me, it’s not my choice). Is there any way to get the SQL queries being generated a la the log when using My…

---

## [Link\_to\_remote with anchor](https://www.ruby-forum.com/t/link-to-remote-with-anchor/77413)

<div class="topic-metadata">

**Author:** [@giantcranes](https://www.ruby-forum.com/u/giantcranes)\
**Replies:** 1\
**Last updated:** [June 20, 2008, 9:39pm UTC](https://www.ruby-forum.com/t/link-to-remote-with-anchor/77413 "2008-06-20T21:39:22Z")

</div>

Hi, I would like to jump to an anchor on a page once an AJAX action has been performed (a new page of data has been returned and I would like to present the top of this list to the user). Is there a way to specify an…

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

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