# Rails

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

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

---

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

<div class="topic-metadata">

**Author:** [@vash](https://www.ruby-forum.com/u/vash)\
**Replies:** 1\
**Last updated:** [April 11, 2008, 7:07pm UTC](https://www.ruby-forum.com/t/problem-with-session/134528 "2008-04-11T19:07:32Z")

</div>

as my first project i am playing around with the swfupload ruby demo now i have run in a problem i dont get, maybe due to my lack of ror experience what i want to do is, during upload, get the ids of the uploaded pics…

---

## [Multi-user multi-company design](https://www.ruby-forum.com/t/multi-user-multi-company-design/134523)

<div class="topic-metadata">

**Author:** [@shenry](https://www.ruby-forum.com/u/shenry)\
**Replies:** 1\
**Last updated:** [April 11, 2008, 6:24pm UTC](https://www.ruby-forum.com/t/multi-user-multi-company-design/134523 "2008-04-11T18:24:45Z")

</div>

I am working on a site which tracks “ferms” (read: widgets)… each ferm belongs to one company, one company can have many ferms. One company can also have many users with different access priveliges, and company admini…

---

## [How can I handle multiple models saves in a single transactional](https://www.ruby-forum.com/t/how-can-i-handle-multiple-models-saves-in-a-single-transactional/134496)

<div class="topic-metadata">

**Author:** [@xponrails](https://www.ruby-forum.com/u/xponrails)\
**Replies:** 7\
**Last updated:** [April 11, 2008, 5:44pm UTC](https://www.ruby-forum.com/t/how-can-i-handle-multiple-models-saves-in-a-single-transactional/134496 "2008-04-11T17:44:05Z")

</div>

Hi all. I need to create two model in a single transaction: if the first fails, the transaction should be rolled back; if the second fails, the transaction should be rolled back. This is my code: begin ActiveRecord…

---

## [Development to Production](https://www.ruby-forum.com/t/development-to-production/134433)

<div class="topic-metadata">

**Author:** [@pete](https://www.ruby-forum.com/u/pete)\
**Replies:** 1\
**Last updated:** [April 11, 2008, 4:41pm UTC](https://www.ruby-forum.com/t/development-to-production/134433 "2008-04-11T16:41:33Z")

</div>

Hi- Does rake db:create accept a parameter to specify the environment to create? I have a \_development DB and would like to create the \_production DB to match the schema, and migrate the data. I can’t seem to find t…

---

## [Deleting a db record in a "tree-like" model structure](https://www.ruby-forum.com/t/deleting-a-db-record-in-a-tree-like-model-structure/134512)

<div class="topic-metadata">

**Author:** [@tharrisx](https://www.ruby-forum.com/u/tharrisx)\
**Replies:** 2\
**Last updated:** [April 11, 2008, 4:38pm UTC](https://www.ruby-forum.com/t/deleting-a-db-record-in-a-tree-like-model-structure/134512 "2008-04-11T16:38:00Z")

</div>

Hi there, what is the “Rails way” to delete a record in a model “tree” structure like the following one ? User has\_many :projects Project has\_many :tasks Task has\_many :sub\_tasks Sub\_task has\_many :sub\_sub\_tasks (e…

---

## [Built in helper for "xx characters remaining" on textbox?](https://www.ruby-forum.com/t/built-in-helper-for-xx-characters-remaining-on-textbox/134514)

<div class="topic-metadata">

**Author:** [@armstheykill](https://www.ruby-forum.com/u/armstheykill)\
**Replies:** 0\
**Last updated:** [April 11, 2008, 4:34pm UTC](https://www.ruby-forum.com/t/built-in-helper-for-xx-characters-remaining-on-textbox/134514 "2008-04-11T16:34:31Z")

</div>

I could have sworn there was a built in helper to create a text area/ field with input monitoring so users know how many characters they have left before the field goes kaboom. Either my google fu is weak today, or I…

---

## [Testing an action behind HTTP Authentication](https://www.ruby-forum.com/t/testing-an-action-behind-http-authentication/134449)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [April 11, 2008, 4:26pm UTC](https://www.ruby-forum.com/t/testing-an-action-behind-http-authentication/134449 "2008-04-11T16:26:15Z")

</div>

Greetings, I’m writing an integration test and would like to make sure that, with the correct credentials, I get the proper response. The problem is I don’t know how to use the ‘get’ method to attach the username and …

---

## [Web 2.0 Platform with Ruby](https://www.ruby-forum.com/t/web-2-0-platform-with-ruby/134510)

<div class="topic-metadata">

**Author:** [@Vector](https://www.ruby-forum.com/u/Vector)\
**Replies:** 2\
**Last updated:** [April 11, 2008, 4:23pm UTC](https://www.ruby-forum.com/t/web-2-0-platform-with-ruby/134510 "2008-04-11T16:23:52Z")

</div>

Hi I have a general question. I am just begging to study IS. So I have plans to build a web site, similar to MySpace or Facebook. Will RoR be the language to work with? What are the prons and cons of using something …

---

## [How to implement blog archive](https://www.ruby-forum.com/t/how-to-implement-blog-archive/134427)

<div class="topic-metadata">

**Author:** [@huang\_zhimin](https://www.ruby-forum.com/u/huang_zhimin)\
**Replies:** 1\
**Last updated:** [April 11, 2008, 3:48pm UTC](https://www.ruby-forum.com/t/how-to-implement-blog-archive/134427 "2008-04-11T15:48:34Z")

</div>

Is there a graceful method to implement blog archive? How do I get the start month of posts and how to list the months from the start month? – My msn spaces: http://flyerhzm.spaces.live.com

---

## [Array as Hash value](https://www.ruby-forum.com/t/array-as-hash-value/134500)

<div class="topic-metadata">

**Author:** [@lasastard](https://www.ruby-forum.com/u/lasastard)\
**Replies:** 4\
**Last updated:** [April 11, 2008, 3:41pm UTC](https://www.ruby-forum.com/t/array-as-hash-value/134500 "2008-04-11T15:41:26Z")

</div>

Hi, I have the hardest time getting my head around the following problem, maybe someone here can help: I have a Hash that contains Arrays as values - but how do I access the arrays in html? This is what I tried: \<%…

---

## [Stubbing method which adds error to model](https://www.ruby-forum.com/t/stubbing-method-which-adds-error-to-model/134505)

<div class="topic-metadata">

**Author:** [@vincesf](https://www.ruby-forum.com/u/vincesf)\
**Replies:** 1\
**Last updated:** [April 11, 2008, 3:25pm UTC](https://www.ruby-forum.com/t/stubbing-method-which-adds-error-to-model/134505 "2008-04-11T15:25:38Z")

</div>

Hi, I’m trying to stub a method for a model. Although I’m making it work I can’t find the best way to do it. This method is supposed to add an error to my instance. class User \< ActiveRecord::Base def my\_special\_met…

---

## [Capistrano restarts wrong release](https://www.ruby-forum.com/t/capistrano-restarts-wrong-release/134251)

<div class="topic-metadata">

**Author:** [@chrisjo](https://www.ruby-forum.com/u/chrisjo)\
**Replies:** 5\
**Last updated:** [April 11, 2008, 3:02pm UTC](https://www.ruby-forum.com/t/capistrano-restarts-wrong-release/134251 "2008-04-11T15:02:41Z")

</div>

I’m having some trouble where it seems that capistrano deploys just fine (with cap deploy), however, the site is never refreshed. After some checking it appears that capistrano in fact restarts the mongrels, but not f…

---

## [Excel to xml](https://www.ruby-forum.com/t/excel-to-xml/134491)

<div class="topic-metadata">

**Author:** [@sumantacaptain](https://www.ruby-forum.com/u/sumantacaptain)\
**Replies:** 8\
**Last updated:** [April 11, 2008, 2:25pm UTC](https://www.ruby-forum.com/t/excel-to-xml/134491 "2008-04-11T14:25:25Z")

</div>

i have done excel to xml conversion like this but the problem is…if i rename the “d:\\database\\terget.txt” to “d:\\database\\terget.xml” then the file is not opening as a xml file & " The XML page cannot be displayed Can…

---

## [General question, HTTP post/upload system](https://www.ruby-forum.com/t/general-question-http-post-upload-system/134459)

<div class="topic-metadata">

**Author:** [@Berlin\_B](https://www.ruby-forum.com/u/Berlin_B)\
**Replies:** 2\
**Last updated:** [April 11, 2008, 2:20pm UTC](https://www.ruby-forum.com/t/general-question-http-post-upload-system/134459 "2008-04-11T14:20:41Z")

</div>

This is a general question; I want to be able to automatically upload binary files to rails and possibly return a XML response. I will send thousands of requests, is the basic upload functionality the best approach…

---

## [Routes.rb: can I use case-insensitive regular expressions?](https://www.ruby-forum.com/t/routes-rb-can-i-use-case-insensitive-regular-expressions/134494)

<div class="topic-metadata">

**Author:** [@akira](https://www.ruby-forum.com/u/akira)\
**Replies:** 0\
**Last updated:** [April 11, 2008, 12:02pm UTC](https://www.ruby-forum.com/t/routes-rb-can-i-use-case-insensitive-regular-expressions/134494 "2008-04-11T12:02:09Z")

</div>

Dear all, I have something like this in routes.rb: map.connect ‘:test’, :controller =\> ‘help’, :requirements =\> { :test =\> /apple/i } But then, the URL “/apple” works but “/APPLE” does not! Why doesn’t the i-for-cas…

---

## [When the Observer in ROR should be preferred?](https://www.ruby-forum.com/t/when-the-observer-in-ror-should-be-preferred/134493)

<div class="topic-metadata">

**Author:** [@rakesh](https://www.ruby-forum.com/u/rakesh)\
**Replies:** 0\
**Last updated:** [April 11, 2008, 11:59am UTC](https://www.ruby-forum.com/t/when-the-observer-in-ror-should-be-preferred/134493 "2008-04-11T11:59:49Z")

</div>

Hello, I am confusing when should the observer for the class should be created instead of preferring the controllers ?? Can anyone help me to come out from this confusion. Thanks & Regards Parsoya Rakesh

---

## [Runtime selection of Database](https://www.ruby-forum.com/t/runtime-selection-of-database/134492)

<div class="topic-metadata">

**Author:** [@rakesh](https://www.ruby-forum.com/u/rakesh)\
**Replies:** 0\
**Last updated:** [April 11, 2008, 11:56am UTC](https://www.ruby-forum.com/t/runtime-selection-of-database/134492 "2008-04-11T11:56:52Z")

</div>

Hi, I have created an application in which I would like to select database runtime. Actually I have created numbers of subdomains and as per the subdomain the database should be selected on the conditional base whate…

---

## [Jasper Reports in ROR](https://www.ruby-forum.com/t/jasper-reports-in-ror/134489)

<div class="topic-metadata">

**Author:** [@karthikeyan](https://www.ruby-forum.com/u/karthikeyan)\
**Replies:** 0\
**Last updated:** [April 11, 2008, 11:32am UTC](https://www.ruby-forum.com/t/jasper-reports-in-ror/134489 "2008-04-11T11:32:50Z")

</div>

Hi, I am exploring on integrating the jasper reports and ruby on rails. Please give the links to download the jasper reports and the related jar files. Does anybody have worked on this? If yes, what are the steps to …

---

## [Active Record Sessions only work on localhost](https://www.ruby-forum.com/t/active-record-sessions-only-work-on-localhost/134486)

<div class="topic-metadata">

**Author:** [@jarrold](https://www.ruby-forum.com/u/jarrold)\
**Replies:** 0\
**Last updated:** [April 11, 2008, 10:56am UTC](https://www.ruby-forum.com/t/active-record-sessions-only-work-on-localhost/134486 "2008-04-11T10:56:50Z")

</div>

Hi I was wondering if anyone else was having this problem or might know why its happening. I basically need to use AR sessions instead of the default pstore for sessions so I did the rake db:sessions:create to get the…

---

## [How to call javascript from a view](https://www.ruby-forum.com/t/how-to-call-javascript-from-a-view/134255)

<div class="topic-metadata">

**Author:** [@adi](https://www.ruby-forum.com/u/adi)\
**Replies:** 10\
**Last updated:** [April 11, 2008, 9:25am UTC](https://www.ruby-forum.com/t/how-to-call-javascript-from-a-view/134255 "2008-04-11T09:25:35Z")

</div>

" \<%= javascript\_include\_tag :defaults %\> \<% form\_tag ‘/chap\_two/index’ do %\> \<%= text\_field\_tag :address1, params\[:address1\] %\> \<%= text\_field\_tag :address2, params\[:address2\] %\> \<%= submit\_tag 'Sa…

---

## [Filtering find by values in associated models?](https://www.ruby-forum.com/t/filtering-find-by-values-in-associated-models/134263)

<div class="topic-metadata">

**Author:** [@Isak\_H](https://www.ruby-forum.com/u/Isak_H)\
**Replies:** 4\
**Last updated:** [April 11, 2008, 9:22am UTC](https://www.ruby-forum.com/t/filtering-find-by-values-in-associated-models/134263 "2008-04-11T09:22:39Z")

</div>

Given class Customer belongs\_to :invoice\_address, :class\_name =\> “Address”, … belongs\_to :delivery\_address, :class\_name =\> “Address”, … belongs\_to :contact, :class\_name =\> “Employee”, … end How would you go about f…

---

## [Editing error page content](https://www.ruby-forum.com/t/editing-error-page-content/134370)

<div class="topic-metadata">

**Author:** [@karthikragu](https://www.ruby-forum.com/u/karthikragu)\
**Replies:** 3\
**Last updated:** [April 11, 2008, 8:57am UTC](https://www.ruby-forum.com/t/editing-error-page-content/134370 "2008-04-11T08:57:26Z")

</div>

hi all, while creating a new row in a table called Employee if i enter wron inputs the error page comes likes this. 11 errors prohibited this employee from being saved There were problems with the following fiel…

---

## [Net::SMTPSyntaxError](https://www.ruby-forum.com/t/net-smtpsyntaxerror/134482)

<div class="topic-metadata">

**Author:** [@shikha](https://www.ruby-forum.com/u/shikha)\
**Replies:** 1\
**Last updated:** [April 11, 2008, 8:42am UTC](https://www.ruby-forum.com/t/net-smtpsyntaxerror/134482 "2008-04-11T08:42:21Z")

</div>

Hey guys, I want to send an email via ROR and I have put this code at the very end in the config/environment.rb file- ActionMailer::Base.delivery\_method = :smtp ActionMailer::Base.perform\_deliveries = true ActionMai…

---

## [Discussion Group & Chat Plugin](https://www.ruby-forum.com/t/discussion-group-chat-plugin/134477)

<div class="topic-metadata">

**Author:** [@btest](https://www.ruby-forum.com/u/btest)\
**Replies:** 1\
**Last updated:** [April 11, 2008, 8:37am UTC](https://www.ruby-forum.com/t/discussion-group-chat-plugin/134477 "2008-04-11T08:37:27Z")

</div>

Looking for advice to build a discussion group and chat functionality. Is there a plugin that exists for these or what is the approach to take to build this functionality. Thanks in advance.

---

## [Apache+FastCGI working dir problem](https://www.ruby-forum.com/t/apache-fastcgi-working-dir-problem/133664)

<div class="topic-metadata">

**Author:** [@seeah](https://www.ruby-forum.com/u/seeah)\
**Replies:** 3\
**Last updated:** [April 11, 2008, 8:33am UTC](https://www.ruby-forum.com/t/apache-fastcgi-working-dir-problem/133664 "2008-04-11T08:33:54Z")

</div>

I have an standard Apache2+mod\_fcgi+Rails layout. The application has a few of my own .rb files under /lib/ which I require in /config/ environment.rb. When running through Mongrel/Webrick, I can do require ‘lib/mylib…

---

## [Extending Bluecloth/Redcloth](https://www.ruby-forum.com/t/extending-bluecloth-redcloth/134404)

<div class="topic-metadata">

**Author:** [@spiderware](https://www.ruby-forum.com/u/spiderware)\
**Replies:** 5\
**Last updated:** [April 11, 2008, 8:09am UTC](https://www.ruby-forum.com/t/extending-bluecloth-redcloth/134404 "2008-04-11T08:09:27Z")

</div>

I’d like to extend bleucloth or redcloth to support custom tags, e.g. I want to use markup like this: \[pubmed:18332676\] which shall be extended to: Behav Pharmacol. 2008 Mar;19(2):121-128. Does anyone know, if this…

---

## [Strange behavior with lighttpd](https://www.ruby-forum.com/t/strange-behavior-with-lighttpd/134480)

<div class="topic-metadata">

**Author:** [@kyrre](https://www.ruby-forum.com/u/kyrre)\
**Replies:** 0\
**Last updated:** [April 11, 2008, 7:57am UTC](https://www.ruby-forum.com/t/strange-behavior-with-lighttpd/134480 "2008-04-11T07:57:23Z")

</div>

I got this strange problem with my Rails app here in lighttpd… sometimes it appears and sometimes it doesn’t. When it does appear, and I try to refresh it from Firefox, it won’t appear until I clear my cache. Huh? l…

---

## [Legacy db and hyphen on column name issue](https://www.ruby-forum.com/t/legacy-db-and-hyphen-on-column-name-issue/134475)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [April 11, 2008, 7:41am UTC](https://www.ruby-forum.com/t/legacy-db-and-hyphen-on-column-name-issue/134475 "2008-04-11T07:41:01Z")

</div>

Hi I have a table called active and another one called authreg I did a one to one relation but it turns out that one of this legacy database column name has an hyphen!!! “-” now im screw how can I tell rails to u…

---

## [Converting CMYK to RGB using \*magick](https://www.ruby-forum.com/t/converting-cmyk-to-rgb-using-magick/134458)

<div class="topic-metadata">

**Author:** [@jfaulkenberry](https://www.ruby-forum.com/u/jfaulkenberry)\
**Replies:** 2\
**Last updated:** [April 11, 2008, 6:24am UTC](https://www.ruby-forum.com/t/converting-cmyk-to-rgb-using-magick/134458 "2008-04-11T06:24:25Z")

</div>

Hi, Does anyone have any experience converting CMYK images to RGB/web using rmagick/mini\_magick/imagemagick? I’m finding that the resulting RGB images look completely different, they seem to have a green tinge… fyi, …

---

## [Memory Leaks](https://www.ruby-forum.com/t/memory-leaks/134469)

<div class="topic-metadata">

**Author:** [@balaji](https://www.ruby-forum.com/u/balaji)\
**Replies:** 0\
**Last updated:** [April 11, 2008, 5:58am UTC](https://www.ruby-forum.com/t/memory-leaks/134469 "2008-04-11T05:58:41Z")

</div>

I am looking for a tool which can be used to track memory leaks in a RoR app, i have my site running with Apache2, 20 instances of mongrel clusters on a windows 2003 server. I came across few tools like bleak\_house an…

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

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