# Rails

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

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

---

## [HTML question](https://www.ruby-forum.com/t/html-question/156759)

<div class="topic-metadata">

**Author:** [@oldbug](https://www.ruby-forum.com/u/oldbug)\
**Replies:** 5\
**Last updated:** [January 2, 2009, 5:58pm UTC](https://www.ruby-forum.com/t/html-question/156759 "2009-01-02T17:58:34Z")

</div>

if you are offended by HTML questions on this list, please feel free to flame me off list. I would like to display a boolean value in my #index view as a checkbox that is checked when true and blank when not true. I…

---

## [Backgroundrb stops suddenly](https://www.ruby-forum.com/t/backgroundrb-stops-suddenly/156742)

<div class="topic-metadata">

**Author:** [@madhan](https://www.ruby-forum.com/u/madhan)\
**Replies:** 3\
**Last updated:** [January 2, 2009, 5:44pm UTC](https://www.ruby-forum.com/t/backgroundrb-stops-suddenly/156742 "2009-01-02T17:44:24Z")

</div>

hi, i have used backgroundrb to update the database with the files having some useful data, where i am getting files periodically uploaded. it works well, but suddenly it stops the worker and stopped the updation. w…

---

## [I need help with self referential habtm](https://www.ruby-forum.com/t/i-need-help-with-self-referential-habtm/156763)

<div class="topic-metadata">

**Author:** [@pipex](https://www.ruby-forum.com/u/pipex)\
**Replies:** 0\
**Last updated:** [January 2, 2009, 5:20pm UTC](https://www.ruby-forum.com/t/i-need-help-with-self-referential-habtm/156763 "2009-01-02T17:20:54Z")

</div>

Hello! I need some help with self referential habtm associations: I have a table inscripted and an inscripted may have a dependant, that works ok with this has\_and\_belongs\_to\_many :all\_friends, :class\_name =\> “Insc…

---

## [Condition LIKE with or for autocomplete](https://www.ruby-forum.com/t/condition-like-with-or-for-autocomplete/156725)

<div class="topic-metadata">

**Author:** [@pipex](https://www.ruby-forum.com/u/pipex)\
**Replies:** 3\
**Last updated:** [January 2, 2009, 5:00pm UTC](https://www.ruby-forum.com/t/condition-like-with-or-for-autocomplete/156725 "2009-01-02T17:00:57Z")

</div>

Hello! I need some help. I am doing an auto complete that hast to find result from a mysql database of some people if the text written in the text box matches the name or last name. It works if i only want to find m…

---

## [Need help DRYing this code](https://www.ruby-forum.com/t/need-help-drying-this-code/156718)

<div class="topic-metadata">

**Author:** [@devaulw](https://www.ruby-forum.com/u/devaulw)\
**Replies:** 2\
**Last updated:** [January 2, 2009, 4:31pm UTC](https://www.ruby-forum.com/t/need-help-drying-this-code/156718 "2009-01-02T16:31:51Z")

</div>

I am new to this and need some help DRYing this view code: drop task name Projects \<% for project in @projects %\> \<% project\_id = "project\_#{project.id}" %\> \<%=h project.name %\> \<% #TODO need to …

---

## [Collection\_select and select\_tag help](https://www.ruby-forum.com/t/collection-select-and-select-tag-help/156739)

<div class="topic-metadata">

**Author:** [@skirkpatrick](https://www.ruby-forum.com/u/skirkpatrick)\
**Replies:** 2\
**Last updated:** [January 2, 2009, 3:15pm UTC](https://www.ruby-forum.com/t/collection-select-and-select-tag-help/156739 "2009-01-02T15:15:01Z")

</div>

I have created the following select box which works fine except for the fact if you edit the item it defaults back to N/A instead of selecting the correct location. select\_tag(“item\[location\_id\]”, ‘N/A’ + options\_for…

---

## [Alias\_method](https://www.ruby-forum.com/t/alias-method/156753)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 1\
**Last updated:** [January 2, 2009, 2:33pm UTC](https://www.ruby-forum.com/t/alias-method/156753 "2009-01-02T14:33:13Z")

</div>

Hi Could anybody please explain what it is and how it used I have code like I did not understand what it means alias\_method :set\_layout\_options, :layout\_options= Sijo

---

## [Ansuz CMS](https://www.ruby-forum.com/t/ansuz-cms/156628)

<div class="topic-metadata">

**Author:** [@knewter](https://www.ruby-forum.com/u/knewter)\
**Replies:** 10\
**Last updated:** [January 2, 2009, 2:16pm UTC](https://www.ruby-forum.com/t/ansuz-cms/156628 "2009-01-02T14:16:11Z")

</div>

Hello everyone, I just wanted to introduce Ansuz (a rails-based Content Management System, sort of aiming for the wordpress-y space for the rails jet set). It’s BSD licensed, and you can find it at http://www.ansuzcm…

---

## [Automatically load subdirectories under app/models](https://www.ruby-forum.com/t/automatically-load-subdirectories-under-app-models/156633)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 4\
**Last updated:** [January 2, 2009, 12:27pm UTC](https://www.ruby-forum.com/t/automatically-load-subdirectories-under-app-models/156633 "2009-01-02T12:27:02Z")

</div>

Hi I have found the the below code in environment.rb Here used subdirectories to better organize files Dependencies.load\_paths += \[ File.join(RAILS\_ROOT, “app/models/Dir1”), File.join(RAILS\_ROOT, “app/models/Dir2”) …

---

## [Why are JS requests using layouts?](https://www.ruby-forum.com/t/why-are-js-requests-using-layouts/156674)

<div class="topic-metadata">

**Author:** [@benjohnson](https://www.ruby-forum.com/u/benjohnson)\
**Replies:** 1\
**Last updated:** [January 2, 2009, 12:23pm UTC](https://www.ruby-forum.com/t/why-are-js-requests-using-layouts/156674 "2009-01-02T12:23:31Z")

</div>

If I specify a layout in a controller: class MyController \< ApplicationController layout “some\_layout” end Any JS request will use the some\_layout. I thought certain requests types were exempt from layouts? When I r…

---

## [Interact on user-level possibly?](https://www.ruby-forum.com/t/interact-on-user-level-possibly/156751)

<div class="topic-metadata">

**Author:** [@remco](https://www.ruby-forum.com/u/remco)\
**Replies:** 0\
**Last updated:** [January 2, 2009, 12:13pm UTC](https://www.ruby-forum.com/t/interact-on-user-level-possibly/156751 "2009-01-02T12:13:57Z")

</div>

Hi, In our commerce-funnnel (step 1 \> 5) we have drop from 100%(1) to 2%(5). Clickstream: Adwords Visitor search for product (step1) Visitor compare suppliers (step2) Visitor makes decision (step3) Visitor fills i…

---

## [Link\_to\_remote can't replace specified element?](https://www.ruby-forum.com/t/link-to-remote-cant-replace-specified-element/156625)

<div class="topic-metadata">

**Author:** [@JHuizingh](https://www.ruby-forum.com/u/JHuizingh)\
**Replies:** 1\
**Last updated:** [January 2, 2009, 12:07pm UTC](https://www.ruby-forum.com/t/link-to-remote-cant-replace-specified-element/156625 "2009-01-02T12:07:41Z")

</div>

I’m having an issue with the design of my views that I can’t seem to wrap my head around. I have a page where I am showing a collection of objects in a list. The way that I designed it, it looked something like this…

---

## [Regarding checkbox](https://www.ruby-forum.com/t/regarding-checkbox/156748)

<div class="topic-metadata">

**Author:** [@napster](https://www.ruby-forum.com/u/napster)\
**Replies:** 0\
**Last updated:** [January 2, 2009, 11:09am UTC](https://www.ruby-forum.com/t/regarding-checkbox/156748 "2009-01-02T11:09:39Z")

</div>

hi guys i have a table with fields as type(id is default) and i am using checkbox here whenever user check any of these items(high,low,medium) it should store in db.tell me how to do in rails 2.0?

---

## [Searching for an entry in a one to one relationship](https://www.ruby-forum.com/t/searching-for-an-entry-in-a-one-to-one-relationship/156726)

<div class="topic-metadata">

**Author:** [@bhanub](https://www.ruby-forum.com/u/bhanub)\
**Replies:** 1\
**Last updated:** [January 2, 2009, 10:04am UTC](https://www.ruby-forum.com/t/searching-for-an-entry-in-a-one-to-one-relationship/156726 "2009-01-02T10:04:09Z")

</div>

1\] I had a “Patient” model which is in a one to one relationship with the “PersonName” model class Patient \< ActiveRecord::Base has\_one :person\_name end class PersonName \< ActiveRecord::Base belongs\_to :patient en…

---

## [XP + MySQL + Rails = migration weirdness?](https://www.ruby-forum.com/t/xp-mysql-rails-migration-weirdness/142954)

<div class="topic-metadata">

**Author:** [@arturaz](https://www.ruby-forum.com/u/arturaz)\
**Replies:** 5\
**Last updated:** [January 2, 2009, 9:48am UTC](https://www.ruby-forum.com/t/xp-mysql-rails-migration-weirdness/142954 "2009-01-02T09:48:21Z")

</div>

Hello. It seems I have come into uncommon situation here. I and my fellow dev have probably almost identical machines in terms of OS, SQLD, Ruby, Rails and gems… However, where in my system everything works fine, he …

---

## [Collection\_select not remembering selected value](https://www.ruby-forum.com/t/collection-select-not-remembering-selected-value/156738)

<div class="topic-metadata">

**Author:** [@snowbird122](https://www.ruby-forum.com/u/snowbird122)\
**Replies:** 2\
**Last updated:** [January 2, 2009, 9:28am UTC](https://www.ruby-forum.com/t/collection-select-not-remembering-selected-value/156738 "2009-01-02T09:28:27Z")

</div>

Hello- I have a form that I’m using form\_for on to bind the form to my order object. Within the form, I want to select a product (each order has one product, which makes this easy). In my order and product models, an…

---

## [Understand submit\_tag](https://www.ruby-forum.com/t/understand-submit-tag/156681)

<div class="topic-metadata">

**Author:** [@arachnd](https://www.ruby-forum.com/u/arachnd)\
**Replies:** 7\
**Last updated:** [January 2, 2009, 7:40am UTC](https://www.ruby-forum.com/t/understand-submit-tag/156681 "2009-01-02T07:40:12Z")

</div>

Hi everyone, I was following the book Agile Web D. with Rails 2Ed. by Dave Thomas. So, at some part of my studies, I decided to try to create my own application based on what I’ve learned… Now I’m in trouble in a si…

---

## [Create rxml file](https://www.ruby-forum.com/t/create-rxml-file/156734)

<div class="topic-metadata">

**Author:** [@brijesh](https://www.ruby-forum.com/u/brijesh)\
**Replies:** 0\
**Last updated:** [January 2, 2009, 7:37am UTC](https://www.ruby-forum.com/t/create-rxml-file/156734 "2009-01-02T07:37:47Z")

</div>

Hi All #controller: @users=User.find(:all,:conditions=\>\[“id=12”\]) @faxs=FaxService.find(:all,:conditions=\>\["user\_id=12 "\]) My view is generate like this: \<?xml version="1.0" encoding="UTF-8"?\> 303 302 30…

---

## [Formatting text in view mode same as edit mode](https://www.ruby-forum.com/t/formatting-text-in-view-mode-same-as-edit-mode/156733)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 3\
**Last updated:** [January 2, 2009, 7:19am UTC](https://www.ruby-forum.com/t/formatting-text-in-view-mode-same-as-edit-mode/156733 "2009-01-02T07:19:57Z")

</div>

Hi I have a text are in my edit form as below \<%= text\_area “sd\_ticket”, “description”, “cols” =\> 80, “rows” =\> 5 %\> And here i am entering some text with spaces and enter keys ..Now suppose if it has some 4 paragrap…

---

## [HABTM 3 table relation](https://www.ruby-forum.com/t/habtm-3-table-relation/156029)

<div class="topic-metadata">

**Author:** [@pipex](https://www.ruby-forum.com/u/pipex)\
**Replies:** 2\
**Last updated:** [January 2, 2009, 12:28am UTC](https://www.ruby-forum.com/t/habtm-3-table-relation/156029 "2009-01-02T00:28:08Z")

</div>

Some help please!! class Article \< ActiveRecord::Base has\_and\_belongs\_to\_many :tags, :join\_table =\> :articles\_tags\_users has\_and\_belongs\_to\_many :users, :join\_table =\> :articles\_tags\_users end class Tag \< ActiveReco…

---

## [Strip & Sanitize BEFORE saving data](https://www.ruby-forum.com/t/strip-sanitize-before-saving-data/121583)

<div class="topic-metadata">

**Author:** [@S-gw](https://www.ruby-forum.com/u/S-gw)\
**Replies:** 27\
**Last updated:** [January 2, 2009, 12:22am UTC](https://www.ruby-forum.com/t/strip-sanitize-before-saving-data/121583 "2009-01-02T00:22:15Z")

</div>

So I’ve googled my brains out, and I see a lot of talk about TextHelper for views, but next to no discussion about cleaning text before it is saved. I figured this had to be asked 4 zillion times, but I’m not finding …

---

## [Rails 1.X to 2.1 routing problem](https://www.ruby-forum.com/t/rails-1-x-to-2-1-routing-problem/156621)

<div class="topic-metadata">

**Author:** [@jeffpritchard](https://www.ruby-forum.com/u/jeffpritchard)\
**Replies:** 3\
**Last updated:** [January 1, 2009, 11:59pm UTC](https://www.ruby-forum.com/t/rails-1-x-to-2-1-routing-problem/156621 "2009-01-01T23:59:14Z")

</div>

Hi, I’m trying to bring an “old” rails app up to 2.1. I’m getting this error when trying to access the app via an iFrame setup we had working before for showing widgets on other domains pages: ActionController::Routi…

---

## [Retrieving multiple types with Ferret](https://www.ruby-forum.com/t/retrieving-multiple-types-with-ferret/156708)

<div class="topic-metadata">

**Author:** [@chero](https://www.ruby-forum.com/u/chero)\
**Replies:** 1\
**Last updated:** [January 1, 2009, 11:38pm UTC](https://www.ruby-forum.com/t/retrieving-multiple-types-with-ferret/156708 "2009-01-01T23:38:16Z")

</div>

Hey, I want to store multiple different types of items in Ferret. I can store them all fine but retrieval seems troublesome. When i get items of multiple types back in a result set, how can I figure out what type …

---

## [How do you pass a Validation error to a view using redirect\_to?](https://www.ruby-forum.com/t/how-do-you-pass-a-validation-error-to-a-view-using-redirect-to/156697)

<div class="topic-metadata">

**Author:** [@fredmsun](https://www.ruby-forum.com/u/fredmsun)\
**Replies:** 2\
**Last updated:** [January 1, 2009, 10:07pm UTC](https://www.ruby-forum.com/t/how-do-you-pass-a-validation-error-to-a-view-using-redirect-to/156697 "2009-01-01T22:07:26Z")

</div>

Hi All I have a problem with passing Validation error messages from my model ‘Visitor’ to my view ‘index.html.erb’. When I pass an invalid surname from the form on my view, I correctly get an invalid response on my e…

---

## [Nested resource](https://www.ruby-forum.com/t/nested-resource/156713)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [January 1, 2009, 5:58pm UTC](https://www.ruby-forum.com/t/nested-resource/156713 "2009-01-01T17:58:03Z")

</div>

Hi! I am trying to get this to work: it is really close and half way works. routes: map.namespace(:admin) do |admin| admin.namespace(:products) do |products| products.resources :brains, :has\_many =\> \[ :pdfs, :i…

---

## [Page caching + authentication/flash messages = chaos?](https://www.ruby-forum.com/t/page-caching-authentication-flash-messages-chaos/156703)

<div class="topic-metadata">

**Author:** [@davidtl](https://www.ruby-forum.com/u/davidtl)\
**Replies:** 5\
**Last updated:** [January 1, 2009, 5:25pm UTC](https://www.ruby-forum.com/t/page-caching-authentication-flash-messages-chaos/156703 "2009-01-01T17:25:57Z")

</div>

I have run into a bit of a caching problem. I’m building a website that mostly consists of static editable pages. There is a basic authentication system to restrict who is able to edit the pages and so on. If you’re l…

---

## [Invitation to join ERRORPEDIA](https://www.ruby-forum.com/t/invitation-to-join-errorpedia/156705)

<div class="topic-metadata">

**Author:** [@Randika](https://www.ruby-forum.com/u/Randika)\
**Replies:** 0\
**Last updated:** [January 1, 2009, 3:06pm UTC](https://www.ruby-forum.com/t/invitation-to-join-errorpedia/156705 "2009-01-01T15:06:48Z")

</div>

Hi There, Like most of us out there, at some point you’d have experienced a bunch of ERRORS during your day to day work with computers. So we decided to make an effort to gather them to a one place to discover, discu…

---

## [Model validation breaking integration test](https://www.ruby-forum.com/t/model-validation-breaking-integration-test/156689)

<div class="topic-metadata">

**Author:** [@bdeverea](https://www.ruby-forum.com/u/bdeverea)\
**Replies:** 3\
**Last updated:** [January 1, 2009, 2:39pm UTC](https://www.ruby-forum.com/t/model-validation-breaking-integration-test/156689 "2009-01-01T14:39:38Z")

</div>

Greetings, I have a simple model called “Section” with integration tests that pass. However, when I add a simple validation to the model (validates\_presence\_of :name) the integration test fails. This makes no sense t…

---

## [How to update table column?](https://www.ruby-forum.com/t/how-to-update-table-column/156634)

<div class="topic-metadata">

**Author:** [@youhaodeyi](https://www.ruby-forum.com/u/youhaodeyi)\
**Replies:** 4\
**Last updated:** [January 1, 2009, 2:02pm UTC](https://www.ruby-forum.com/t/how-to-update-table-column/156634 "2009-01-01T14:02:34Z")

</div>

There is a table existed in sqlite3 database. I want to change a column type in this table. I modified the file db/migrate/20081229XXXX\_create\_project.rb and run “rake db:migrate”. But it doesn’t update the table. How…

---

## [Advice on Mac versus PC?](https://www.ruby-forum.com/t/advice-on-mac-versus-pc/156385)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 32\
**Last updated:** [January 1, 2009, 1:40pm UTC](https://www.ruby-forum.com/t/advice-on-mac-versus-pc/156385 "2009-01-01T13:40:53Z")

</div>

I am thinking of getting a new laptop. I noticed the cheapest mac was about $1000, whereas I can get a cheap HP for about $550. The cheaper machine is kind of appealing, but the idea of a linux type system for a mac a…

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

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