# Rails

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

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

---

## [Rjs-file: javascript shown instead of executed - mime-type?](https://www.ruby-forum.com/t/rjs-file-javascript-shown-instead-of-executed-mime-type/133808)

<div class="topic-metadata">

**Author:** [@jehoho](https://www.ruby-forum.com/u/jehoho)\
**Replies:** 3\
**Last updated:** [April 4, 2008, 8:48pm UTC](https://www.ruby-forum.com/t/rjs-file-javascript-shown-instead-of-executed-mime-type/133808 "2008-04-04T20:48:48Z")

</div>

Hi. Using a rjs-file my browser shows the javascript-code instead of executing. Why? Is there a wrong mime-type configuration? Where to fix it? Thanks Jens

---

## [Reusable State model/migration - how do you do it?](https://www.ruby-forum.com/t/reusable-state-model-migration-how-do-you-do-it/131838)

<div class="topic-metadata">

**Author:** [@ncancelliere](https://www.ruby-forum.com/u/ncancelliere)\
**Replies:** 4\
**Last updated:** [April 4, 2008, 8:45pm UTC](https://www.ruby-forum.com/t/reusable-state-model-migration-how-do-you-do-it/131838 "2008-04-04T20:45:16Z")

</div>

I’m new to Rails. I do a lot of work that requires standard State FIPS codes (both alpha and numeric). I know enough on how to generate my model and migrations and all that. It’s a rather simple model: name:string,…

---

## [Assign Time](https://www.ruby-forum.com/t/assign-time/133902)

<div class="topic-metadata">

**Author:** [@rashantha](https://www.ruby-forum.com/u/rashantha)\
**Replies:** 1\
**Last updated:** [April 4, 2008, 8:33pm UTC](https://www.ruby-forum.com/t/assign-time/133902 "2008-04-04T20:33:28Z")

</div>

How do you assign time to a variable. ie: 9:30 AM party = cccc.to\_time ? how about military time?

---

## [How to write a test for Ultrasphinx](https://www.ruby-forum.com/t/how-to-write-a-test-for-ultrasphinx/130732)

<div class="topic-metadata">

**Author:** [@dkanders](https://www.ruby-forum.com/u/dkanders)\
**Replies:** 1\
**Last updated:** [April 4, 2008, 8:26pm UTC](https://www.ruby-forum.com/t/how-to-write-a-test-for-ultrasphinx/130732 "2008-04-04T20:26:55Z")

</div>

Hi All, I have the ultrasphinx plugin installed and it is working fine, but I’d like to write some tests for it. I have tried putting this test in one of my unit tests: def test\_should\_run\_ultrasphinx\_query @results …

---

## [Project announcement: iTunesRails](https://www.ruby-forum.com/t/project-announcement-itunesrails/133896)

<div class="topic-metadata">

**Author:** [@dcarneiro](https://www.ruby-forum.com/u/dcarneiro)\
**Replies:** 4\
**Last updated:** [April 4, 2008, 8:16pm UTC](https://www.ruby-forum.com/t/project-announcement-itunesrails/133896 "2008-04-04T20:16:57Z")

</div>

I’d like to announce my first open source Ruby on Rails project, iTunesRails. iTunesRails provides a web interface to the iTunes application running on the same machine. It was designed to provide an easy way for peop…

---

## [Passing parameters on rails](https://www.ruby-forum.com/t/passing-parameters-on-rails/133798)

<div class="topic-metadata">

**Author:** [@add](https://www.ruby-forum.com/u/add)\
**Replies:** 8\
**Last updated:** [April 4, 2008, 6:49pm UTC](https://www.ruby-forum.com/t/passing-parameters-on-rails/133798 "2008-04-04T18:49:54Z")

</div>

Hi, I want to know how I can pass the following parameters … I have faculdade: id, name curso : id, faculdade\_id and the following code #view \<%= select(:curso, :faculdade\_id , Faculdade.find(:all).collect {|c| \[…

---

## [Project Launch Announcement: SimpleLien.com](https://www.ruby-forum.com/t/project-launch-announcement-simplelien-com/133895)

<div class="topic-metadata">

**Author:** [@keaja](https://www.ruby-forum.com/u/keaja)\
**Replies:** 2\
**Last updated:** [April 4, 2008, 6:48pm UTC](https://www.ruby-forum.com/t/project-launch-announcement-simplelien-com/133895 "2008-04-04T18:48:10Z")

</div>

I just finished writing a rails app and I thought I would announce it here. It’s a rails app that is targeted at contractors in troubled housing market California. It takes the guess work out of creating California Pr…

---

## ["Desc " failed, does it exist? error](https://www.ruby-forum.com/t/desc-failed-does-it-exist-error/133894)

<div class="topic-metadata">

**Author:** [@parki](https://www.ruby-forum.com/u/parki)\
**Replies:** 0\
**Last updated:** [April 4, 2008, 6:29pm UTC](https://www.ruby-forum.com/t/desc-failed-does-it-exist-error/133894 "2008-04-04T18:29:16Z")

</div>

I am getting the following Runtime error when I first log onto my application: "Desc " failed, does it exist? error Notice the space after Desc…not a typo…it appears it is losing tablename somehow when attempting the…

---

## [New to RoR, need help with the application in Agile Web Development](https://www.ruby-forum.com/t/new-to-ror-need-help-with-the-application-in-agile-web-development/133835)

<div class="topic-metadata">

**Author:** [@coreyonrails](https://www.ruby-forum.com/u/coreyonrails)\
**Replies:** 3\
**Last updated:** [April 4, 2008, 6:28pm UTC](https://www.ruby-forum.com/t/new-to-ror-need-help-with-the-application-in-agile-web-development/133835 "2008-04-04T18:28:48Z")

</div>

Hi All, I am new to RoR, that will be plainly obvious soon. I am currently a web developer, with a C++ background, so I have an idea how to get things to work, but I must be missing something. I am working on the fir…

---

## [RJS and Greybox : executing the js in the parent window?](https://www.ruby-forum.com/t/rjs-and-greybox-executing-the-js-in-the-parent-window/58821)

<div class="topic-metadata">

**Author:** [@aravet](https://www.ruby-forum.com/u/aravet)\
**Replies:** 2\
**Last updated:** [April 4, 2008, 6:17pm UTC](https://www.ruby-forum.com/t/rjs-and-greybox-executing-the-js-in-the-parent-window/58821 "2008-04-04T18:17:26Z")

</div>

Hi all, Question: Can a child window manipulate its parent window with RJS? Example: In an application a parent/master window shows a list of records. When the users press ‘edit’, a greybox windows pops up where th…

---

## [Where to host my open source Rails web app?](https://www.ruby-forum.com/t/where-to-host-my-open-source-rails-web-app/133891)

<div class="topic-metadata">

**Author:** [@coolmenu](https://www.ruby-forum.com/u/coolmenu)\
**Replies:** 1\
**Last updated:** [April 4, 2008, 6:10pm UTC](https://www.ruby-forum.com/t/where-to-host-my-open-source-rails-web-app/133891 "2008-04-04T18:10:37Z")

</div>

I was thinking about releasing a Rails web app that I wrote. Where’s the best place to host my project that would get the most visibility: sourceforge, rubyforge, or google? Thanks for any help.

---

## [Has\_and\_belongs\_to\_many Problem](https://www.ruby-forum.com/t/has-and-belongs-to-many-problem/133876)

<div class="topic-metadata">

**Author:** [@tktktk](https://www.ruby-forum.com/u/tktktk)\
**Replies:** 5\
**Last updated:** [April 4, 2008, 5:48pm UTC](https://www.ruby-forum.com/t/has-and-belongs-to-many-problem/133876 "2008-04-04T17:48:51Z")

</div>

Hi all I’m having a problem with has\_and\_belongs\_to\_many (habtm)… Here is my setup: tables: customers, customergroups and a join-table called customers\_customergroups customers has an id as pk and so does customergr…

---

## [Capistrano authentication errors](https://www.ruby-forum.com/t/capistrano-authentication-errors/133887)

<div class="topic-metadata">

**Author:** [@Ken\_Hudson](https://www.ruby-forum.com/u/Ken_Hudson)\
**Replies:** 0\
**Last updated:** [April 4, 2008, 5:01pm UTC](https://www.ruby-forum.com/t/capistrano-authentication-errors/133887 "2008-04-04T17:01:06Z")

</div>

Hello, I have Capistrano 1.3.1 running on my Mac Pro and all is working well and has been for almost a year. However, I just got a new laptop as a backup and I’m attempting to set up Capistrano 2.2 on Leopard. I h…

---

## [Generating a event](https://www.ruby-forum.com/t/generating-a-event/133871)

<div class="topic-metadata">

**Author:** [@karthikragu](https://www.ruby-forum.com/u/karthikragu)\
**Replies:** 2\
**Last updated:** [April 4, 2008, 4:58pm UTC](https://www.ruby-forum.com/t/generating-a-event/133871 "2008-04-04T16:58:48Z")

</div>

hi, im using select\_tag in my view.i want to generate a alert box when i select any option in that drop down box,anyone know please help me to reach it.

---

## [Problem when i try deploy mephisto](https://www.ruby-forum.com/t/problem-when-i-try-deploy-mephisto/133831)

<div class="topic-metadata">

**Author:** [@liberte](https://www.ruby-forum.com/u/liberte)\
**Replies:** 1\
**Last updated:** [April 4, 2008, 4:20pm UTC](https://www.ruby-forum.com/t/problem-when-i-try-deploy-mephisto/133831 "2008-04-04T16:20:44Z")

</div>

Hello everybody… now i finish my first mephisto application and try deploy. In my development machine everything is fine on Rails 2.0.2 and last version of mephisto on Mephisto repository. But when i try deploy and ru…

---

## [Named\_scope and ordering](https://www.ruby-forum.com/t/named-scope-and-ordering/133881)

<div class="topic-metadata">

**Author:** [@tim](https://www.ruby-forum.com/u/tim)\
**Replies:** 0\
**Last updated:** [April 4, 2008, 4:18pm UTC](https://www.ruby-forum.com/t/named-scope-and-ordering/133881 "2008-04-04T16:18:21Z")

</div>

Hi, this is a general design question and I liked to see how other people handle the following situation: Before named\_scope I wrote custom finders for my model classes. Something like order.rb class Order \< ActiveRe…

---

## [Find that includes :group and :order or :distinct](https://www.ruby-forum.com/t/find-that-includes-group-and-order-or-distinct/133877)

<div class="topic-metadata">

**Author:** [@fcano](https://www.ruby-forum.com/u/fcano)\
**Replies:** 0\
**Last updated:** [April 4, 2008, 4:07pm UTC](https://www.ruby-forum.com/t/find-that-includes-group-and-order-or-distinct/133877 "2008-04-04T16:07:39Z")

</div>

Hi forum, The situation is that I have a table called nextactions with: id, name, project\_id, position So each nextaction belongs to a project and each project have many NextActions. I was just wondering if with jus…

---

## [Testing for Form Submission?](https://www.ruby-forum.com/t/testing-for-form-submission/133691)

<div class="topic-metadata">

**Author:** [@pete](https://www.ruby-forum.com/u/pete)\
**Replies:** 8\
**Last updated:** [April 4, 2008, 3:42pm UTC](https://www.ruby-forum.com/t/testing-for-form-submission/133691 "2008-04-04T15:42:35Z")

</div>

Hi- I’m trying to create a file upload script using RoR but I am getting “You have a nil object when you didn’t expect it!” and I think this is caused by the fact that the no form has been submitted. Is that right? …

---

## [Acts\_as\_ferret multi model search](https://www.ruby-forum.com/t/acts-as-ferret-multi-model-search/133866)

<div class="topic-metadata">

**Author:** [@Osaris](https://www.ruby-forum.com/u/Osaris)\
**Replies:** 0\
**Last updated:** [April 4, 2008, 2:49pm UTC](https://www.ruby-forum.com/t/acts-as-ferret-multi-model-search/133866 "2008-04-04T14:49:55Z")

</div>

Hello, I’m using acts\_as\_ferret plugin for the search function of my application. My app contains two model, one Address model and one Contact model with both acts\_as\_ferret enabled. When I try to do a query on both …

---

## [Accessing a dll file from rails application](https://www.ruby-forum.com/t/accessing-a-dll-file-from-rails-application/133861)

<div class="topic-metadata">

**Author:** [@ratnavel](https://www.ruby-forum.com/u/ratnavel)\
**Replies:** 0\
**Last updated:** [April 4, 2008, 1:54pm UTC](https://www.ruby-forum.com/t/accessing-a-dll-file-from-rails-application/133861 "2008-04-04T13:54:53Z")

</div>

Hi, How to accessing a .dll file from rails application. Thanks, Ratnavel

---

## [Associations stopped working](https://www.ruby-forum.com/t/associations-stopped-working/133301)

<div class="topic-metadata">

**Author:** [@C.Hochstrasser](https://www.ruby-forum.com/u/C.Hochstrasser)\
**Replies:** 8\
**Last updated:** [April 4, 2008, 1:45pm UTC](https://www.ruby-forum.com/t/associations-stopped-working/133301 "2008-04-04T13:45:19Z")

</div>

I have Rails 2.0.2 on Ubuntu Hardy Beta and I noticed that the Associations in all my Applications stopped working, that makes me very crazy, because I can’t develop without my associations working. A complete reinsta…

---

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

<div class="topic-metadata">

**Author:** [@pens\_fan](https://www.ruby-forum.com/u/pens_fan)\
**Replies:** 4\
**Last updated:** [April 4, 2008, 1:26pm UTC](https://www.ruby-forum.com/t/auto-complete-problems/133833 "2008-04-04T13:26:33Z")

</div>

Hello All, I’m a RoR newbiew, trying to experiment with Autocomplete, but I’m having some difficulties. When I start typing in my input box, instead of getting a nice drop down, the styling on my page is getting all …

---

## [Set a default value to a "text/blob" field at creation?](https://www.ruby-forum.com/t/set-a-default-value-to-a-text-blob-field-at-creation/133763)

<div class="topic-metadata">

**Author:** [@kaizerkaizer](https://www.ruby-forum.com/u/kaizerkaizer)\
**Replies:** 7\
**Last updated:** [April 4, 2008, 1:19pm UTC](https://www.ruby-forum.com/t/set-a-default-value-to-a-text-blob-field-at-creation/133763 "2008-04-04T13:19:28Z")

</div>

Is it possible somehow to incorporate “this is a text” into a “blob/text”-value in the database when the row is created? It’s not possible to do with a default value hence it’s a “blob/text”-value. At the moment I cr…

---

## [Noob Question - Migrations](https://www.ruby-forum.com/t/noob-question-migrations/133779)

<div class="topic-metadata">

**Author:** [@Rory\_McKinley](https://www.ruby-forum.com/u/Rory_McKinley)\
**Replies:** 7\
**Last updated:** [April 4, 2008, 12:50pm UTC](https://www.ruby-forum.com/t/noob-question-migrations/133779 "2008-04-04T12:50:19Z")

</div>

Hello list If I am using migrations to build my Db schema, is there any way to generate fixed-length fields for MySQL (i.e. char instead of varchar). I have tried STFW, but have come back with nothing to say that it i…

---

## [How to serve images that require authentication](https://www.ruby-forum.com/t/how-to-serve-images-that-require-authentication/133241)

<div class="topic-metadata">

**Author:** [@apramanik](https://www.ruby-forum.com/u/apramanik)\
**Replies:** 6\
**Last updated:** [April 4, 2008, 12:21pm UTC](https://www.ruby-forum.com/t/how-to-serve-images-that-require-authentication/133241 "2008-04-04T12:21:18Z")

</div>

Hi all, I have images that are part of a user profile. These images should only be served to other users that view the profile. I’m new to web apps and was wondering what would be the best way to do this in rails. I …

---

## [Session with oracle](https://www.ruby-forum.com/t/session-with-oracle/133849)

<div class="topic-metadata">

**Author:** [@mystic](https://www.ruby-forum.com/u/mystic)\
**Replies:** 0\
**Last updated:** [April 4, 2008, 12:13pm UTC](https://www.ruby-forum.com/t/session-with-oracle/133849 "2008-04-04T12:13:02Z")

</div>

Hi… I’ve created the session table with ‘rake db:sessions:create’ and it’s ok but when my application start it doesn’t work!! -Ruby version 1.8.6 -Rails version 2.0.2 this is my development.log… e\[4;35;1mSQL (0.0…

---

## [AJAX based data grid for Rails App? Is there any code/approach I can leverage?](https://www.ruby-forum.com/t/ajax-based-data-grid-for-rails-app-is-there-any-code-approach-i-can-leverage/133832)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 4\
**Last updated:** [April 4, 2008, 11:22am UTC](https://www.ruby-forum.com/t/ajax-based-data-grid-for-rails-app-is-there-any-code-approach-i-can-leverage/133832 "2008-04-04T11:22:27Z")

</div>

Hi, I want to have a page in my Ruby on Rails application that is like a dynamic / updateable data grid. Like a matrix or spreadsheet segment (x rows, y columns) which one can click in any of the cells and make an u…

---

## [RJS problem for redirect from controller](https://www.ruby-forum.com/t/rjs-problem-for-redirect-from-controller/133846)

<div class="topic-metadata">

**Author:** [@balavrscse](https://www.ruby-forum.com/u/balavrscse)\
**Replies:** 0\
**Last updated:** [April 4, 2008, 9:23am UTC](https://www.ruby-forum.com/t/rjs-problem-for-redirect-from-controller/133846 "2008-04-04T09:23:30Z")

</div>

I have one RJS file in which i am updating multiple multiple divs.if user loged in then i am render one page.if user not loged in i am rendering siginin form page. MY RJS file:step5.rjs if session\[:username\]!=nil and …

---

## [Rails + .NET (feasible?)](https://www.ruby-forum.com/t/rails-net-feasible/112023)

<div class="topic-metadata">

**Author:** [@GlennNZ](https://www.ruby-forum.com/u/GlennNZ)\
**Replies:** 10\
**Last updated:** [April 4, 2008, 8:55am UTC](https://www.ruby-forum.com/t/rails-net-feasible/112023 "2008-04-04T08:55:32Z")

</div>

Hi. I’ve got the task of creating a prototype for a web based project. We started with PHP using absolutely no framework and it has finally got to the point where is is insanely messy. The question was whether we shou…

---

## [Rails unit testing removes foreign key constraints in test database?](https://www.ruby-forum.com/t/rails-unit-testing-removes-foreign-key-constraints-in-test-database/133841)

<div class="topic-metadata">

**Author:** [@dracos](https://www.ruby-forum.com/u/dracos)\
**Replies:** 1\
**Last updated:** [April 4, 2008, 8:40am UTC](https://www.ruby-forum.com/t/rails-unit-testing-removes-foreign-key-constraints-in-test-database/133841 "2008-04-04T08:40:08Z")

</div>

I’ve noticed that when testing is finished that at some point Rails has removed the foreign key constraints from my test database. Does anyone know where this foreign key constraint deletion occurs in the source code.…

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

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