# Rails

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

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

---

## [Rack error: bad body content](https://www.ruby-forum.com/t/rack-error-bad-body-content/189316)

<div class="topic-metadata">

**Author:** [@ssk](https://www.ruby-forum.com/u/ssk)\
**Replies:** 0\
**Last updated:** [May 28, 2010, 4:51pm UTC](https://www.ruby-forum.com/t/rack-error-bad-body-content/189316 "2010-05-28T16:51:17Z")

</div>

Hi, I get an error like the following. /!\\ FAILSAFE /!\\ 05/27/2010 12:50 Status: 500 Internal Server Error bad content body /usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/utils.rb:319:in \`parse\_multipart’ It hap…

---

## [Ajax submit: Clicking 'Submit' vs. hitting ENTER](https://www.ruby-forum.com/t/ajax-submit-clicking-submit-vs-hitting-enter/189268)

<div class="topic-metadata">

**Author:** [@tharrisx](https://www.ruby-forum.com/u/tharrisx)\
**Replies:** 7\
**Last updated:** [May 28, 2010, 4:40pm UTC](https://www.ruby-forum.com/t/ajax-submit-clicking-submit-vs-hitting-enter/189268 "2010-05-28T16:40:11Z")

</div>

Hi there, Has anyone an idea why the below form submits correctly when I click the ‘Submit’ button but does call the ‘new’ action instead of ‘create’ when I hit ENTER? \<% form\_remote\_tag :html =\> { :action =\> url\_for…

---

## [Link\_to pmultiple parameters](https://www.ruby-forum.com/t/link-to-pmultiple-parameters/189313)

<div class="topic-metadata">

**Author:** [@doubidoo](https://www.ruby-forum.com/u/doubidoo)\
**Replies:** 1\
**Last updated:** [May 28, 2010, 4:35pm UTC](https://www.ruby-forum.com/t/link-to-pmultiple-parameters/189313 "2010-05-28T16:35:59Z")

</div>

Hi everybody! I’m new to this wondeful world that Ruby On Rails is. I’m trying to pass multiple parameters using link\_to, but i don’t even know if it’s possible. Here’s the code in where the link\_to is used :

---

## [Console ThreadError ("thread ... tried to join itself")](https://www.ruby-forum.com/t/console-threaderror-thread-tried-to-join-itself/188325)

<div class="topic-metadata">

**Author:** [@mattn](https://www.ruby-forum.com/u/mattn)\
**Replies:** 2\
**Last updated:** [May 28, 2010, 4:07pm UTC](https://www.ruby-forum.com/t/console-threaderror-thread-tried-to-join-itself/188325 "2010-05-28T16:07:21Z")

</div>

I’m just getting started with Rails 2 and I’ve immediately hit a problem in the console. This must be well known so perhaps someone could just tell me the solution. mattleopard$ script/console Loading development env…

---

## [Working with method from controller in button](https://www.ruby-forum.com/t/working-with-method-from-controller-in-button/189310)

<div class="topic-metadata">

**Author:** [@saschap](https://www.ruby-forum.com/u/saschap)\
**Replies:** 0\
**Last updated:** [May 28, 2010, 4:06pm UTC](https://www.ruby-forum.com/t/working-with-method-from-controller-in-button/189310 "2010-05-28T16:06:34Z")

</div>

Hi. I’m new to ror. I would like to refresh the data in the index view. To do this, i wanted to use a button. I also want to limit the data in the index view with the conditions parameter. I want to use this with an…

---

## [Rake Aborted! db:migrate](https://www.ruby-forum.com/t/rake-aborted-db-migrate/189311)

<div class="topic-metadata">

**Author:** [@distriker](https://www.ruby-forum.com/u/distriker)\
**Replies:** 0\
**Last updated:** [May 28, 2010, 3:20pm UTC](https://www.ruby-forum.com/t/rake-aborted-db-migrate/189311 "2010-05-28T15:20:30Z")

</div>

Hello, I am trying do a migrate of my database but I have problems, I write this in the console: \[console\] rake db:migrate \[/console\] And say me: \[console\] (in /home/distriker/Documentos/public\_html/crf) !!! The …

---

## [Strange behaviour in 'and' with params](https://www.ruby-forum.com/t/strange-behaviour-in-and-with-params/189304)

<div class="topic-metadata">

**Author:** [@spitfire](https://www.ruby-forum.com/u/spitfire)\
**Replies:** 2\
**Last updated:** [May 28, 2010, 3:14pm UTC](https://www.ruby-forum.com/t/strange-behaviour-in-and-with-params/189304 "2010-05-28T15:14:30Z")

</div>

I need to convert the user\_param HashWithIndifferentAccess in simple Hash (to convert it in YAML) I noticed a weird behavior: Why if I use (in a controller): user\_params = (params\[:user\_param\].to\_hash) user\_params i…

---

## [Question on Rails 3 : forms && ORM && ActiveModel](https://www.ruby-forum.com/t/question-on-rails-3-forms-orm-activemodel/189236)

<div class="topic-metadata">

**Author:** [@Alexandru\_N](https://www.ruby-forum.com/u/Alexandru_N)\
**Replies:** 1\
**Last updated:** [May 28, 2010, 2:57pm UTC](https://www.ruby-forum.com/t/question-on-rails-3-forms-orm-activemodel/189236 "2010-05-28T14:57:41Z")

</div>

I’m a Django/Catalyst user that’s evaluating Rails … I need a Ruby framework, and I’m trying to see if learning Rails is worth it or I should just go for Sinatra + various libs available. Django has a couple of things…

---

## [Globbing for map.resources?](https://www.ruby-forum.com/t/globbing-for-map-resources/189308)

<div class="topic-metadata">

**Author:** [@andreas](https://www.ruby-forum.com/u/andreas)\
**Replies:** 0\
**Last updated:** [May 28, 2010, 2:27pm UTC](https://www.ruby-forum.com/t/globbing-for-map-resources/189308 "2010-05-28T14:27:50Z")

</div>

Hey Is there any way to use globbing for routes with map.resources? I want a url to fetch multiple records at a time with my show action. Something like this: /photos/1/2/3/…/ Regards, Andreas Falk

---

## [Div updating on checking a radio button](https://www.ruby-forum.com/t/div-updating-on-checking-a-radio-button/189307)

<div class="topic-metadata">

**Author:** [@swetha](https://www.ruby-forum.com/u/swetha)\
**Replies:** 0\
**Last updated:** [May 28, 2010, 1:46pm UTC](https://www.ruby-forum.com/t/div-updating-on-checking-a-radio-button/189307 "2010-05-28T13:46:51Z")

</div>

I have a problem in updating a div ,when a radio is checked. new.html.erb \<% form\_for @account, :url =\> account\_path do |f| %\> \<%= f.error\_messages %\> \<%= render :partial =\> "form", :object =\> f %\> \<%= f.submit …

---

## [Find last entry from each category](https://www.ruby-forum.com/t/find-last-entry-from-each-category/188329)

<div class="topic-metadata">

**Author:** [@mudge](https://www.ruby-forum.com/u/mudge)\
**Replies:** 2\
**Last updated:** [May 28, 2010, 1:04pm UTC](https://www.ruby-forum.com/t/find-last-entry-from-each-category/188329 "2010-05-28T13:04:07Z")

</div>

Hi, can anybody help me with to specify a SQL-statement which should do following: Example table (published\_at is a DateTime field) id | content | published\_at | author\_id 1 | foo | 2010 | 1 2 | foo …

---

## [Dynamically generating subdomains using subdomain-fu](https://www.ruby-forum.com/t/dynamically-generating-subdomains-using-subdomain-fu/189305)

<div class="topic-metadata">

**Author:** [@swetha](https://www.ruby-forum.com/u/swetha)\
**Replies:** 0\
**Last updated:** [May 28, 2010, 12:45pm UTC](https://www.ruby-forum.com/t/dynamically-generating-subdomains-using-subdomain-fu/189305 "2010-05-28T12:45:58Z")

</div>

hi, I am using subdomain-fu for creating subdomains . My doubt is how can we give the subdomains in the etc/hosts ,when the sub-domains are dynamicallybeing created. Ex: i created a subdomain called “user1” and i …

---

## [Juggernaut hangs? Workaround?](https://www.ruby-forum.com/t/juggernaut-hangs-workaround/189184)

<div class="topic-metadata">

**Author:** [@hostep](https://www.ruby-forum.com/u/hostep)\
**Replies:** 3\
**Last updated:** [May 28, 2010, 11:52am UTC](https://www.ruby-forum.com/t/juggernaut-hangs-workaround/189184 "2010-05-28T11:52:28Z")

</div>

Hi guys I am using Juggernaut to broker a multi party chat service. For some reason it seems to hang often. I have isolated the hangs to the following line of code: def isloggedin? return !Juggernaut.show\_client(sel…

---

## [Creating a report generator within a mysql database to be read on rails](https://www.ruby-forum.com/t/creating-a-report-generator-within-a-mysql-database-to-be-read-on-rails/189281)

<div class="topic-metadata">

**Author:** [@jraglin](https://www.ruby-forum.com/u/jraglin)\
**Replies:** 2\
**Last updated:** [May 28, 2010, 11:36am UTC](https://www.ruby-forum.com/t/creating-a-report-generator-within-a-mysql-database-to-be-read-on-rails/189281 "2010-05-28T11:36:54Z")

</div>

Hello, My issue is that I am creating a database in MySQL and needing to export the information in automatically generated reports (.csv), into a web application written in Rails. Does anyone have any advice or tutor…

---

## [How to have \*\_url generate urls with https:// protocol](https://www.ruby-forum.com/t/how-to-have-url-generate-urls-with-https-protocol/189254)

<div class="topic-metadata">

**Author:** [@errolsiegel](https://www.ruby-forum.com/u/errolsiegel)\
**Replies:** 6\
**Last updated:** [May 28, 2010, 11:36am UTC](https://www.ruby-forum.com/t/how-to-have-url-generate-urls-with-https-protocol/189254 "2010-05-28T11:36:54Z")

</div>

Hello, I accidentally posted this to the “Ruby” forum when it should have gone here – sorry. I am using \*\_path in views and \*\_url in controllers (with redirect\_to, for example). It is my understanding that this is g…

---

## [Packaging of gems in app dir](https://www.ruby-forum.com/t/packaging-of-gems-in-app-dir/189303)

<div class="topic-metadata">

**Author:** [@miked](https://www.ruby-forum.com/u/miked)\
**Replies:** 0\
**Last updated:** [May 28, 2010, 11:27am UTC](https://www.ruby-forum.com/t/packaging-of-gems-in-app-dir/189303 "2010-05-28T11:27:42Z")

</div>

Hi, I have got the source code of one of my clients, which has the “gems” directory in the vendor folder where all app gems are installed. Can anyone tell me how to do that? Thanks, Mike

---

## [Cookie has key/value pairs and lost order after JSON decode](https://www.ruby-forum.com/t/cookie-has-key-value-pairs-and-lost-order-after-json-decode/189297)

<div class="topic-metadata">

**Author:** [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Replies:** 1\
**Last updated:** [May 28, 2010, 10:09am UTC](https://www.ruby-forum.com/t/cookie-has-key-value-pairs-and-lost-order-after-json-decode/189297 "2010-05-28T10:09:41Z")

</div>

If a cookie has several items, and is encoded as JSON text as the value of the cookie, the order is actually apparent in the cookie’s text But if JSON.decode is used: ActiveSupport::JSON.decode(cookies\[‘item\_list’\]) a…

---

## [Generator Documentation](https://www.ruby-forum.com/t/generator-documentation/189238)

<div class="topic-metadata">

**Author:** [@James\_Nelson](https://www.ruby-forum.com/u/James_Nelson)\
**Replies:** 3\
**Last updated:** [May 28, 2010, 9:29am UTC](https://www.ruby-forum.com/t/generator-documentation/189238 "2010-05-28T09:29:19Z")

</div>

Hi, I’m new to this list so sorry if i’m posting in the wrong place. I’ve just been looking through documentations for generators, as I’ve been trying to make a rails template for the various projects I’m doing now. …

---

## [A few questions before i start to programm](https://www.ruby-forum.com/t/a-few-questions-before-i-start-to-programm/189204)

<div class="topic-metadata">

**Author:** [@roelof](https://www.ruby-forum.com/u/roelof)\
**Replies:** 6\
**Last updated:** [May 28, 2010, 9:26am UTC](https://www.ruby-forum.com/t/a-few-questions-before-i-start-to-programm/189204 "2010-05-28T09:26:58Z")

</div>

Hello, I want to learn ruby. As a learning experience I want to write a programm which people can put the results of games in a tournament. The programm produces which team is first and so on. My question is : Ar…

---

## [NoMethodError: You have a nil object when you didn't expect](https://www.ruby-forum.com/t/nomethoderror-you-have-a-nil-object-when-you-didnt-expect/189298)

<div class="topic-metadata">

**Author:** [@jmanivannancse](https://www.ruby-forum.com/u/jmanivannancse)\
**Replies:** 0\
**Last updated:** [May 28, 2010, 9:20am UTC](https://www.ruby-forum.com/t/nomethoderror-you-have-a-nil-object-when-you-didnt-expect/189298 "2010-05-28T09:20:32Z")

</div>

Hi, I have tried to use searchlogic in my application… in def index, @search = AccounDetail.search(params\[:search\]) @account\_details = @search.all In index.rhtml \<%form\_for @search do |f|%\> \<%=f.label :name…

---

## [NoMethodError: You have a nil object when you didn't expect](https://www.ruby-forum.com/t/nomethoderror-you-have-a-nil-object-when-you-didnt-expect/189250)

<div class="topic-metadata">

**Author:** [@jmanivannancse](https://www.ruby-forum.com/u/jmanivannancse)\
**Replies:** 3\
**Last updated:** [May 28, 2010, 8:52am UTC](https://www.ruby-forum.com/t/nomethoderror-you-have-a-nil-object-when-you-didnt-expect/189250 "2010-05-28T08:52:25Z")

</div>

Hi, I have tried to use searchlogic in my application… in def index, @search = AccounDetail.search(params\[:search\]) @account\_details = @search.all In index.rhtml \<%form\_for @search do |f|%\> \<%=f.label :name…

---

## [Rails 3 Error:uninitialized constant ActiveResource::Base](https://www.ruby-forum.com/t/rails-3-error-uninitialized-constant-activeresource-base/197043)

<div class="topic-metadata">

**Author:** [@DmitryPush](https://www.ruby-forum.com/u/DmitryPush)\
**Replies:** 3\
**Last updated:** [May 28, 2010, 7:48am UTC](https://www.ruby-forum.com/t/rails-3-error-uninitialized-constant-activeresource-base/197043 "2010-05-28T07:48:02Z")

</div>

I’v just install rails3 for try it out. I was following “getting started guide”: rm public/index.html, change routes… and then i try to open page i’v got an error. OS: ubunto 10.04 Rails info: dpush@dpush-desktop:…

---

## [Add textbox dymamically](https://www.ruby-forum.com/t/add-textbox-dymamically/189263)

<div class="topic-metadata">

**Author:** [@drk](https://www.ruby-forum.com/u/drk)\
**Replies:** 7\
**Last updated:** [May 28, 2010, 7:32am UTC](https://www.ruby-forum.com/t/add-textbox-dymamically/189263 "2010-05-28T07:32:18Z")

</div>

Hii I need to add textbox dynamically when I click “Add” button. On clicking on button the textboxes are to be displayed one below the other. I enter different text in different textboxes, when clicked submit button…

---

## [Rails and JSON example?](https://www.ruby-forum.com/t/rails-and-json-example/189292)

<div class="topic-metadata">

**Author:** [@ralphshnelvar](https://www.ruby-forum.com/u/ralphshnelvar)\
**Replies:** 0\
**Last updated:** [May 28, 2010, 5:20am UTC](https://www.ruby-forum.com/t/rails-and-json-example/189292 "2010-05-28T05:20:09Z")

</div>

Does anyone know of a demo or tutorial in which … (1) In a browser some data is packaged up using JSON. (2) an async request is sent to a rails app sending the JSON data. I would like this to be done via jQuery. (3)…

---

## [Rails 3 telling me route doesn't exist](https://www.ruby-forum.com/t/rails-3-telling-me-route-doesnt-exist/189218)

<div class="topic-metadata">

**Author:** [@b1gtuna](https://www.ruby-forum.com/u/b1gtuna)\
**Replies:** 4\
**Last updated:** [May 28, 2010, 3:50am UTC](https://www.ruby-forum.com/t/rails-3-telling-me-route-doesnt-exist/189218 "2010-05-28T03:50:27Z")

</div>

– category.rb class Category \< ActiveRecord::Base has\_many :subcategories validates\_presence\_of :name validates\_uniqueness\_of :name end – subcategory.rb class Subcategory \< ActiveRecord::Base belongs\_to :category …

---

## [Safebuffer with rails 2.3.8](https://www.ruby-forum.com/t/safebuffer-with-rails-2-3-8/189186)

<div class="topic-metadata">

**Author:** [@LoSSSSc\_Guitaut](https://www.ruby-forum.com/u/LoSSSSc_Guitaut)\
**Replies:** 3\
**Last updated:** [May 28, 2010, 12:30am UTC](https://www.ruby-forum.com/t/safebuffer-with-rails-2-3-8/189186 "2010-05-28T00:30:15Z")

</div>

Hi there! I’ve just migrated from rails 2.3.5 to 2.3.8 and now I have a lot (and I mean a lot!) of deprecation warnings like this one: “DEPRECATION WARNING: ActionView::SafeBuffer is deprecated! Use ActiveSupport::Sa…

---

## [Has\_many :through association not working properly](https://www.ruby-forum.com/t/has-many-through-association-not-working-properly/189270)

<div class="topic-metadata">

**Author:** [@chewmanfoo](https://www.ruby-forum.com/u/chewmanfoo)\
**Replies:** 2\
**Last updated:** [May 27, 2010, 11:17pm UTC](https://www.ruby-forum.com/t/has-many-through-association-not-working-properly/189270 "2010-05-27T23:17:40Z")

</div>

ISSUE: The host has 3 ip addresses on two networks (#62 is repeated) How do I get host.networks to return only the two networks? host =\> #\<NetworkHost id: 923, name: “ota-app1”, os\_id: 1, feature\_id: nil, descript…

---

## [Validating with Encryption](https://www.ruby-forum.com/t/validating-with-encryption/189164)

<div class="topic-metadata">

**Author:** [@tashfeen.ekram](https://www.ruby-forum.com/u/tashfeen.ekram)\
**Replies:** 7\
**Last updated:** [May 27, 2010, 11:00pm UTC](https://www.ruby-forum.com/t/validating-with-encryption/189164 "2010-05-27T23:00:55Z")

</div>

I am encrypting data mainly email addresses. I would like to use the validations built into rails however I am not sure how to do that given that the actual data stored in the database is an encrypted version. i would…

---

## [Collection.last does not seem to jive with collection.count after collection.build](https://www.ruby-forum.com/t/collection-last-does-not-seem-to-jive-with-collection-count-after-collection-build/189266)

<div class="topic-metadata">

**Author:** [@dee](https://www.ruby-forum.com/u/dee)\
**Replies:** 2\
**Last updated:** [May 27, 2010, 10:35pm UTC](https://www.ruby-forum.com/t/collection-last-does-not-seem-to-jive-with-collection-count-after-collection-build/189266 "2010-05-27T22:35:31Z")

</div>

I was just trying to write a “smart” copy method in a class\* and noticed that the last and count collection methods don’t work the same after build and before save. In other words, if in my code I do this: user = User…

---

## [Validating and using Kernal.System](https://www.ruby-forum.com/t/validating-and-using-kernal-system/189259)

<div class="topic-metadata">

**Author:** [@anon\_comp](https://www.ruby-forum.com/u/anon_comp)\
**Replies:** 7\
**Last updated:** [May 27, 2010, 9:55pm UTC](https://www.ruby-forum.com/t/validating-and-using-kernal-system/189259 "2010-05-27T21:55:41Z")

</div>

Ok so I have a RoR project that seems to be…unconventional lol I’m attempting to validate the name of the file and using Kernal.System to input the file in the system as a parameter. I’ve tried validates\_presence\_of, …

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

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