# Rails

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

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

---

## [Return back to the view after a javscript condition](https://www.ruby-forum.com/t/return-back-to-the-view-after-a-javscript-condition/139374)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 3\
**Last updated:** [June 3, 2008, 11:40am UTC](https://www.ruby-forum.com/t/return-back-to-the-view-after-a-javscript-condition/139374 "2008-06-03T11:40:38Z")

</div>

Hi In the view I have link\_to\_remote as below \<%= link\_to\_remote( “Select”, { :update=\>“div\_inside\_transfer\_reason\_search\_sd”, :before=\>“checkgroupselected($(‘sd\_ticket\_primary\_assignee\_group\_id’));”, :url =\>{ :con…

---

## [NoMemoryError: failed to allocate memory](https://www.ruby-forum.com/t/nomemoryerror-failed-to-allocate-memory/139378)

<div class="topic-metadata">

**Author:** [@AnAnAn](https://www.ruby-forum.com/u/AnAnAn)\
**Replies:** 0\
**Last updated:** [June 3, 2008, 11:38am UTC](https://www.ruby-forum.com/t/nomemoryerror-failed-to-allocate-memory/139378 "2008-06-03T11:38:34Z")

</div>

Hi, I’m using daemons to control a script that should always run on background in my development server. But, when I start the script it, returns this error: \<MissingSourceFile: no such file to load – fast\_xs\> \<NoMe…

---

## [Editing a serialized hash with a Rails form](https://www.ruby-forum.com/t/editing-a-serialized-hash-with-a-rails-form/139375)

<div class="topic-metadata">

**Author:** [@davidtl](https://www.ruby-forum.com/u/davidtl)\
**Replies:** 0\
**Last updated:** [June 3, 2008, 10:42am UTC](https://www.ruby-forum.com/t/editing-a-serialized-hash-with-a-rails-form/139375 "2008-06-03T10:42:23Z")

</div>

I used the “serialize” class method on one of my models to save a hash in my database. It works fine, but now I would like an easy way to edit the hash with a form. I tried to make some googling, but I didn’t find any…

---

## ["Not unique table/alias" errors when upgrading to Rails 2.1](https://www.ruby-forum.com/t/not-unique-table-alias-errors-when-upgrading-to-rails-2-1/139365)

<div class="topic-metadata">

**Author:** [@Olly\_L](https://www.ruby-forum.com/u/Olly_L)\
**Replies:** 2\
**Last updated:** [June 3, 2008, 10:34am UTC](https://www.ruby-forum.com/t/not-unique-table-alias-errors-when-upgrading-to-rails-2-1/139365 "2008-06-03T10:34:07Z")

</div>

Hi I’ve just attempted an upgrade from Rails 2.02 to 2.1 and I’m seeing dozens of unit test failures with errors like this: ActionView::TemplateError: Mysql::Error: Not unique table/alias: ‘clients’: SELECT count(DIS…

---

## [After\_create callback in subclass](https://www.ruby-forum.com/t/after-create-callback-in-subclass/139372)

<div class="topic-metadata">

**Author:** [@tachekent](https://www.ruby-forum.com/u/tachekent)\
**Replies:** 1\
**Last updated:** [June 3, 2008, 10:27am UTC](https://www.ruby-forum.com/t/after-create-callback-in-subclass/139372 "2008-06-03T10:27:37Z")

</div>

I have a User model with a protected method defined: def set\_role(rolename) role = Role.find\_by\_rolename(rolename) permission = Permission.new permission.role = role permission.user = self permission.save(false) e…

---

## [Problem in send an attachment](https://www.ruby-forum.com/t/problem-in-send-an-attachment/139368)

<div class="topic-metadata">

**Author:** [@shani1984](https://www.ruby-forum.com/u/shani1984)\
**Replies:** 0\
**Last updated:** [June 3, 2008, 10:09am UTC](https://www.ruby-forum.com/t/problem-in-send-an-attachment/139368 "2008-06-03T10:09:16Z")

</div>

Hi… I try to send an attachment with a mail. I could be able to send the attachment. But the problem is it is an empty one. What can be the problem … Please help me out this… following is the code that i have used . …

---

## [Globalite](https://www.ruby-forum.com/t/globalite/139367)

<div class="topic-metadata">

**Author:** [@sneha](https://www.ruby-forum.com/u/sneha)\
**Replies:** 0\
**Last updated:** [June 3, 2008, 10:02am UTC](https://www.ruby-forum.com/t/globalite/139367 "2008-06-03T10:02:45Z")

</div>

Hi, I want to add a language to my globalised application the data in my zh-CN.html.erb"(chinese) is given as äºŒæœˆ ä¸‰æœˆ å››æœˆ which on the browser i find as the proper translated words from where to get this e…

---

## [ffMpeg convert video to flv](https://www.ruby-forum.com/t/ffmpeg-convert-video-to-flv/139352)

<div class="topic-metadata">

**Author:** [@abhishekchess1](https://www.ruby-forum.com/u/abhishekchess1)\
**Replies:** 1\
**Last updated:** [June 3, 2008, 9:50am UTC](https://www.ruby-forum.com/t/ffmpeg-convert-video-to-flv/139352 "2008-06-03T09:50:59Z")

</div>

could u tell me how to use ffmpeg or other format to convert uploaded video in flv from flex to rails ? removed\_email\_address@domain.invalid

---

## [Acts\_as\_ferret issue on windows](https://www.ruby-forum.com/t/acts-as-ferret-issue-on-windows/131973)

<div class="topic-metadata">

**Author:** [@grayson](https://www.ruby-forum.com/u/grayson)\
**Replies:** 2\
**Last updated:** [June 3, 2008, 9:38am UTC](https://www.ruby-forum.com/t/acts-as-ferret-issue-on-windows/131973 "2008-06-03T09:38:04Z")

</div>

I installed ferret-0.11.5-x86-mswin32 successfully but I’m having no luck with either the acts\_as\_ferret gem or the plugin. The plugin installs clean but when I try to start the server I get the following: D:\\test\>ru…

---

## [Requiring vendor code in rake tasks](https://www.ruby-forum.com/t/requiring-vendor-code-in-rake-tasks/139364)

<div class="topic-metadata">

**Author:** [@Diego](https://www.ruby-forum.com/u/Diego)\
**Replies:** 0\
**Last updated:** [June 3, 2008, 9:22am UTC](https://www.ruby-forum.com/t/requiring-vendor-code-in-rake-tasks/139364 "2008-06-03T09:22:09Z")

</div>

Hi all, I currently am using the rubyzip library, which is located in the Rails vendor directory (vendor/rubyzip-0.9.1), which I just use with “requite ‘zip/zip’”. But I am not able to use the same require to use rub…

---

## [Sending parameters to ruby method from javascript](https://www.ruby-forum.com/t/sending-parameters-to-ruby-method-from-javascript/139278)

<div class="topic-metadata">

**Author:** [@pandiri](https://www.ruby-forum.com/u/pandiri)\
**Replies:** 3\
**Last updated:** [June 3, 2008, 8:58am UTC](https://www.ruby-forum.com/t/sending-parameters-to-ruby-method-from-javascript/139278 "2008-06-03T08:58:58Z")

</div>

HI THERE, In my .rhtml file I have some links.I need to invoke a ruby method(controller’s method/Helper method) and send link text as a parameter on clicking the link. Is it Possible…! Thanks In Advance

---

## [Applying a class/id to current link in Haml](https://www.ruby-forum.com/t/applying-a-class-id-to-current-link-in-haml/139256)

<div class="topic-metadata">

**Author:** [@davidtl](https://www.ruby-forum.com/u/davidtl)\
**Replies:** 2\
**Last updated:** [June 3, 2008, 8:53am UTC](https://www.ruby-forum.com/t/applying-a-class-id-to-current-link-in-haml/139256 "2008-06-03T08:53:12Z")

</div>

I’ve got a tabbed menu. It currently looks like this in Haml: %ul#menu %li= link\_to\_unless\_current “…”, :controller =\> “…” %li= link\_to\_unless\_current “…”, :controller =\> “…” %li= link\_to\_unless\_current “…”, :control…

---

## [Xml to database](https://www.ruby-forum.com/t/xml-to-database/196696)

<div class="topic-metadata">

**Author:** [@hloooi](https://www.ruby-forum.com/u/hloooi)\
**Replies:** 10\
**Last updated:** [June 3, 2008, 7:34am UTC](https://www.ruby-forum.com/t/xml-to-database/196696 "2008-06-03T07:34:15Z")

</div>

hi, can someone help me with this after i read theres nothing show in my database… wat happen…? where is my error in my code?? class Map require ‘rexml/document’ require “mysql” require “dbi” include REXML scanfi…

---

## [Update to Rails 2.1.0 in a Fedora LInux VPS with 256MB from Local Files to avoid \[ process Killed \]](https://www.ruby-forum.com/t/update-to-rails-2-1-0-in-a-fedora-linux-vps-with-256mb-from-local-files-to-avoid-process-killed/139347)

<div class="topic-metadata">

**Author:** [@Dinooz](https://www.ruby-forum.com/u/Dinooz)\
**Replies:** 0\
**Last updated:** [June 3, 2008, 5:13am UTC](https://www.ruby-forum.com/t/update-to-rails-2-1-0-in-a-fedora-linux-vps-with-256mb-from-local-files-to-avoid-process-killed/139347 "2008-06-03T05:13:31Z")

</div>

Update to Rails 2.1.0 in a Fedora LInux VPS with 256MB When trying to run: gem update or gem install rails \[root@pinto ruby\]# gem update Updating installed gems Bulk updating Gem source index for: http://gems.rubyfor…

---

## [Entity Replacement](https://www.ruby-forum.com/t/entity-replacement/139348)

<div class="topic-metadata">

**Author:** [@hloooi](https://www.ruby-forum.com/u/hloooi)\
**Replies:** 0\
**Last updated:** [June 3, 2008, 4:57am UTC](https://www.ruby-forum.com/t/entity-replacement/139348 "2008-06-03T04:57:54Z")

</div>

hi… can some one please explain this to me? im not clear what its actually means… thx for helping~~~ doc = Document.new(’\<!DOCTYPE foo \[ \]\>replace &ent;’,{:raw=\>:all}) doc.root.text #-\> “replace &ent;” doc.t…

---

## [Using select\_year in form\_for helper block](https://www.ruby-forum.com/t/using-select-year-in-form-for-helper-block/139349)

<div class="topic-metadata">

**Author:** [@taro](https://www.ruby-forum.com/u/taro)\
**Replies:** 0\
**Last updated:** [June 3, 2008, 4:40am UTC](https://www.ruby-forum.com/t/using-select-year-in-form-for-helper-block/139349 "2008-06-03T04:40:47Z")

</div>

I’m having trouble trying to implement a selection field of years in a form\_for block for Views. Initially, I wrote something like this: Sign-up \<% array\_of\_years = generate\_year\_array() %\> \<% form\_for :person…

---

## [Clicking on links within facebook iframes (facebook apps)](https://www.ruby-forum.com/t/clicking-on-links-within-facebook-iframes-facebook-apps/139340)

<div class="topic-metadata">

**Author:** [@rubenz](https://www.ruby-forum.com/u/rubenz)\
**Replies:** 1\
**Last updated:** [June 3, 2008, 4:39am UTC](https://www.ruby-forum.com/t/clicking-on-links-within-facebook-iframes-facebook-apps/139340 "2008-06-03T04:39:36Z")

</div>

Hello, I have a problem with clicking on the links in facebook apps due to iframes. I am trying to write a little script to run through the funwall app. I used IE Dev toolbar to get the name of the id of the iframe (…

---

## [How to create multiple objects of one model in one post request?](https://www.ruby-forum.com/t/how-to-create-multiple-objects-of-one-model-in-one-post-request/139291)

<div class="topic-metadata">

**Author:** [@jawosis](https://www.ruby-forum.com/u/jawosis)\
**Replies:** 4\
**Last updated:** [June 3, 2008, 3:23am UTC](https://www.ruby-forum.com/t/how-to-create-multiple-objects-of-one-model-in-one-post-request/139291 "2008-06-03T03:23:17Z")

</div>

Hi, I would apreciate to hear suggestions from you on how to create multiple objects (of the same model) with one form and post request. My concrete situation: I have a googlemaps application where users can click on…

---

## [Debugger Not Working](https://www.ruby-forum.com/t/debugger-not-working/139076)

<div class="topic-metadata">

**Author:** [@ror\_arch](https://www.ruby-forum.com/u/ror_arch)\
**Replies:** 10\
**Last updated:** [June 3, 2008, 2:59am UTC](https://www.ruby-forum.com/t/debugger-not-working/139076 "2008-06-03T02:59:48Z")

</div>

I am using Rails 2.0.2 on XP with Aptana Studio (free version). I have tried using the debugger breakpoints but it does n0t work (skips the breakpoint). Aptana’s debugger is not working also. I usually use webrick or …

---

## [Rails Framework](https://www.ruby-forum.com/t/rails-framework/139335)

<div class="topic-metadata">

**Author:** [@murs](https://www.ruby-forum.com/u/murs)\
**Replies:** 1\
**Last updated:** [June 3, 2008, 2:05am UTC](https://www.ruby-forum.com/t/rails-framework/139335 "2008-06-03T02:05:34Z")

</div>

I am looking for the class hierarchy diagram of rails framework. Does any body know about it? Thanks!!!

---

## [Collection\_select not doing what it should... any ideas?](https://www.ruby-forum.com/t/collection-select-not-doing-what-it-should-any-ideas/139334)

<div class="topic-metadata">

**Author:** [@melvinram](https://www.ruby-forum.com/u/melvinram)\
**Replies:** 10\
**Last updated:** [June 3, 2008, 1:59am UTC](https://www.ruby-forum.com/t/collection-select-not-doing-what-it-should-any-ideas/139334 "2008-06-03T01:59:15Z")

</div>

I get the error ActiveRecord::AssociationTypeMismatch (Course(#23456280859460) expected, got String(#23757015656420)) when i submit an update with the code below. Any ideas on what is going on? /views/enrollment/edit…

---

## [An Example of a Form With Many To Many Relationships](https://www.ruby-forum.com/t/an-example-of-a-form-with-many-to-many-relationships/139337)

<div class="topic-metadata">

**Author:** [@ror\_arch](https://www.ruby-forum.com/u/ror_arch)\
**Replies:** 4\
**Last updated:** [June 3, 2008, 1:55am UTC](https://www.ruby-forum.com/t/an-example-of-a-form-with-many-to-many-relationships/139337 "2008-06-03T01:55:24Z")

</div>

I wished to look at an example of a form that does the following: \[table A\] \[table A\_B\] \[table B\] a\_id A\_B\_id b\_id nameA a\_id nameB b\_id The above table basically allows for…

---

## [Method missing for rspec route\_for](https://www.ruby-forum.com/t/method-missing-for-rspec-route-for/139331)

<div class="topic-metadata">

**Author:** [@mr\_tibs](https://www.ruby-forum.com/u/mr_tibs)\
**Replies:** 2\
**Last updated:** [June 3, 2008, 1:38am UTC](https://www.ruby-forum.com/t/method-missing-for-rspec-route-for/139331 "2008-06-03T01:38:10Z")

</div>

Hi, I’m trying to run a simple rspec route\_for example and I’m getting a method missing error on “route\_for”. I searched in all files in the rspec gem, as well as in the plugins directories, and there is no trace of …

---

## [Where are the cached files stored on the production server?](https://www.ruby-forum.com/t/where-are-the-cached-files-stored-on-the-production-server/139333)

<div class="topic-metadata">

**Author:** [@chrisolsen](https://www.ruby-forum.com/u/chrisolsen)\
**Replies:** 3\
**Last updated:** [June 3, 2008, 12:49am UTC](https://www.ruby-forum.com/t/where-are-the-cached-files-stored-on-the-production-server/139333 "2008-06-03T00:49:58Z")

</div>

I need to delete a file, but the cached files are no longer in the tmp folder on the production server. I don’t see them in the shared either. I can’t even find anything with the \*nix find command. Any clues? Thanks…

---

## [Loading fixtures](https://www.ruby-forum.com/t/loading-fixtures/139319)

<div class="topic-metadata">

**Author:** [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Replies:** 2\
**Last updated:** [June 2, 2008, 11:59pm UTC](https://www.ruby-forum.com/t/loading-fixtures/139319 "2008-06-02T23:59:05Z")

</div>

I have a role based access control system with models Right, Role and User and there are 2 join tables… rights\_roles and roles\_users I have been maintaining the Right & Role data via migrations which has created a few…

---

## [ANNOUNCE: act\_as\_soft\_deletable - new rails plugin for soft deleting / disabling ActiveRecord model](https://www.ruby-forum.com/t/announce-act-as-soft-deletable-new-rails-plugin-for-soft-deleting-disabling-activerecord-model/137760)

<div class="topic-metadata">

**Author:** [@Shngn](https://www.ruby-forum.com/u/Shngn)\
**Replies:** 13\
**Last updated:** [June 2, 2008, 11:45pm UTC](https://www.ruby-forum.com/t/announce-act-as-soft-deletable-new-rails-plugin-for-soft-deleting-disabling-activerecord-model/137760 "2008-06-02T23:45:35Z")

</div>

Acts\_as\_soft\_deletable is a rails plugin that provides the ability to soft delete or disable models. When models are destroyed, they will be archived so that they can later be restored easily. Its similar to acts\_as\_p…

---

## [How to I test actionmailer for failed delivery](https://www.ruby-forum.com/t/how-to-i-test-actionmailer-for-failed-delivery/139330)

<div class="topic-metadata">

**Author:** [@procyon](https://www.ruby-forum.com/u/procyon)\
**Replies:** 0\
**Last updated:** [June 2, 2008, 11:36pm UTC](https://www.ruby-forum.com/t/how-to-i-test-actionmailer-for-failed-delivery/139330 "2008-06-02T23:36:09Z")

</div>

I want to simulate a scenario where email sent using actionmailer has failed. How do I induce mail delivery error in my tests ? eg: begin UserNotify.deliver\_signup(@user, params\[‘user’\]\[‘password’\], url) rescue put…

---

## [Where is the Oracle adapter?](https://www.ruby-forum.com/t/where-is-the-oracle-adapter/139312)

<div class="topic-metadata">

**Author:** [@mark](https://www.ruby-forum.com/u/mark)\
**Replies:** 1\
**Last updated:** [June 2, 2008, 11:09pm UTC](https://www.ruby-forum.com/t/where-is-the-oracle-adapter/139312 "2008-06-02T23:09:05Z")

</div>

Can someone tell me where the Oracle adapter plugin can be found? I’ve tried installing it with “gem install activerecord-oracle-adapter –source http://gems.rubyonrails.org” as I have in the past, but am getting “ERRO…

---

## [Stylesheet\_link\_tag, javascript\_include\_tag, caching problems](https://www.ruby-forum.com/t/stylesheet-link-tag-javascript-include-tag-caching-problems/139325)

<div class="topic-metadata">

**Author:** [@Alex\_Choi](https://www.ruby-forum.com/u/Alex_Choi)\
**Replies:** 0\
**Last updated:** [June 2, 2008, 10:57pm UTC](https://www.ruby-forum.com/t/stylesheet-link-tag-javascript-include-tag-caching-problems/139325 "2008-06-02T22:57:53Z")

</div>

So, the new caching for stylesheet\_link\_tag, javascript\_include\_tag which rolls up the files into one all.js or all.css files is great … however I’ve run into an issue: If all.cs or all.js don’t exist, they get genera…

---

## [Rails 2.1 - when PostsController is present, creating Admin::PostsController fails](https://www.ruby-forum.com/t/rails-2-1-when-postscontroller-is-present-creating-admin-postscontroller-fails/139324)

<div class="topic-metadata">

**Author:** [@g0nzo](https://www.ruby-forum.com/u/g0nzo)\
**Replies:** 0\
**Last updated:** [June 2, 2008, 10:48pm UTC](https://www.ruby-forum.com/t/rails-2-1-when-postscontroller-is-present-creating-admin-postscontroller-fails/139324 "2008-06-02T22:48:29Z")

</div>

Hi, just found out small problem with Rails 2.1. If I run a “script/generate scaffold post title:string” that creates PostsController and later want to make admin controller for it by running “script/generate control…

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

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