# Rails

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

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

---

## [How can i use ruby 1.8.4 when my host has 1.8.6 installed?](https://www.ruby-forum.com/t/how-can-i-use-ruby-1-8-4-when-my-host-has-1-8-6-installed/171450)

<div class="topic-metadata">

**Author:** [@bbqbaker](https://www.ruby-forum.com/u/bbqbaker)\
**Replies:** 3\
**Last updated:** [July 2, 2009, 7:56pm UTC](https://www.ruby-forum.com/t/how-can-i-use-ruby-1-8-4-when-my-host-has-1-8-6-installed/171450 "2009-07-02T19:56:47Z")

</div>

hi, my app seems to have broke due to the patched/upgraded ruby. has many polymorphs seems to get “stuck” when loading a model. the only that has changed is the ruby version on the host. my app works fine on my dev bo…

---

## [Language Translation](https://www.ruby-forum.com/t/language-translation/171424)

<div class="topic-metadata">

**Author:** [@avantec](https://www.ruby-forum.com/u/avantec)\
**Replies:** 3\
**Last updated:** [July 2, 2009, 7:27pm UTC](https://www.ruby-forum.com/t/language-translation/171424 "2009-07-02T19:27:26Z")

</div>

Hi All, Can anybody tell me how can i type regional languages like Hindi, Tamil, etc in a text area using virtual keyboard or something. Otherwise like Orkut, if I written something in English, it should automatically …

---

## [Ldap authentication in ROR](https://www.ruby-forum.com/t/ldap-authentication-in-ror/171451)

<div class="topic-metadata">

**Author:** [@mushi](https://www.ruby-forum.com/u/mushi)\
**Replies:** 2\
**Last updated:** [July 2, 2009, 7:15pm UTC](https://www.ruby-forum.com/t/ldap-authentication-in-ror/171451 "2009-07-02T19:15:52Z")

</div>

Hi i am new to ROR and working on a project where i just want to authenticate a user against our active directory. if username and password is correct i want to store his full name in a session variable and then want…

---

## [Display Block Conditionally](https://www.ruby-forum.com/t/display-block-conditionally/170554)

<div class="topic-metadata">

**Author:** [@djames](https://www.ruby-forum.com/u/djames)\
**Replies:** 13\
**Last updated:** [July 2, 2009, 7:11pm UTC](https://www.ruby-forum.com/t/display-block-conditionally/170554 "2009-07-02T19:11:11Z")

</div>

I have seen a number of examples where HTML code is treated as a Ruby block. For example, here is one taken from the Agile Rails book: \<% content\_for( :sidebar) do %\> this text will be rendered and save…

---

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

<div class="topic-metadata">

**Author:** [@snusmu](https://www.ruby-forum.com/u/snusmu)\
**Replies:** 1\
**Last updated:** [July 2, 2009, 6:07pm UTC](https://www.ruby-forum.com/t/observe-field-and-on/171311 "2009-07-02T18:07:14Z")

</div>

Hi all, for some reason when i am using :on =\> “keyup”(or any other value) parameter for observe\_field, it doesn’t work at all. This code: \<%= text\_field\_tag :search\_for\_user,"" %\> \<%= observe\_field :search\_for\_user,…

---

## [Selected in select](https://www.ruby-forum.com/t/selected-in-select/171448)

<div class="topic-metadata">

**Author:** [@mistressjanna](https://www.ruby-forum.com/u/mistressjanna)\
**Replies:** 7\
**Last updated:** [July 2, 2009, 5:47pm UTC](https://www.ruby-forum.com/t/selected-in-select/171448 "2009-07-02T17:47:04Z")

</div>

I have a partial in my view which has a select box: \<% form\_for :channels, :html =\> {:name =\> ‘channelsform’},:url=\> { :action =\>“newchannel”, :controller =\>“channels”} do |f| %\> \<%= f.select(:id , Channel.find(:all, …

---

## [Big help with shared subdomains cookies](https://www.ruby-forum.com/t/big-help-with-shared-subdomains-cookies/171446)

<div class="topic-metadata">

**Author:** [@xdmx](https://www.ruby-forum.com/u/xdmx)\
**Replies:** 2\
**Last updated:** [July 2, 2009, 5:10pm UTC](https://www.ruby-forum.com/t/big-help-with-shared-subdomains-cookies/171446 "2009-07-02T17:10:15Z")

</div>

Hi, i need that all the subdomains of an app (using subdomain\_fu) use ‘.domain.com’ as domain for all cookies. I’ve set ActionController::Base.session\_options\[:domain\] = ‘.domain.com’ and it works…for just the session…

---

## [Apostrophe display issue in view file](https://www.ruby-forum.com/t/apostrophe-display-issue-in-view-file/171433)

<div class="topic-metadata">

**Author:** [@veeraa2003](https://www.ruby-forum.com/u/veeraa2003)\
**Replies:** 2\
**Last updated:** [July 2, 2009, 3:19pm UTC](https://www.ruby-forum.com/t/apostrophe-display-issue-in-view-file/171433 "2009-07-02T15:19:09Z")

</div>

Hi folks, I have some user name with Apostrophe, where these names are displayed in view files with some unwanted characters instead of Apostrophe. For example, Bottom’s Profile page is the original string and it is…

---

## [Rails Select Helper](https://www.ruby-forum.com/t/rails-select-helper/171422)

<div class="topic-metadata">

**Author:** [@newb](https://www.ruby-forum.com/u/newb)\
**Replies:** 1\
**Last updated:** [July 2, 2009, 3:08pm UTC](https://www.ruby-forum.com/t/rails-select-helper/171422 "2009-07-02T15:08:42Z")

</div>

Dear All, I m using the below select helper for my select helper which works fine. \<%=privilege. select :AC,Role.find(:all,:conditions =\> {:role\_type =\> “AC”}).collect {|c| \[ c.role\_name, c.id \] },{},{:class =\> “txtb…

---

## [I need some help](https://www.ruby-forum.com/t/i-need-some-help/171438)

<div class="topic-metadata">

**Author:** [@rajendra](https://www.ruby-forum.com/u/rajendra)\
**Replies:** 2\
**Last updated:** [July 2, 2009, 2:23pm UTC](https://www.ruby-forum.com/t/i-need-some-help/171438 "2009-07-02T14:23:41Z")

</div>

hi, i am new to the ruby on rails. i am trying to create one web application using ror, i created directory structure and started webrick server, after the when go for http://127.0.0.1:3000/, it gives the home page, a…

---

## [WEBrick bugs?](https://www.ruby-forum.com/t/webrick-bugs/171441)

<div class="topic-metadata">

**Author:** [@skywriter](https://www.ruby-forum.com/u/skywriter)\
**Replies:** 0\
**Last updated:** [July 2, 2009, 2:14pm UTC](https://www.ruby-forum.com/t/webrick-bugs/171441 "2009-07-02T14:14:55Z")

</div>

Greetings! Recently I’ve been stuck on a problem serving XML via SSL with WEBrick. First problem: whatever document I’ve been returning as a body, client never got more than 16k. With “keep\_alive = true” client just …

---

## [Plug-ins and naming conflict with application](https://www.ruby-forum.com/t/plug-ins-and-naming-conflict-with-application/171436)

<div class="topic-metadata">

**Author:** [@vikrant](https://www.ruby-forum.com/u/vikrant)\
**Replies:** 0\
**Last updated:** [July 2, 2009, 2:10pm UTC](https://www.ruby-forum.com/t/plug-ins-and-naming-conflict-with-application/171436 "2009-07-02T14:10:14Z")

</div>

If I name a model and controller of my plug-in ModelA and AController respectively, while main application also defines the same names, is there going to be any conflict? If yes, what is the standard convention of nam…

---

## [Why do CacheSweepers listen to the Controller](https://www.ruby-forum.com/t/why-do-cachesweepers-listen-to-the-controller/171420)

<div class="topic-metadata">

**Author:** [@gmoniey](https://www.ruby-forum.com/u/gmoniey)\
**Replies:** 1\
**Last updated:** [July 2, 2009, 1:19pm UTC](https://www.ruby-forum.com/t/why-do-cachesweepers-listen-to-the-controller/171420 "2009-07-02T13:19:34Z")

</div>

I must be missing something, but it seems that it would be best to have the sweeper listen to ActiveRecord, and have it expire caches on after\_save & after\_destroy.

---

## [Rails hyperthreading on Quad core](https://www.ruby-forum.com/t/rails-hyperthreading-on-quad-core/171425)

<div class="topic-metadata">

**Author:** [@kyalpani](https://www.ruby-forum.com/u/kyalpani)\
**Replies:** 8\
**Last updated:** [July 2, 2009, 12:57pm UTC](https://www.ruby-forum.com/t/rails-hyperthreading-on-quad-core/171425 "2009-07-02T12:57:35Z")

</div>

Hi, my video sharing website (politube.org) that I developed with rails, runs on lighttpd/fcgi (I know it is obsolete by now) and is severely under load and regularly blocks because the lighttpd process chews up 50% o…

---

## [Railroad and models without tables](https://www.ruby-forum.com/t/railroad-and-models-without-tables/171429)

<div class="topic-metadata">

**Author:** [@milo](https://www.ruby-forum.com/u/milo)\
**Replies:** 0\
**Last updated:** [July 2, 2009, 12:26pm UTC](https://www.ruby-forum.com/t/railroad-and-models-without-tables/171429 "2009-07-02T12:26:39Z")

</div>

I’d like to use railroad on my Rails model. Unfortunately, as I have to make some connections to a second database I’ve got some models like this: class LegacyDb \< ActiveRecord::Base establish\_connection “legacy\_db” …

---

## [Form\_for resources with :singular specified](https://www.ruby-forum.com/t/form-for-resources-with-singular-specified/171418)

<div class="topic-metadata">

**Author:** [@bryan-ash](https://www.ruby-forum.com/u/bryan-ash)\
**Replies:** 1\
**Last updated:** [July 2, 2009, 9:41am UTC](https://www.ruby-forum.com/t/form-for-resources-with-singular-specified/171418 "2009-07-02T09:41:31Z")

</div>

I fully suspect that I’m missing the point here somewhere so I promise I won’t be offended if you tell me I’m being daft. My application rents equipment … not equipments. So I have the following: map.resources :equi…

---

## [Login\_engine - rake migrate error, "ENGINE=InnoDB"](https://www.ruby-forum.com/t/login-engine-rake-migrate-error-engine-innodb/51953)

<div class="topic-metadata">

**Author:** [@brad](https://www.ruby-forum.com/u/brad)\
**Replies:** 7\
**Last updated:** [July 2, 2009, 9:16am UTC](https://www.ruby-forum.com/t/login-engine-rake-migrate-error-engine-innodb/51953 "2009-07-02T09:16:34Z")

</div>

Hi, I followed all the instructions at http://api.rails-engines.org/login\_engine/ and successfully installed and used the Login\_Engine with a local MySQL database instance. However, when I did exactly the same (sligh…

---

## [Config.load\_paths](https://www.ruby-forum.com/t/config-load-paths/171423)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 1\
**Last updated:** [July 2, 2009, 8:47am UTC](https://www.ruby-forum.com/t/config-load-paths/171423 "2009-07-02T08:47:23Z")

</div>

Hi As a part of rearranging the code I put my reports in the folder app/models/reports and loaded that using config.load\_paths Is there any performance issue in doing this? Is this the right approach? or I have to pu…

---

## [Complicated polymorphic relation](https://www.ruby-forum.com/t/complicated-polymorphic-relation/171199)

<div class="topic-metadata">

**Author:** [@korn900](https://www.ruby-forum.com/u/korn900)\
**Replies:** 12\
**Last updated:** [July 2, 2009, 8:18am UTC](https://www.ruby-forum.com/t/complicated-polymorphic-relation/171199 "2009-07-02T08:18:35Z")

</div>

Hi, I need to do a polymorphic association but i want to save the field XXX\_type in an other table, like that : Table: USERS id name Table: CITY id name Table: STATES id name Table: MANDATES id name place\_t…

---

## [How can I check form input before submit?](https://www.ruby-forum.com/t/how-can-i-check-form-input-before-submit/171356)

<div class="topic-metadata">

**Author:** [@youhaodeyi](https://www.ruby-forum.com/u/youhaodeyi)\
**Replies:** 10\
**Last updated:** [July 2, 2009, 4:49am UTC](https://www.ruby-forum.com/t/how-can-i-check-form-input-before-submit/171356 "2009-07-02T04:49:30Z")

</div>

I want to check user input in a form before submit. Is there a standard way to do this in Rails?

---

## [Creating a Hierarchical View](https://www.ruby-forum.com/t/creating-a-hierarchical-view/171323)

<div class="topic-metadata">

**Author:** [@djames](https://www.ruby-forum.com/u/djames)\
**Replies:** 8\
**Last updated:** [July 2, 2009, 2:53am UTC](https://www.ruby-forum.com/t/creating-a-hierarchical-view/171323 "2009-07-02T02:53:16Z")

</div>

I plan on creating a table of topics. The thing is that the topics are hierarchical in nature. That is, there may be any number of root topics. Each root topic can have other topics which would be like sub- topics;…

---

## [Valid RDFa in XHTML](https://www.ruby-forum.com/t/valid-rdfa-in-xhtml/170460)

<div class="topic-metadata">

**Author:** [@cephas](https://www.ruby-forum.com/u/cephas)\
**Replies:** 3\
**Last updated:** [July 2, 2009, 2:38am UTC](https://www.ruby-forum.com/t/valid-rdfa-in-xhtml/170460 "2009-07-02T02:38:05Z")

</div>

I am tying to create pages with RDFa. The two ways I have looked into is: Use builder to create the page Use the RDFa gem Works except that there are some things that I can’t seem to do with the Builder syntax …

---

## [Duration of session](https://www.ruby-forum.com/t/duration-of-session/171367)

<div class="topic-metadata">

**Author:** [@Xiahong\_G](https://www.ruby-forum.com/u/Xiahong_G)\
**Replies:** 2\
**Last updated:** [July 2, 2009, 1:42am UTC](https://www.ruby-forum.com/t/duration-of-session/171367 "2009-07-02T01:42:34Z")

</div>

Hi everyone, how to set the duration of a session? Does "ActionController::Base.session\_options\[:new\_session\] = … " work? Another question is if i am using database for session storage, when a session expires, will r…

---

## [Nested Forms - how to displayed the attributes content?](https://www.ruby-forum.com/t/nested-forms-how-to-displayed-the-attributes-content/171409)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 2\
**Last updated:** [July 2, 2009, 1:18am UTC](https://www.ruby-forum.com/t/nested-forms-how-to-displayed-the-attributes-content/171409 "2009-07-02T01:18:37Z")

</div>

I have a User model class User \< ActiveRecord::Base has\_one :account accepts\_nested\_attributes\_for :account, :allow\_destroy =\> true validates\_associated :account attr\_accessible :account\_attributes is working fine,…

---

## [ANN: Sortable, searchable, paginated plugin for rails](https://www.ruby-forum.com/t/ann-sortable-searchable-paginated-plugin-for-rails/171400)

<div class="topic-metadata">

**Author:** [@mrkohrea](https://www.ruby-forum.com/u/mrkohrea)\
**Replies:** 1\
**Last updated:** [July 2, 2009, 12:13am UTC](https://www.ruby-forum.com/t/ann-sortable-searchable-paginated-plugin-for-rails/171400 "2009-07-02T00:13:19Z")

</div>

Hi fellow rails enthusiasts. A few years ago I created a plugin for generating sortable tables in rails. Over the years I’ve since modified and updated that plugin. I just posted a blog posting on the new and improved…

---

## [Attachement\_fu width and height ratio](https://www.ruby-forum.com/t/attachement-fu-width-and-height-ratio/171408)

<div class="topic-metadata">

**Author:** [@shuaib85](https://www.ruby-forum.com/u/shuaib85)\
**Replies:** 1\
**Last updated:** [July 2, 2009, 12:10am UTC](https://www.ruby-forum.com/t/attachement-fu-width-and-height-ratio/171408 "2009-07-02T00:10:27Z")

</div>

Hi there I am wondering on how can i thumbnail the pictures height and width based on ratio let’s say that my design is limited to a fixed size. and I want to keep the image looks nice and not stretched. e.g. the wid…

---

## [Preview / edit form data in rails](https://www.ruby-forum.com/t/preview-edit-form-data-in-rails/113568)

<div class="topic-metadata">

**Author:** [@shybe](https://www.ruby-forum.com/u/shybe)\
**Replies:** 2\
**Last updated:** [July 1, 2009, 11:45pm UTC](https://www.ruby-forum.com/t/preview-edit-form-data-in-rails/113568 "2009-07-01T23:45:59Z")

</div>

Ok, I’m trying to have a form that when submitted redirects to a preview of the form data, with an option to edit, before finally commiting it to the database. I know this must involve sessions or cookies, Does anyone…

---

## [Nested Forms](https://www.ruby-forum.com/t/nested-forms/171395)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 2\
**Last updated:** [July 1, 2009, 6:59pm UTC](https://www.ruby-forum.com/t/nested-forms/171395 "2009-07-01T18:59:58Z")

</div>

I am using a nested form ( User has\_one Account … to hold profile data) to UPDATE my user/account data User model has\_one :account accepts\_nested\_attributes\_for :account, :allow\_destroy =\> true Account model bel…

---

## [Has\_many having another has\_many](https://www.ruby-forum.com/t/has-many-having-another-has-many/171397)

<div class="topic-metadata">

**Author:** [@dorelal](https://www.ruby-forum.com/u/dorelal)\
**Replies:** 1\
**Last updated:** [July 1, 2009, 6:45pm UTC](https://www.ruby-forum.com/t/has-many-having-another-has-many/171397 "2009-07-01T18:45:57Z")

</div>

A person has\_many cars. A car has\_many lights. Can I write a person has\_many lights? A snippet of code to help me understand will help.

---

## [Cannot install Rails version 1.2.5](https://www.ruby-forum.com/t/cannot-install-rails-version-1-2-5/171391)

<div class="topic-metadata">

**Author:** [@metaltree](https://www.ruby-forum.com/u/metaltree)\
**Replies:** 7\
**Last updated:** [July 1, 2009, 6:39pm UTC](https://www.ruby-forum.com/t/cannot-install-rails-version-1-2-5/171391 "2009-07-01T18:39:03Z")

</div>

We have an application that was developed under Rails 1.2.5, and will not work as it is on Rails 2.0 and above. However, when we try to install the earlier Rails version as follows, it forces the installation of v2.3.…

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

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