# Rails

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

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

---

## [Optional Partials in the Layout](https://www.ruby-forum.com/t/optional-partials-in-the-layout/116598)

<div class="topic-metadata">

**Author:** [@Mozmonkey](https://www.ruby-forum.com/u/Mozmonkey)\
**Replies:** 4\
**Last updated:** [October 8, 2007, 11:27pm UTC](https://www.ruby-forum.com/t/optional-partials-in-the-layout/116598 "2007-10-08T23:27:05Z")

</div>

I want to include a partial in the layout that might not exist. :o) Here’s an example: Some flows have specific CSS or JavaScript and I’d like to automatically include those in the HTML (via the layout), so it woul…

---

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

<div class="topic-metadata">

**Author:** [@jamal](https://www.ruby-forum.com/u/jamal)\
**Replies:** 2\
**Last updated:** [October 8, 2007, 11:16pm UTC](https://www.ruby-forum.com/t/flash-messages/116696 "2007-10-08T23:16:19Z")

</div>

Hello, I’m using flash\[:hash\] in my application, and I feel like I’m forced to make a redirect just to be sure that flash\[:hash\] doesn’t appear in any other views? flash\[:notice\] = “ASDDD” redirect\_to :action =\> :an…

---

## [Escape method](https://www.ruby-forum.com/t/escape-method/116716)

<div class="topic-metadata">

**Author:** [@snantz](https://www.ruby-forum.com/u/snantz)\
**Replies:** 0\
**Last updated:** [October 8, 2007, 11:14pm UTC](https://www.ruby-forum.com/t/escape-method/116716 "2007-10-08T23:14:28Z")

</div>

I am trying to get this particular bit of code to work and am having little success. Bascially what I want is to have a link that turns into a dropdown list and when something in the list is selected I want that new i…

---

## [403 (Forbidden) with Apache on Mongrel Cluster](https://www.ruby-forum.com/t/403-forbidden-with-apache-on-mongrel-cluster/116214)

<div class="topic-metadata">

**Author:** [@knb](https://www.ruby-forum.com/u/knb)\
**Replies:** 1\
**Last updated:** [October 8, 2007, 10:13pm UTC](https://www.ruby-forum.com/t/403-forbidden-with-apache-on-mongrel-cluster/116214 "2007-10-08T22:13:07Z")

</div>

Hi, I’ve configured a rails application on my VPS to run on two mongrels. When I run curl on localhost, the starting page comes up fine. That is, mongrel is serving the app perfectly. The problem arises when trying…

---

## [Facebook app give feedback -Send birthday cards to buds http://apps.facebook.com/groupcards/start](https://www.ruby-forum.com/t/facebook-app-give-feedback-send-birthday-cards-to-buds-http-apps-facebook-com-groupcards-start/116705)

<div class="topic-metadata">

**Author:** [@rico](https://www.ruby-forum.com/u/rico)\
**Replies:** 0\
**Last updated:** [October 8, 2007, 10:04pm UTC](https://www.ruby-forum.com/t/facebook-app-give-feedback-send-birthday-cards-to-buds-http-apps-facebook-com-groupcards-start/116705 "2007-10-08T22:04:51Z")

</div>

Facebook app give feedback -Send birthday cards to buds

---

## [Praises to Rails!](https://www.ruby-forum.com/t/praises-to-rails/116626)

<div class="topic-metadata">

**Author:** [@eggie5](https://www.ruby-forum.com/u/eggie5)\
**Replies:** 2\
**Last updated:** [October 8, 2007, 9:53pm UTC](https://www.ruby-forum.com/t/praises-to-rails/116626 "2007-10-08T21:53:02Z")

</div>

This is super cool. Just like I can post a form to my controller and have it deserialize into a ruby object, I can also post xml to my controller and it deserialize into my ruby object. And all I had to do was set the …

---

## [Setting a default value in collection\_select](https://www.ruby-forum.com/t/setting-a-default-value-in-collection-select/116697)

<div class="topic-metadata">

**Author:** [@arif](https://www.ruby-forum.com/u/arif)\
**Replies:** 0\
**Last updated:** [October 8, 2007, 8:33pm UTC](https://www.ruby-forum.com/t/setting-a-default-value-in-collection-select/116697 "2007-10-08T20:33:48Z")

</div>

Hi, Could anybody cast some light on these: How can I set a default value in a collection\_select? To be specific, I have a class ‘Platform’, and I want to set the platform\_code (a field of Platform) to be ‘ORA’ (w…

---

## [Free "Build Your Own Ruby On Rails Web Application"](https://www.ruby-forum.com/t/free-build-your-own-ruby-on-rails-web-application/116692)

<div class="topic-metadata">

**Author:** [@Davi](https://www.ruby-forum.com/u/Davi)\
**Replies:** 0\
**Last updated:** [October 8, 2007, 7:40pm UTC](https://www.ruby-forum.com/t/free-build-your-own-ruby-on-rails-web-application/116692 "2007-10-08T19:40:20Z")

</div>

Enjoy it! :slight\_smile: – Davi V. E-mail: removed\_email\_address@domain.invalid MSN : removed\_email\_address@domain.invalid GTalk : removed\_email\_address@domain.invalid Skype : davi vidal ICQ : 138815296

---

## [Default site root not public](https://www.ruby-forum.com/t/default-site-root-not-public/116684)

<div class="topic-metadata">

**Author:** [@woodzer](https://www.ruby-forum.com/u/woodzer)\
**Replies:** 2\
**Last updated:** [October 8, 2007, 7:19pm UTC](https://www.ruby-forum.com/t/default-site-root-not-public/116684 "2007-10-08T19:19:47Z")

</div>

How does one go about setting the default home directory to something besides /public? Thanks in advance, Peter

---

## [Like clause with active record](https://www.ruby-forum.com/t/like-clause-with-active-record/116672)

<div class="topic-metadata">

**Author:** [@dodgyboz](https://www.ruby-forum.com/u/dodgyboz)\
**Replies:** 4\
**Last updated:** [October 8, 2007, 7:15pm UTC](https://www.ruby-forum.com/t/like-clause-with-active-record/116672 "2007-10-08T19:15:39Z")

</div>

I am trying to use a like clause with my rails app but am having some problems. I have tried customers = Customer.find(:all, :conditions =\> \[“name LIKE ?”, %some\_variable%\]) i have also tried customers = Customer.fi…

---

## [Populating from existing tables with migration](https://www.ruby-forum.com/t/populating-from-existing-tables-with-migration/116671)

<div class="topic-metadata">

**Author:** [@kabish](https://www.ruby-forum.com/u/kabish)\
**Replies:** 3\
**Last updated:** [October 8, 2007, 7:13pm UTC](https://www.ruby-forum.com/t/populating-from-existing-tables-with-migration/116671 "2007-10-08T19:13:53Z")

</div>

Hi all, I was wondering how to create a rails migration which, from one preexisting and populated table, creates two new tables, each populated with a subset of the columns of the old, big table. I suppose it is poss…

---

## [List and onlclick](https://www.ruby-forum.com/t/list-and-onlclick/116687)

<div class="topic-metadata">

**Author:** [@snantz](https://www.ruby-forum.com/u/snantz)\
**Replies:** 0\
**Last updated:** [October 8, 2007, 7:10pm UTC](https://www.ruby-forum.com/t/list-and-onlclick/116687 "2007-10-08T19:10:40Z")

</div>

I have this link that when clicked becomes a dropdown. What I would like is to have it so that when a selection is ‘clicked’ on that dropdown turned backinto a link with the select thing as the link text. My idea was …

---

## [Rails reverses apostrophes](https://www.ruby-forum.com/t/rails-reverses-apostrophes/116679)

<div class="topic-metadata">

**Author:** [@kusako](https://www.ruby-forum.com/u/kusako)\
**Replies:** 1\
**Last updated:** [October 8, 2007, 7:01pm UTC](https://www.ruby-forum.com/t/rails-reverses-apostrophes/116679 "2007-10-08T19:01:17Z")

</div>

Hi, I am quite new to Ruby on Rails so this might have a very simple answer… My problem gives the following error message when I try to call the count function for an item. Mysql::Error: Unknown column ‘TournamentTem…

---

## [To\_json](https://www.ruby-forum.com/t/to-json/115729)

<div class="topic-metadata">

**Author:** [@fernando](https://www.ruby-forum.com/u/fernando)\
**Replies:** 5\
**Last updated:** [October 8, 2007, 6:45pm UTC](https://www.ruby-forum.com/t/to-json/115729 "2007-10-08T18:45:42Z")

</div>

Hi, I’m having problems using the jsonifier plugin (I’m not using edge) but I’m having trouble using :only, and :except. If I do I get an ArgumentError wrong number of arguments (1 for 0). Here is my code: def tutor…

---

## [Non crud actions in nested resourceful routes](https://www.ruby-forum.com/t/non-crud-actions-in-nested-resourceful-routes/116675)

<div class="topic-metadata">

**Author:** [@linojon](https://www.ruby-forum.com/u/linojon)\
**Replies:** 1\
**Last updated:** [October 8, 2007, 6:36pm UTC](https://www.ruby-forum.com/t/non-crud-actions-in-nested-resourceful-routes/116675 "2007-10-08T18:36:19Z")

</div>

hi, lets say I have in routes.rb map.resources :projects, :has\_many =\> \[:memberships, :pages\] and i want to add non-CRUD actions to memberships. How do I do that? I’m aware of :member =\> and :collection =\> but I’m…

---

## [Acts\_as\_conference wants you to propose a presentation](https://www.ruby-forum.com/t/acts-as-conference-wants-you-to-propose-a-presentation/116680)

<div class="topic-metadata">

**Author:** [@flatekmonkey](https://www.ruby-forum.com/u/flatekmonkey)\
**Replies:** 0\
**Last updated:** [October 8, 2007, 6:28pm UTC](https://www.ruby-forum.com/t/acts-as-conference-wants-you-to-propose-a-presentation/116680 "2007-10-08T18:28:05Z")

</div>

The acts\_as\_conference call for proposals has begun. acts\_as\_conference is a regional, two day Rails conference being held in Orlando, Florida on Feburary 8th and 9th. Please read all of the details at the acts\_as\_con…

---

## [Can db connections be shared](https://www.ruby-forum.com/t/can-db-connections-be-shared/116658)

<div class="topic-metadata">

**Author:** [@aginghipster](https://www.ruby-forum.com/u/aginghipster)\
**Replies:** 7\
**Last updated:** [October 8, 2007, 5:41pm UTC](https://www.ruby-forum.com/t/can-db-connections-be-shared/116658 "2007-10-08T17:41:40Z")

</div>

If I have an application that makes numerous calls to a database for CRUD stuff over a period, does another user on a different PC when accessing the same database and same user make use of that existing connection. O…

---

## [date\_Select help](https://www.ruby-forum.com/t/date-select-help/116593)

<div class="topic-metadata">

**Author:** [@wmerydith](https://www.ruby-forum.com/u/wmerydith)\
**Replies:** 2\
**Last updated:** [October 8, 2007, 5:08pm UTC](https://www.ruby-forum.com/t/date-select-help/116593 "2007-10-08T17:08:14Z")

</div>

Hi, I am using date\_select for when a post is being submitted. This is the tag i use in my view, \<%= date\_select(“post”, “date”, :order =\> \[:month, :day\])%\> However this outputs this is probably the way its meant t…

---

## [Rendering exotic character](https://www.ruby-forum.com/t/rendering-exotic-character/116301)

<div class="topic-metadata">

**Author:** [@Tarscher](https://www.ruby-forum.com/u/Tarscher)\
**Replies:** 5\
**Last updated:** [October 8, 2007, 5:00pm UTC](https://www.ruby-forum.com/t/rendering-exotic-character/116301 "2007-10-08T17:00:33Z")

</div>

hi all, I put a ° in a string but when I render it to the screen the ° changes in \<?\> block. The rest of the string is renderen correctly. How is this caused? Thanks Stijn

---

## [Belongs\_to association doesn't work with \_id set](https://www.ruby-forum.com/t/belongs-to-association-doesnt-work-with-id-set/116643)

<div class="topic-metadata">

**Author:** [@akiross](https://www.ruby-forum.com/u/akiross)\
**Replies:** 7\
**Last updated:** [October 8, 2007, 4:38pm UTC](https://www.ruby-forum.com/t/belongs-to-association-doesnt-work-with-id-set/116643 "2007-10-08T16:38:53Z")

</div>

Hello there, I’m developing an application which has models like this: class Vehicle \< ActiveRecord::Base belongs\_to :internal\_dim, :class\_name =\> “Dimension” def before\_create() idim = Dimension.create self.…

---

## [CSS style disappear when using RJS and page.replace](https://www.ruby-forum.com/t/css-style-disappear-when-using-rjs-and-page-replace/225970)

<div class="topic-metadata">

**Author:** [@gustav](https://www.ruby-forum.com/u/gustav)\
**Replies:** 8\
**Last updated:** [October 8, 2007, 4:28pm UTC](https://www.ruby-forum.com/t/css-style-disappear-when-using-rjs-and-page-replace/225970 "2007-10-08T16:28:16Z")

</div>

Hi! I’m using RJS to process a form in a partial (\_newtask.rhtml) and replace a partial (\_tasks.rhtml) in the same view (index.rhtml): \_newtask.rhtml-view \* \<%= form\_remote\_tag :update =\> “tasks”, :url =\> { :action …

---

## [Need to print "selected=selected" when editing a form](https://www.ruby-forum.com/t/need-to-print-selected-selected-when-editing-a-form/115698)

<div class="topic-metadata">

**Author:** [@lazer\_rash](https://www.ruby-forum.com/u/lazer_rash)\
**Replies:** 7\
**Last updated:** [October 8, 2007, 4:24pm UTC](https://www.ruby-forum.com/t/need-to-print-selected-selected-when-editing-a-form/115698 "2007-10-08T16:24:45Z")

</div>

I have looked at this gropu and this page http://api.rubyonrails.com/classes/ActionView/Helpers/FormOptionsHelper.html#M000506 …but I am unable to figure this out. Here are my tables (short version) People id fname …

---

## [Webrick for project won't start anymore](https://www.ruby-forum.com/t/webrick-for-project-wont-start-anymore/116664)

<div class="topic-metadata">

**Author:** [@jackmacokc](https://www.ruby-forum.com/u/jackmacokc)\
**Replies:** 0\
**Last updated:** [October 8, 2007, 4:22pm UTC](https://www.ruby-forum.com/t/webrick-for-project-wont-start-anymore/116664 "2007-10-08T16:22:48Z")

</div>

Hi, I am not sure what I did. I really didn’t change anything, but… I can’t get webrick to start anymore for my project. I can get it to start on an old copy of the project… I am fairly new to Ruby/Rails and ended up…

---

## [Controller organization](https://www.ruby-forum.com/t/controller-organization/116660)

<div class="topic-metadata">

**Author:** [@snantz](https://www.ruby-forum.com/u/snantz)\
**Replies:** 0\
**Last updated:** [October 8, 2007, 4:06pm UTC](https://www.ruby-forum.com/t/controller-organization/116660 "2007-10-08T16:06:42Z")

</div>

I just have a question about controller organization. I have acontroller that is growing and growing and the more I add stuff the more jumbled is seems to be getting - especially when I need to find something. I know …

---

## [Differences in execution between console and app](https://www.ruby-forum.com/t/differences-in-execution-between-console-and-app/116597)

<div class="topic-metadata">

**Author:** [@dewie](https://www.ruby-forum.com/u/dewie)\
**Replies:** 22\
**Last updated:** [October 8, 2007, 3:15pm UTC](https://www.ruby-forum.com/t/differences-in-execution-between-console-and-app/116597 "2007-10-08T15:15:18Z")

</div>

class AppointmentBook \< ActiveRecord::Base has\_many :appointments def lookup(date, look\_ahead = 27) return nil unless block\_given? (date..date + look\_ahead).each do |date| yield(date, appointments.find\_all\_by\_date(…

---

## [MySQL Database interaction](https://www.ruby-forum.com/t/mysql-database-interaction/116654)

<div class="topic-metadata">

**Author:** [@amra](https://www.ruby-forum.com/u/amra)\
**Replies:** 0\
**Last updated:** [October 8, 2007, 3:03pm UTC](https://www.ruby-forum.com/t/mysql-database-interaction/116654 "2007-10-08T15:03:16Z")

</div>

Hi all, I have installed Rail and RAGI (for asterisk interaction). I want to store data received from DTMF into database (MySQL) Please, I need your help. As i am new user in rail and ruby. How can i store data into…

---

## [Sanitize: Is it a bug?](https://www.ruby-forum.com/t/sanitize-is-it-a-bug/116607)

<div class="topic-metadata">

**Author:** [@mix](https://www.ruby-forum.com/u/mix)\
**Replies:** 4\
**Last updated:** [October 8, 2007, 2:55pm UTC](https://www.ruby-forum.com/t/sanitize-is-it-a-bug/116607 "2007-10-08T14:55:54Z")

</div>

Hi, i was trying something to upload using an area text which the data will be shown as html using the sanitize method. Everything ok, about scripts, but when i tried it escaped the \< Why this? Is it a bug of saniti…

---

## [Best approach - letting users put their own temp. fields to see diff](https://www.ruby-forum.com/t/best-approach-letting-users-put-their-own-temp-fields-to-see-diff/116566)

<div class="topic-metadata">

**Author:** [@ramontayag](https://www.ruby-forum.com/u/ramontayag)\
**Replies:** 3\
**Last updated:** [October 8, 2007, 2:52pm UTC](https://www.ruby-forum.com/t/best-approach-letting-users-put-their-own-temp-fields-to-see-diff/116566 "2007-10-08T14:52:52Z")

</div>

Hey everyone! I need some input on the best approach. I have a model Property that has some fields (price, down payment rate), then methods in property.rb that compute derived information (down payment amount) based …

---

## [Deploy: mongrel cluster problem](https://www.ruby-forum.com/t/deploy-mongrel-cluster-problem/116352)

<div class="topic-metadata">

**Author:** [@phirefly](https://www.ruby-forum.com/u/phirefly)\
**Replies:** 4\
**Last updated:** [October 8, 2007, 2:38pm UTC](https://www.ruby-forum.com/t/deploy-mongrel-cluster-problem/116352 "2007-10-08T14:38:16Z")

</div>

Hello, I don’t know if this is really the right forum to be asking about Rails deployment, but just in case someone has experience with this… I’m attempting to deploy a rails site for the first time, using mongrel, m…

---

## [Moving from aptana to 3rdRail](https://www.ruby-forum.com/t/moving-from-aptana-to-3rdrail/115294)

<div class="topic-metadata">

**Author:** [@snaggy](https://www.ruby-forum.com/u/snaggy)\
**Replies:** 62\
**Last updated:** [October 8, 2007, 2:24pm UTC](https://www.ruby-forum.com/t/moving-from-aptana-to-3rdrail/115294 "2007-10-08T14:24:34Z")

</div>

How? I have a project full of gems etc etc how can I move it in 3rdRail? I hope I don’t have to do it manually for every single file… any help appreciated

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

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