# Rails

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

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

---

## [Acts\_as\_tree? Heirarchy needed](https://www.ruby-forum.com/t/acts-as-tree-heirarchy-needed/155306)

<div class="topic-metadata">

**Author:** [@Iain\_A](https://www.ruby-forum.com/u/Iain_A)\
**Replies:** 0\
**Last updated:** [December 10, 2008, 1:10pm UTC](https://www.ruby-forum.com/t/acts-as-tree-heirarchy-needed/155306 "2008-12-10T13:10:58Z")

</div>

Hello, I have a problem that I thought I could solve with acts\_as\_tree but I’m thinking now that acts\_as\_tree doesn’t quite fit the bill. Basically I have a standard hierarchy with 1 difference: Node 1 \\ Leaf 1 \\ N…

---

## [Edit the form](https://www.ruby-forum.com/t/edit-the-form/155300)

<div class="topic-metadata">

**Author:** [@rbalaji](https://www.ruby-forum.com/u/rbalaji)\
**Replies:** 4\
**Last updated:** [December 10, 2008, 12:51pm UTC](https://www.ruby-forum.com/t/edit-the-form/155300 "2008-12-10T12:51:34Z")

</div>

Hi i used the code in editresortbasic.html.erb \<% form\_for @editresortbasic do %\> wizard controller.rb def editresortbasic @resort\_basic =ResortBasic.find\_by\_id(params\[:id\]) if request.post? @resort\_basic.update\_att…

---

## [\[ANN\] DiacriticsFu 1.0.1 released](https://www.ruby-forum.com/t/ann-diacriticsfu-1-0-1-released/154995)

<div class="topic-metadata">

**Author:** [@thbar](https://www.ruby-forum.com/u/thbar)\
**Replies:** 4\
**Last updated:** [December 10, 2008, 12:07pm UTC](https://www.ruby-forum.com/t/ann-diacriticsfu-1-0-1-released/154995 "2008-12-10T12:07:33Z")

</div>

Hi, DiacriticsFu is a gem that relies on ActiveSupport to remove accents and other diacritics from a string. I use it when I need to generate urls on non-english-speaking CMS or blogs. Release 1.0.1 brings support fo…

---

## [MySQL Error inserting blob](https://www.ruby-forum.com/t/mysql-error-inserting-blob/155290)

<div class="topic-metadata">

**Author:** [@farmerss](https://www.ruby-forum.com/u/farmerss)\
**Replies:** 6\
**Last updated:** [December 10, 2008, 12:05pm UTC](https://www.ruby-forum.com/t/mysql-error-inserting-blob/155290 "2008-12-10T12:05:13Z")

</div>

Hi, I’m trying to insert a blob into a MySQL database with a Rails app. I’m getting the error: ActiveRecord::StatementInvalid (Mysql::Error: MySQL server has gone away: INSERT INTO index\_entries (legal\_case\_id,docum…

---

## [SystemStackError: stack level too deep](https://www.ruby-forum.com/t/systemstackerror-stack-level-too-deep/84005)

<div class="topic-metadata">

**Author:** [@abon](https://www.ruby-forum.com/u/abon)\
**Replies:** 3\
**Last updated:** [December 10, 2008, 11:22am UTC](https://www.ruby-forum.com/t/systemstackerror-stack-level-too-deep/84005 "2008-12-10T11:22:35Z")

</div>

I’m testing the http module in console. BUt I got the following error. Anyone knows why? Net::HTTP.get\_print ‘www.google.com’, ‘index.html’ SystemStackError: stack level too deep from C:/InstantRails/ruby/lib/ruby…

---

## [Returning a record's ID before the record is made?!?](https://www.ruby-forum.com/t/returning-a-records-id-before-the-record-is-made/151498)

<div class="topic-metadata">

**Author:** [@mrkohrea](https://www.ruby-forum.com/u/mrkohrea)\
**Replies:** 4\
**Last updated:** [December 10, 2008, 11:13am UTC](https://www.ruby-forum.com/t/returning-a-records-id-before-the-record-is-made/151498 "2008-12-10T11:13:48Z")

</div>

I am new to Ruby, so apologies. I’m attempting to combine the input of two objects into one form. The objects are customer and registration. What concerns me is how will I be able to return the record ID of the cust…

---

## [Edit the form and produced Couldn't find ResortBasic without an ID](https://www.ruby-forum.com/t/edit-the-form-and-produced-couldnt-find-resortbasic-without-an-id/155199)

<div class="topic-metadata">

**Author:** [@rbalaji](https://www.ruby-forum.com/u/rbalaji)\
**Replies:** 5\
**Last updated:** [December 10, 2008, 10:40am UTC](https://www.ruby-forum.com/t/edit-the-form-and-produced-couldnt-find-resortbasic-without-an-id/155199 "2008-12-10T10:40:18Z")

</div>

Hi Im using the 5 views and one controller.To edit the form and produced Couldn’t find ResortBasic without an ID View code …editresortbasic.html.erb \<% form\_tag :action =\> ‘editresortbasic’,:controller=\>‘Wizard’ do …

---

## [Noob ? - Foreign Key](https://www.ruby-forum.com/t/noob-foreign-key/155293)

<div class="topic-metadata">

**Author:** [@Lewis\_Skolnick](https://www.ruby-forum.com/u/Lewis_Skolnick)\
**Replies:** 1\
**Last updated:** [December 10, 2008, 10:36am UTC](https://www.ruby-forum.com/t/noob-foreign-key/155293 "2008-12-10T10:36:12Z")

</div>

I am attempting to use scaffolding to create a simple foreign key example. But I am not quite understanding how rails writes data into the foreign table. When the “belongs\_to” and “has\_many” lines are added into mod…

---

## [Testing Doc down on Wiki?](https://www.ruby-forum.com/t/testing-doc-down-on-wiki/155294)

<div class="topic-metadata">

**Author:** [@livenotplastic](https://www.ruby-forum.com/u/livenotplastic)\
**Replies:** 1\
**Last updated:** [December 10, 2008, 10:13am UTC](https://www.ruby-forum.com/t/testing-doc-down-on-wiki/155294 "2008-12-10T10:13:58Z")

</div>

I’ve checked a few times over the past couple weeks, and this is down: http://manuals.rubyonrails.com/read/book/5 It’s linked from the main Testing Page at: http://wiki.rubyonrails.com/rails/pages/HowtosTesting I fig…

---

## [I am New to Ruby..Please Help me ON start](https://www.ruby-forum.com/t/i-am-new-to-ruby-please-help-me-on-start/155283)

<div class="topic-metadata">

**Author:** [@rohith](https://www.ruby-forum.com/u/rohith)\
**Replies:** 23\
**Last updated:** [December 10, 2008, 9:59am UTC](https://www.ruby-forum.com/t/i-am-new-to-ruby-please-help-me-on-start/155283 "2008-12-10T09:59:53Z")

</div>

Hello All… I am new to ruby… I have installed ruby 1.8.6 in my XP machine. Installed by Ruby one-click installer. And then i have installed Apache2 Webserver. Then tried with a testProgram in Run-\> cmd → rails testP…

---

## [\[JOBS\] Calling all Ruby on Rails and/or Oracle Application Express Gurus!](https://www.ruby-forum.com/t/jobs-calling-all-ruby-on-rails-and-or-oracle-application-express-gurus/155292)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [December 10, 2008, 9:56am UTC](https://www.ruby-forum.com/t/jobs-calling-all-ruby-on-rails-and-or-oracle-application-express-gurus/155292 "2008-12-10T09:56:22Z")

</div>

Are you NZ based (or in the process of relocating) and a Ruby on Rails and/or Oracle Application Express guru?? Then read on…… We are on the look out for people with the following technical skills ROR Developers: Ru…

---

## [Getting a real int from DB](https://www.ruby-forum.com/t/getting-a-real-int-from-db/155264)

<div class="topic-metadata">

**Author:** [@micktaiwan](https://www.ruby-forum.com/u/micktaiwan)\
**Replies:** 2\
**Last updated:** [December 10, 2008, 8:25am UTC](https://www.ruby-forum.com/t/getting-a-real-int-from-db/155264 "2008-12-10T08:25:12Z")

</div>

Hi, I have a User class with many projects : has\_many :projects, :through=\>:membership, :select =\> “memberships.active, projects.\*” The active field in the memberships table is an int. So why this works : def activ…

---

## [Rails Hosting](https://www.ruby-forum.com/t/rails-hosting/155192)

<div class="topic-metadata">

**Author:** [@Abhishek\_shukla](https://www.ruby-forum.com/u/Abhishek_shukla)\
**Replies:** 5\
**Last updated:** [December 10, 2008, 6:02am UTC](https://www.ruby-forum.com/t/rails-hosting/155192 "2008-12-10T06:02:51Z")

</div>

Hello Friends, Can you please help in finding a good rails hosting site. who can give a good technical support. Thanks Abhishek

---

## [Routing Error (javascript prob culprit)](https://www.ruby-forum.com/t/routing-error-javascript-prob-culprit/155284)

<div class="topic-metadata">

**Author:** [@david](https://www.ruby-forum.com/u/david)\
**Replies:** 0\
**Last updated:** [December 10, 2008, 5:58am UTC](https://www.ruby-forum.com/t/routing-error-javascript-prob-culprit/155284 "2008-12-10T05:58:45Z")

</div>

I am using the DOM popup kit to create modal popups and am having trouble getting popups to work in IE6 when they are not in my main layout view. When they are not in the main layout view the popups always display be…

---

## [I am New to ruby..Please Help me](https://www.ruby-forum.com/t/i-am-new-to-ruby-please-help-me/155281)

<div class="topic-metadata">

**Author:** [@rohith](https://www.ruby-forum.com/u/rohith)\
**Replies:** 0\
**Last updated:** [December 10, 2008, 5:32am UTC](https://www.ruby-forum.com/t/i-am-new-to-ruby-please-help-me/155281 "2008-12-10T05:32:49Z")

</div>

Hello All… I am new to ruby… I have installed ruby 1.8.6 in my XP machine. Installed by Ruby one-click installer. And then i have installed Apache2 Webserver. Then tried with a testProgram in Run-\> cmd → rails testP…

---

## [RESTful routing: allowing .s \[dots\] in ids](https://www.ruby-forum.com/t/restful-routing-allowing-s-dots-in-ids/155255)

<div class="topic-metadata">

**Author:** [@moredip](https://www.ruby-forum.com/u/moredip)\
**Replies:** 4\
**Last updated:** [December 10, 2008, 5:14am UTC](https://www.ruby-forum.com/t/restful-routing-allowing-s-dots-in-ids/155255 "2008-12-10T05:14:46Z")

</div>

Hi Folks, I’m trying to set up a RESTful route in my rails app and have hit a snag. My application allows various different types of querying centered around a search phrase, and I decided it’d be nice to that in my R…

---

## [Problem with Live Validation](https://www.ruby-forum.com/t/problem-with-live-validation/155279)

<div class="topic-metadata">

**Author:** [@selva\_rails](https://www.ruby-forum.com/u/selva_rails)\
**Replies:** 0\
**Last updated:** [December 10, 2008, 5:00am UTC](https://www.ruby-forum.com/t/problem-with-live-validation/155279 "2008-12-10T05:00:04Z")

</div>

This looks very strange for me. I have added Live validation to my project, but later I removed that from project due to some reason. I roll back to old version too. Now if I look at my file there is no code related t…

---

## [Find with add of an atttributes](https://www.ruby-forum.com/t/find-with-add-of-an-atttributes/155037)

<div class="topic-metadata">

**Author:** [@stratboy](https://www.ruby-forum.com/u/stratboy)\
**Replies:** 1\
**Last updated:** [December 10, 2008, 4:18am UTC](https://www.ruby-forum.com/t/find-with-add-of-an-atttributes/155037 "2008-12-10T04:18:47Z")

</div>

I have wrote this: EventDate.find(:all, :include =\> \[:container,{:event =\> \[:photo,:event\_type\_names\]},{:place=\>:location}\], :joins =\>" RIGHT JOIN (SELECT event\_dates.id,date\_add(event\_dates.date, INTERVAL i DAY ) A…

---

## [Validation errrors: how to get rid of "Validation failed: " and the Objects in them](https://www.ruby-forum.com/t/validation-errrors-how-to-get-rid-of-validation-failed-and-the-objects-in-them/155277)

<div class="topic-metadata">

**Author:** [@tyanlion](https://www.ruby-forum.com/u/tyanlion)\
**Replies:** 0\
**Last updated:** [December 10, 2008, 4:17am UTC](https://www.ruby-forum.com/t/validation-errrors-how-to-get-rid-of-validation-failed-and-the-objects-in-them/155277 "2008-12-10T04:17:02Z")

</div>

Hi when ever i do rescue Exception =\> e flash\[:error\] = e.message the e.message will always contain the “Validation error:” string and the Object Example: Validation failed: Price “message:”, Price “message” How do…

---

## [Ubiquity-rdoc, better rdoc searching](https://www.ruby-forum.com/t/ubiquity-rdoc-better-rdoc-searching/154850)

<div class="topic-metadata">

**Author:** [@Cipriani](https://www.ruby-forum.com/u/Cipriani)\
**Replies:** 5\
**Last updated:** [December 10, 2008, 4:14am UTC](https://www.ruby-forum.com/t/ubiquity-rdoc-better-rdoc-searching/154850 "2008-12-10T04:14:06Z")

</div>

Hi everyone, I wrote a set of Mozilla Ubiquity commands that allow the user to search on rdocs, also featuring autocomplete, load of any rdoc hosted on the web and changing the default rdoc when searching. The projec…

---

## [Optional route parameters for resource routes?](https://www.ruby-forum.com/t/optional-route-parameters-for-resource-routes/155259)

<div class="topic-metadata">

**Author:** [@benjohnson](https://www.ruby-forum.com/u/benjohnson)\
**Replies:** 1\
**Last updated:** [December 10, 2008, 3:43am UTC](https://www.ruby-forum.com/t/optional-route-parameters-for-resource-routes/155259 "2008-12-10T03:43:40Z")

</div>

I have the following URL: /images/1.jpg?size=500 Where images is a resource setup via map.resources :images. I want to take advantage of caching, and caching ignores parameters. So I need to make size optional in the…

---

## [Mac vs windows - why is windows soooo slow?](https://www.ruby-forum.com/t/mac-vs-windows-why-is-windows-soooo-slow/150155)

<div class="topic-metadata">

**Author:** [@ericgoodwin](https://www.ruby-forum.com/u/ericgoodwin)\
**Replies:** 17\
**Last updated:** [December 10, 2008, 2:19am UTC](https://www.ruby-forum.com/t/mac-vs-windows-why-is-windows-soooo-slow/150155 "2008-12-10T02:19:59Z")

</div>

I don’t really want this to turn into a heated discussion, Im just trying to figure out if Im somehow missing any dependencies or tweaks. I have a very beef dual dual-core computer with 4 gbs of ram, 500gb, and a real…

---

## [Opinion on Multiple forms on same page](https://www.ruby-forum.com/t/opinion-on-multiple-forms-on-same-page/155126)

<div class="topic-metadata">

**Author:** [@chirantan](https://www.ruby-forum.com/u/chirantan)\
**Replies:** 6\
**Last updated:** [December 10, 2008, 2:19am UTC](https://www.ruby-forum.com/t/opinion-on-multiple-forms-on-same-page/155126 "2008-12-10T02:19:23Z")

</div>

Hi, This is probably not the best place to post this question but I wanted to know whether using multiple form tags in the same view page should be avoided or it is not a problem? I have heard few people saying that …

---

## [Inserting many records into a database](https://www.ruby-forum.com/t/inserting-many-records-into-a-database/155128)

<div class="topic-metadata">

**Author:** [@farmerss](https://www.ruby-forum.com/u/farmerss)\
**Replies:** 2\
**Last updated:** [December 10, 2008, 2:12am UTC](https://www.ruby-forum.com/t/inserting-many-records-into-a-database/155128 "2008-12-10T02:12:45Z")

</div>

Hi, I want to insert many records into a database. If I do them one-by-one, it takes a long time. Does Rails have a method to optimize this – creating a single SQL command for many records, maybe? The entries I want …

---

## [Testing w/ Xapian and other off-line indexing search engines](https://www.ruby-forum.com/t/testing-w-xapian-and-other-off-line-indexing-search-engines/155161)

<div class="topic-metadata">

**Author:** [@Jeffrey\_LSTaylor](https://www.ruby-forum.com/u/Jeffrey_LSTaylor)\
**Replies:** 4\
**Last updated:** [December 10, 2008, 12:38am UTC](https://www.ruby-forum.com/t/testing-w-xapian-and-other-off-line-indexing-search-engines/155161 "2008-12-10T00:38:13Z")

</div>

I am running into problems testing with Xapian and Sphinx, both off-line index updating search engines (i.e., adding/changing an indexed record puts the re uest into a queue with the actual work done in a cronjob). …

---

## [Combining Purchases](https://www.ruby-forum.com/t/combining-purchases/155266)

<div class="topic-metadata">

**Author:** [@ernie](https://www.ruby-forum.com/u/ernie)\
**Replies:** 0\
**Last updated:** [December 9, 2008, 11:45pm UTC](https://www.ruby-forum.com/t/combining-purchases/155266 "2008-12-09T23:45:31Z")

</div>

I am able to combine purchase, however the quantity is not showing, any suggestions? Code: class Basket attr\_reader :purchases attr\_reader :total def initialize @purchases = \[\] @total = 0.0 end def add\_purchase…

---

## [Rails 2.2.2 session is failing in pstore using file\_field\_tag](https://www.ruby-forum.com/t/rails-2-2-2-session-is-failing-in-pstore-using-file-field-tag/155265)

<div class="topic-metadata">

**Author:** [@Deeg](https://www.ruby-forum.com/u/Deeg)\
**Replies:** 0\
**Last updated:** [December 9, 2008, 11:45pm UTC](https://www.ruby-forum.com/t/rails-2-2-2-session-is-failing-in-pstore-using-file-field-tag/155265 "2008-12-09T23:45:31Z")

</div>

When I try to upload a file using the file\_field\_tag I get the following exception (top 10 lines in the stack shown): /!\\ FAILSAFE /!\\ Tue Dec 09 17:11:12 -0500 2008 Status: 500 Internal Server Error End of file rea…

---

## [RESTful design advice](https://www.ruby-forum.com/t/restful-design-advice/155180)

<div class="topic-metadata">

**Author:** [@lunaclaire](https://www.ruby-forum.com/u/lunaclaire)\
**Replies:** 3\
**Last updated:** [December 9, 2008, 11:40pm UTC](https://www.ruby-forum.com/t/restful-design-advice/155180 "2008-12-09T23:40:49Z")

</div>

I’m currently in my first app desgined using REST and after reading a few tutorials the basics are pretty clear, but I have a design problem that I bet is common, but I’m not sure of the best approach… Here are my cla…

---

## [How to write functional tests for a nested route?](https://www.ruby-forum.com/t/how-to-write-functional-tests-for-a-nested-route/155261)

<div class="topic-metadata">

**Author:** [@oldbug](https://www.ruby-forum.com/u/oldbug)\
**Replies:** 0\
**Last updated:** [December 9, 2008, 10:30pm UTC](https://www.ruby-forum.com/t/how-to-write-functional-tests-for-a-nested-route/155261 "2008-12-09T22:30:22Z")

</div>

Starting from here: $ rails classic $ cd classic $ script/generate scaffold post title:string body:text $ rake db:migrate $ rake test (tests pass, as expected) $ script/generate scaffold comment post:belongs\_to bo…

---

## [Active record :find having an if statement inside the conditions](https://www.ruby-forum.com/t/active-record-find-having-an-if-statement-inside-the-conditions/155247)

<div class="topic-metadata">

**Author:** [@tyanlion](https://www.ruby-forum.com/u/tyanlion)\
**Replies:** 5\
**Last updated:** [December 9, 2008, 9:39pm UTC](https://www.ruby-forum.com/t/active-record-find-having-an-if-statement-inside-the-conditions/155247 "2008-12-09T21:39:11Z")

</div>

Hi, i was just wondering if its is possible to put a if statment inside the find conditions for example: grovery\_price = model.find(:first, :conditions =\> \[ “if x = ? then y must = ?”, 200, 300\] I have been googling…

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

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