# Rails

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

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

---

## [Restful\_authentication setup using aasm gem](https://www.ruby-forum.com/t/restful-authentication-setup-using-aasm-gem/166702)

<div class="topic-metadata">

**Author:** [@pk16](https://www.ruby-forum.com/u/pk16)\
**Replies:** 0\
**Last updated:** [April 28, 2009, 6:13pm UTC](https://www.ruby-forum.com/t/restful-authentication-setup-using-aasm-gem/166702 "2009-04-28T18:13:54Z")

</div>

Hi, I installed the restful\_authentication plugin using the aasm option instead of stateful and I can’t seem to get it working. I keep getting stating Event ‘register’ cannot transition from ‘pending’ it appears to b…

---

## [Direct Client Requirement for Ruby on Rails](https://www.ruby-forum.com/t/direct-client-requirement-for-ruby-on-rails/166697)

<div class="topic-metadata">

**Author:** [@skumar](https://www.ruby-forum.com/u/skumar)\
**Replies:** 1\
**Last updated:** [April 28, 2009, 6:03pm UTC](https://www.ruby-forum.com/t/direct-client-requirement-for-ruby-on-rails/166697 "2009-04-28T18:03:52Z")

</div>

Hi

---

## [TypeError Conversion on has\_many relationship](https://www.ruby-forum.com/t/typeerror-conversion-on-has-many-relationship/166698)

<div class="topic-metadata">

**Author:** [@niczm25](https://www.ruby-forum.com/u/niczm25)\
**Replies:** 0\
**Last updated:** [April 28, 2009, 5:16pm UTC](https://www.ruby-forum.com/t/typeerror-conversion-on-has-many-relationship/166698 "2009-04-28T17:16:25Z")

</div>

I have a couple of objects in a Rails app (“Ticket”, and “Comment”) class Ticket \< ActiveRecord::Base has\_many :attributes has\_many :comments end class Comment \< ActiveRecord::Base belongs\_to :ticket belongs…

---

## [Rendering images through JS in rails](https://www.ruby-forum.com/t/rendering-images-through-js-in-rails/166655)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [April 28, 2009, 5:13pm UTC](https://www.ruby-forum.com/t/rendering-images-through-js-in-rails/166655 "2009-04-28T17:13:29Z")

</div>

Hi, I am newbie to rails. I use an jquery ajax function to get some json data and have to render an image according to the result. say HTML: JS: if (true){ $(’#status’).html(\<%=IMAGE1%\>); } else{ $(’#status’)…

---

## [Contacts](https://www.ruby-forum.com/t/contacts/166664)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 6\
**Last updated:** [April 28, 2009, 4:55pm UTC](https://www.ruby-forum.com/t/contacts/166664 "2009-04-28T16:55:54Z")

</div>

Can anyone help me with a contact for Ruby on Rails? I really need to talk to them and I cannot find any details anywhere. Many thanks, Pip Watkins

---

## [Flash](https://www.ruby-forum.com/t/flash/100572)

<div class="topic-metadata">

**Author:** [@neha](https://www.ruby-forum.com/u/neha)\
**Replies:** 8\
**Last updated:** [April 28, 2009, 4:48pm UTC](https://www.ruby-forum.com/t/flash/100572 "2009-04-28T16:48:50Z")

</div>

Why is Flash important for session data?

---

## [Will the controller compiles the rjs only on ajax request?](https://www.ruby-forum.com/t/will-the-controller-compiles-the-rjs-only-on-ajax-request/166691)

<div class="topic-metadata">

**Author:** [@SSZSmSS](https://www.ruby-forum.com/u/SSZSmSS)\
**Replies:** 0\
**Last updated:** [April 28, 2009, 4:29pm UTC](https://www.ruby-forum.com/t/will-the-controller-compiles-the-rjs-only-on-ajax-request/166691 "2009-04-28T16:29:57Z")

</div>

will the controller compiles the rjs only on ajax request ? class xyzController \< … def ajax\_req ““This works fine “” “”“ajax\_req.rjs is not compiled””” end def non\_ajax\_req “”" non\_ajax\_req.rjs is not compiled""" …

---

## [Single Table Inheritance - Basic](https://www.ruby-forum.com/t/single-table-inheritance-basic/166680)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 4\
**Last updated:** [April 28, 2009, 4:25pm UTC](https://www.ruby-forum.com/t/single-table-inheritance-basic/166680 "2009-04-28T16:25:49Z")

</div>

Hi, I am struggling with a simple Single table Inheritance example. I have two models, generated as follows: script/generate scaffold Contact type:string created\_at:datetime updated\_at:datetime script/generate scaff…

---

## [Need help to add auto\_complete in Rails with Solr](https://www.ruby-forum.com/t/need-help-to-add-auto-complete-in-rails-with-solr/166692)

<div class="topic-metadata">

**Author:** [@manisha](https://www.ruby-forum.com/u/manisha)\
**Replies:** 0\
**Last updated:** [April 28, 2009, 4:18pm UTC](https://www.ruby-forum.com/t/need-help-to-add-auto-complete-in-rails-with-solr/166692 "2009-04-28T16:18:10Z")

</div>

I am working on a Rails project that needs to add auto\_complete feature. My rail application is also using Solr for text searching. I know that plugin auto\_complete can be used in the rails application to add the func…

---

## [Chmod in rails development](https://www.ruby-forum.com/t/chmod-in-rails-development/166668)

<div class="topic-metadata">

**Author:** [@milandobrota](https://www.ruby-forum.com/u/milandobrota)\
**Replies:** 1\
**Last updated:** [April 28, 2009, 4:05pm UTC](https://www.ruby-forum.com/t/chmod-in-rails-development/166668 "2009-04-28T16:05:47Z")

</div>

What chmod value I am supposed to use for rails app development? Is 777 a good idea? Or should I use sudo when I run my commands (such as script/server)?

---

## [Detect client session support](https://www.ruby-forum.com/t/detect-client-session-support/166686)

<div class="topic-metadata">

**Author:** [@alfredogz](https://www.ruby-forum.com/u/alfredogz)\
**Replies:** 0\
**Last updated:** [April 28, 2009, 3:17pm UTC](https://www.ruby-forum.com/t/detect-client-session-support/166686 "2009-04-28T15:17:49Z")

</div>

Hi,I have a simple question. WhatÂ´s the best way to detect if the client has session support?. I want to hide some functions of my web application to robots(seo stuff) and I would need to check in my controllers if t…

---

## [Toronto RoR Project Night returns May 7th](https://www.ruby-forum.com/t/toronto-ror-project-night-returns-may-7th/166683)

<div class="topic-metadata">

**Author:** [@Corina](https://www.ruby-forum.com/u/Corina)\
**Replies:** 0\
**Last updated:** [April 28, 2009, 3:03pm UTC](https://www.ruby-forum.com/t/toronto-ror-project-night-returns-may-7th/166683 "2009-04-28T15:03:20Z")

</div>

Toronto’s Ruby on Rails Project Night returns May 7th at the Rich Media Institute. Please join us as we look at: The Careerious.com rewrite (now clearfit.com) and show some seriously WTF C# code (and how to fix it) …

---

## [Radio buttons in forms](https://www.ruby-forum.com/t/radio-buttons-in-forms/166673)

<div class="topic-metadata">

**Author:** [@demec](https://www.ruby-forum.com/u/demec)\
**Replies:** 0\
**Last updated:** [April 28, 2009, 1:25pm UTC](https://www.ruby-forum.com/t/radio-buttons-in-forms/166673 "2009-04-28T13:25:21Z")

</div>

\<% form\_for @group do |g| %\> To create a new group please complete the details below \<p\> \<label\> Group Name \</label\> \<%= g.text\_field :name %\> \</p\> \<p\> \<label\> Public \</label\> \<%= g.radio\_button :type,…

---

## [How to test a controller that needs to be logged?](https://www.ruby-forum.com/t/how-to-test-a-controller-that-needs-to-be-logged/166669)

<div class="topic-metadata">

**Author:** [@kinunt](https://www.ruby-forum.com/u/kinunt)\
**Replies:** 0\
**Last updated:** [April 28, 2009, 1:03pm UTC](https://www.ruby-forum.com/t/how-to-test-a-controller-that-needs-to-be-logged/166669 "2009-04-28T13:03:50Z")

</div>

Hi, I know that I should use IntegrationTests to test flows of data. For example, when an action requires various controllers. My question is, if I can’t post to another controller from for example organizacions\_cont…

---

## [Routing: Unescape urls](https://www.ruby-forum.com/t/routing-unescape-urls/166565)

<div class="topic-metadata">

**Author:** [@edbond](https://www.ruby-forum.com/u/edbond)\
**Replies:** 3\
**Last updated:** [April 28, 2009, 12:53pm UTC](https://www.ruby-forum.com/t/routing-unescape-urls/166565 "2009-04-28T12:53:03Z")

</div>

Hello All, How to make rails unescape incoming urls? I want to use russian chars in routes, like: map.city URI.escape(“/ÐšÐ°Ñ€Ñ‚Ð°–:title–:id”), :controller =\> “cities”, :action =\> “show” It seems to works (page load…

---

## [Writing an imgae tag in to\_xml](https://www.ruby-forum.com/t/writing-an-imgae-tag-in-to-xml/166667)

<div class="topic-metadata">

**Author:** [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Replies:** 0\
**Last updated:** [April 28, 2009, 12:07pm UTC](https://www.ruby-forum.com/t/writing-an-imgae-tag-in-to-xml/166667 "2009-04-28T12:07:38Z")

</div>

Hi, I am trying to create an pdf report by using ruby jasper pages. For that I have written customer\_list.rxml file like this: xml.instruct! xml.customer\_list\_result do xml.invoice\_customers do @customers.each do |…

---

## [Ssh problem](https://www.ruby-forum.com/t/ssh-problem/166662)

<div class="topic-metadata">

**Author:** [@mahmoud\_cs](https://www.ruby-forum.com/u/mahmoud_cs)\
**Replies:** 0\
**Last updated:** [April 28, 2009, 10:52am UTC](https://www.ruby-forum.com/t/ssh-problem/166662 "2009-04-28T10:52:44Z")

</div>

I create my ssh keys by using Git Bash.exe and i copy the ssh file ,and ssh public keys file from my document and past them in authorized\_keys folder in ssh folder in the config folder i use deprec and capistrano to…

---

## [Observe\_field and habtm checkboxes](https://www.ruby-forum.com/t/observe-field-and-habtm-checkboxes/164245)

<div class="topic-metadata">

**Author:** [@enzor](https://www.ruby-forum.com/u/enzor)\
**Replies:** 1\
**Last updated:** [April 28, 2009, 10:24am UTC](https://www.ruby-forum.com/t/observe-field-and-habtm-checkboxes/164245 "2009-04-28T10:24:35Z")

</div>

Is possible to assign a observe\_field to an array of habtm checkboxes? right now, every checkboxes has id like “customer\[tiprod\_ids\]\[\]” , but if i create an observe field to check that id, only the first one works, th…

---

## [Rails2 Documetation](https://www.ruby-forum.com/t/rails2-documetation/166643)

<div class="topic-metadata">

**Author:** [@sfedi](https://www.ruby-forum.com/u/sfedi)\
**Replies:** 4\
**Last updated:** [April 28, 2009, 9:41am UTC](https://www.ruby-forum.com/t/rails2-documetation/166643 "2009-04-28T09:41:11Z")

</div>

Hello ! I started to learn the ruby on rails 2(!) and I have many problems with documentation. I’m new in this, and I don’t know difference between 1x and 2x versions of rails, oh , yes, I can see difference after see…

---

## [News site for ruby developers released](https://www.ruby-forum.com/t/news-site-for-ruby-developers-released/196952)

<div class="topic-metadata">

**Author:** [@logan](https://www.ruby-forum.com/u/logan)\
**Replies:** 0\
**Last updated:** [April 28, 2009, 9:40am UTC](https://www.ruby-forum.com/t/news-site-for-ruby-developers-released/196952 "2009-04-28T09:40:35Z")

</div>

You’re invited to be one of the first users to try out Newsforwhatyoudo.com - now in private beta. The site includes a news group specifically for Ruby and Rails developers - try it out with this ticket, good for the…

---

## [Travel Salesman Problem](https://www.ruby-forum.com/t/travel-salesman-problem/166571)

<div class="topic-metadata">

**Author:** [@artchrst](https://www.ruby-forum.com/u/artchrst)\
**Replies:** 5\
**Last updated:** [April 28, 2009, 9:31am UTC](https://www.ruby-forum.com/t/travel-salesman-problem/166571 "2009-04-28T09:31:46Z")

</div>

Hi Guys, I am going to solve the Travel Salesman problem: I wanna find out the shortest path to visit all cities in my site. But… I don’t know even where to start for it… (I am able to find out any distance between …

---

## [Validate\_uniqueness\_of and accented characters](https://www.ruby-forum.com/t/validate-uniqueness-of-and-accented-characters/166652)

<div class="topic-metadata">

**Author:** [@rubenrails](https://www.ruby-forum.com/u/rubenrails)\
**Replies:** 0\
**Last updated:** [April 28, 2009, 9:03am UTC](https://www.ruby-forum.com/t/validate-uniqueness-of-and-accented-characters/166652 "2009-04-28T09:03:05Z")

</div>

Hi, I’m trying to validate the uniqueness of a value that has accented characters (á, é, í, etc) and need rails to treat them as the original letters (a, e, i). For example, if a user tries to register himself using …

---

## [Migrating rails 2.2.2 to 2.3.2](https://www.ruby-forum.com/t/migrating-rails-2-2-2-to-2-3-2/166640)

<div class="topic-metadata">

**Author:** [@Don\_F](https://www.ruby-forum.com/u/Don_F)\
**Replies:** 2\
**Last updated:** [April 28, 2009, 8:59am UTC](https://www.ruby-forum.com/t/migrating-rails-2-2-2-to-2-3-2/166640 "2009-04-28T08:59:34Z")

</div>

I tried to just change the rails gem I use with my application and I got the following error: /usr/local/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/ active\_support/core\_ext/module/aliasing.rb:33:in alias\_meth…

---

## [Problem with SEO urls and the Find\_By\_ID() not working](https://www.ruby-forum.com/t/problem-with-seo-urls-and-the-find-by-id-not-working/166642)

<div class="topic-metadata">

**Author:** [@comtux](https://www.ruby-forum.com/u/comtux)\
**Replies:** 0\
**Last updated:** [April 28, 2009, 5:07am UTC](https://www.ruby-forum.com/t/problem-with-seo-urls-and-the-find-by-id-not-working/166642 "2009-04-28T05:07:26Z")

</div>

I have a problem where the app I am developing uses SEO friendly urls using the to\_params method. When using the the finder method find\_by\_id(‘13-Some-other-text’) it is not finding the record. The record is there. …

---

## [Introducing Pfeed plugin, automagically create fancy logs / activity updates in your rails app](https://www.ruby-forum.com/t/introducing-pfeed-plugin-automagically-create-fancy-logs-activity-updates-in-your-rails-app/166641)

<div class="topic-metadata">

**Author:** [@abhishek.parolkar](https://www.ruby-forum.com/u/abhishek.parolkar)\
**Replies:** 0\
**Last updated:** [April 28, 2009, 4:54am UTC](https://www.ruby-forum.com/t/introducing-pfeed-plugin-automagically-create-fancy-logs-activity-updates-in-your-rails-app/166641 "2009-04-28T04:54:00Z")

</div>

Hey All! I just pushed a plugin that brings little more simplicity to the way we create customizable logs, either for implementing activity feed feature or logging for monitoring purposes. Let me know your thoughts.…

---

## [Asynchronous SSH tasks](https://www.ruby-forum.com/t/asynchronous-ssh-tasks/166632)

<div class="topic-metadata">

**Author:** [@dangermoose](https://www.ruby-forum.com/u/dangermoose)\
**Replies:** 1\
**Last updated:** [April 28, 2009, 3:21am UTC](https://www.ruby-forum.com/t/asynchronous-ssh-tasks/166632 "2009-04-28T03:21:01Z")

</div>

I have managed to get copies working well between Windows and Linux but I noticed that the libraries allow Asynchronous operation. I can send Async commands and the loop till they complete but copies seem to stay bus…

---

## [Asynchronous copies](https://www.ruby-forum.com/t/asynchronous-copies/166549)

<div class="topic-metadata">

**Author:** [@pdenize](https://www.ruby-forum.com/u/pdenize)\
**Replies:** 1\
**Last updated:** [April 28, 2009, 3:19am UTC](https://www.ruby-forum.com/t/asynchronous-copies/166549 "2009-04-28T03:19:06Z")

</div>

I have managed to get copies working well between Windows and Linux but I noticed that the libraries allow Asynchronous operation. I can send Async commands and the loop till they complete but copies seem to stay bus…

---

## [Find eager loads correct records but generates excess queries (Rails 2.1)](https://www.ruby-forum.com/t/find-eager-loads-correct-records-but-generates-excess-queries-rails-2-1/166580)

<div class="topic-metadata">

**Author:** [@davidy](https://www.ruby-forum.com/u/davidy)\
**Replies:** 2\
**Last updated:** [April 28, 2009, 2:49am UTC](https://www.ruby-forum.com/t/find-eager-loads-correct-records-but-generates-excess-queries-rails-2-1/166580 "2009-04-28T02:49:48Z")

</div>

Models: S :has\_many F; F :belongs\_to P; S :has\_many P :through F. Query looks like this: S.find\_all\_by\_key(\[array of keys\], :include =\> \[:F, :P\]) This produces the correct and expected result, but very slowly. On the …

---

## [Is Amazon s3 always this slow?](https://www.ruby-forum.com/t/is-amazon-s3-always-this-slow/134636)

<div class="topic-metadata">

**Author:** [@chrisolsen](https://www.ruby-forum.com/u/chrisolsen)\
**Replies:** 2\
**Last updated:** [April 28, 2009, 2:38am UTC](https://www.ruby-forum.com/t/is-amazon-s3-always-this-slow/134636 "2009-04-28T02:38:49Z")

</div>

This is what I get in the log files when accessing a page with ~8 photos on it. Notice the big fat (Rendering: 6.42337 (97%) ) at the bottom. It can be seen that the https connection is continually opened and closed…

---

## [Website won't load](https://www.ruby-forum.com/t/website-wont-load/166613)

<div class="topic-metadata">

**Author:** [@terencepires](https://www.ruby-forum.com/u/terencepires)\
**Replies:** 1\
**Last updated:** [April 28, 2009, 2:06am UTC](https://www.ruby-forum.com/t/website-wont-load/166613 "2009-04-28T02:06:06Z")

</div>

Hi there, First of all, as i’m new here i would like to salute everybody on the forum. I’m a total Rails and Ruby newbie and had a hard time trying to set up a dev environment on my computer but now i’m done, thanks …

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

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