# Rails

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

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

---

## [Help Community Project Development](https://www.ruby-forum.com/t/help-community-project-development/152506)

<div class="topic-metadata">

**Author:** [@Sayeed](https://www.ruby-forum.com/u/Sayeed)\
**Replies:** 0\
**Last updated:** [November 4, 2008, 6:23pm UTC](https://www.ruby-forum.com/t/help-community-project-development/152506 "2008-11-04T18:23:47Z")

</div>

Hello all, I have no idea of ruby on rails and read some articles and found out it is good, flexible, understandable and very efficient for web applications. I am planning to start a community project and looking for…

---

## [How to query across several tables?](https://www.ruby-forum.com/t/how-to-query-across-several-tables/152501)

<div class="topic-metadata">

**Author:** [@tharrisx](https://www.ruby-forum.com/u/tharrisx)\
**Replies:** 3\
**Last updated:** [November 4, 2008, 6:14pm UTC](https://www.ruby-forum.com/t/how-to-query-across-several-tables/152501 "2008-11-04T18:14:16Z")

</div>

Hi there, In the model situation “Book :has\_many Stories”, I would like to do something like this: Book.find(:all, :conditions =\> { book.story.id =\> @story\_ids }) …which of course doesn’t work with “book.story.id =\>……

---

## [Uninitialized constant ODBC::SQL\_DBMS\_NAME](https://www.ruby-forum.com/t/uninitialized-constant-odbc-sql-dbms-name/143043)

<div class="topic-metadata">

**Author:** [@anthony](https://www.ruby-forum.com/u/anthony)\
**Replies:** 1\
**Last updated:** [November 4, 2008, 6:13pm UTC](https://www.ruby-forum.com/t/uninitialized-constant-odbc-sql-dbms-name/143043 "2008-11-04T18:13:26Z")

</div>

Hello, I am connecting my rails app to an sql server. Or at least trying to. My local development set up works great. Its using iODBC and FreeTDS. My shared hosting provider installed unixODBC and FreeTDS. Working wi…

---

## [Give a user the option to stay logged in](https://www.ruby-forum.com/t/give-a-user-the-option-to-stay-logged-in/152491)

<div class="topic-metadata">

**Author:** [@johnk](https://www.ruby-forum.com/u/johnk)\
**Replies:** 2\
**Last updated:** [November 4, 2008, 5:57pm UTC](https://www.ruby-forum.com/t/give-a-user-the-option-to-stay-logged-in/152491 "2008-11-04T17:57:08Z")

</div>

I thought this would be so straight forward but it does not seem to be. I want to give users the option when they login to check a checkbox that will leave them logged in but I can not seem to figure out how. On top o…

---

## [:table\_name\_with\_underscore and join models](https://www.ruby-forum.com/t/table-name-with-underscore-and-join-models/152443)

<div class="topic-metadata">

**Author:** [@destiney](https://www.ruby-forum.com/u/destiney)\
**Replies:** 3\
**Last updated:** [November 4, 2008, 5:55pm UTC](https://www.ruby-forum.com/t/table-name-with-underscore-and-join-models/152443 "2008-11-04T17:55:01Z")

</div>

Per my PHBs, I’m using ActiveRecord::Base.primary\_key\_prefix\_type = :table\_name\_with\_underscore in my current project. My problem is that this setting seems to be causing me some issues with my join model’s primary …

---

## [Single sign on](https://www.ruby-forum.com/t/single-sign-on/152401)

<div class="topic-metadata">

**Author:** [@newguy](https://www.ruby-forum.com/u/newguy)\
**Replies:** 4\
**Last updated:** [November 4, 2008, 5:44pm UTC](https://www.ruby-forum.com/t/single-sign-on/152401 "2008-11-04T17:44:53Z")

</div>

about

---

## [Integration with plone site--insane?](https://www.ruby-forum.com/t/integration-with-plone-site-insane/152430)

<div class="topic-metadata">

**Author:** [@rpardee](https://www.ruby-forum.com/u/rpardee)\
**Replies:** 2\
**Last updated:** [November 4, 2008, 5:20pm UTC](https://www.ruby-forum.com/t/integration-with-plone-site-insane/152430 "2008-11-04T17:20:24Z")

</div>

Hey All, My group has a plone-based public web portal thingy that a contractor provides for us, w/all the usual CMS goodies (contacts; news items, hierarchical folder structure, etc.). Quite independently of that, th…

---

## [Need to generate xml to be stored in a database](https://www.ruby-forum.com/t/need-to-generate-xml-to-be-stored-in-a-database/152442)

<div class="topic-metadata">

**Author:** [@casey.ellett](https://www.ruby-forum.com/u/casey.ellett)\
**Replies:** 8\
**Last updated:** [November 4, 2008, 4:43pm UTC](https://www.ruby-forum.com/t/need-to-generate-xml-to-be-stored-in-a-database/152442 "2008-11-04T16:43:19Z")

</div>

Forgive my ignorance, but I have searched for a while and cannot find anything that would help me move in the right direction. I need to generate xml that will then be recored in the database so that I can pull out at…

---

## [Need to make a radar chart - any good ruby plugins for this?](https://www.ruby-forum.com/t/need-to-make-a-radar-chart-any-good-ruby-plugins-for-this/149421)

<div class="topic-metadata">

**Author:** [@joep](https://www.ruby-forum.com/u/joep)\
**Replies:** 9\
**Last updated:** [November 4, 2008, 4:39pm UTC](https://www.ruby-forum.com/t/need-to-make-a-radar-chart-any-good-ruby-plugins-for-this/149421 "2008-11-04T16:39:07Z")

</div>

Hey, I need to make a radar chart (also called spider chart, star chart) and am trying to see if there is a plugin for this. GchartRB looked good, but I don’t see Radar Charts on here: http://gchartrb.rubyforge.org/ …

---

## [Images folder concern when deploying with Capistrano and git](https://www.ruby-forum.com/t/images-folder-concern-when-deploying-with-capistrano-and-git/152304)

<div class="topic-metadata">

**Author:** [@bagadoughnuts](https://www.ruby-forum.com/u/bagadoughnuts)\
**Replies:** 11\
**Last updated:** [November 4, 2008, 4:26pm UTC](https://www.ruby-forum.com/t/images-folder-concern-when-deploying-with-capistrano-and-git/152304 "2008-11-04T16:26:12Z")

</div>

Hi guys, So I finally got around to setting up a staging server (ubuntu + apache passenger) and after some headaches got Capistrano (using git as the scm) to deploy the app to my staging server using a basic deploy.r…

---

## [Rails 2.1.1 setting datetime to nil at 00:00:00](https://www.ruby-forum.com/t/rails-2-1-1-setting-datetime-to-nil-at-0000/152437)

<div class="topic-metadata">

**Author:** [@ADADAD](https://www.ruby-forum.com/u/ADADAD)\
**Replies:** 4\
**Last updated:** [November 4, 2008, 3:44pm UTC](https://www.ruby-forum.com/t/rails-2-1-1-setting-datetime-to-nil-at-0000/152437 "2008-11-04T15:44:23Z")

</div>

Hello, There appears to be a strange bug in Rails 2.1.1 where if I set a datetime field to YYYY-MM-DD 00:00:00 (using TimeZone support) Rails returns nil, instead of YYYY-MM-DD 00:00:00 Here is confirmed output: c…

---

## [Returning changed fields when transaction fails](https://www.ruby-forum.com/t/returning-changed-fields-when-transaction-fails/152321)

<div class="topic-metadata">

**Author:** [@mrkohrea](https://www.ruby-forum.com/u/mrkohrea)\
**Replies:** 15\
**Last updated:** [November 4, 2008, 3:42pm UTC](https://www.ruby-forum.com/t/returning-changed-fields-when-transaction-fails/152321 "2008-11-04T15:42:37Z")

</div>

I hope I’m explaining this correctly. Be gentle. Noob here. :slight\_smile: Ideas on how to solve this? Kind of a chicken or the egg scenario. Check out this update function in my controller: def update @snowplow\_…

---

## [Toggle](https://www.ruby-forum.com/t/toggle/152398)

<div class="topic-metadata">

**Author:** [@mikael](https://www.ruby-forum.com/u/mikael)\
**Replies:** 6\
**Last updated:** [November 4, 2008, 3:03pm UTC](https://www.ruby-forum.com/t/toggle/152398 "2008-11-04T15:03:06Z")

</div>

Hi! I’am using Effect.toggle to show/hide a div field. Is there a simple way to also toggle the icon i am using. (+ if hidden and - if visible) \<%= link\_to\_function ‘’, “Effect.toggle(‘summary\_dropdown’)”, :class =\> …

---

## [Which status code for validation errors](https://www.ruby-forum.com/t/which-status-code-for-validation-errors/152481)

<div class="topic-metadata">

**Author:** [@evensoul](https://www.ruby-forum.com/u/evensoul)\
**Replies:** 1\
**Last updated:** [November 4, 2008, 2:53pm UTC](https://www.ruby-forum.com/t/which-status-code-for-validation-errors/152481 "2008-11-04T14:53:16Z")

</div>

Hi, I need to manually specify an HTTP response code after I catch the ActiveRecord::RecordInvalid exception - as validation fails for data submitted via remote\_form\_for. Which one would be most appropriate? Currentl…

---

## [Rescue\_from and assert\_raise](https://www.ruby-forum.com/t/rescue-from-and-assert-raise/151710)

<div class="topic-metadata">

**Author:** [@avathartri](https://www.ruby-forum.com/u/avathartri)\
**Replies:** 1\
**Last updated:** [November 4, 2008, 2:17pm UTC](https://www.ruby-forum.com/t/rescue-from-and-assert-raise/151710 "2008-11-04T14:17:30Z")

</div>

Since commit 5e3517ea7b9fbd460f772bffc9212d882011f2bc, rescue\_from is now being handled in tests. I’ve been using rescue\_from to handle custom exceptions and testing that those exceptions are raised in functional tes…

---

## [First ever full day Ruby On Rails event in India](https://www.ruby-forum.com/t/first-ever-full-day-ruby-on-rails-event-in-india/152484)

<div class="topic-metadata">

**Author:** [@sur](https://www.ruby-forum.com/u/sur)\
**Replies:** 0\
**Last updated:** [November 4, 2008, 2:15pm UTC](https://www.ruby-forum.com/t/first-ever-full-day-ruby-on-rails-event-in-india/152484 "2008-11-04T14:15:09Z")

</div>

Hi Everyone, If you are in India, and you like to code in Ruby and enjoy Ruby On Rails… join in RubyFunDay to have real fun with Ruby… http://rubyonrails.in/events/3 regards, Sur

---

## [Where is error in this code](https://www.ruby-forum.com/t/where-is-error-in-this-code/152463)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 6\
**Last updated:** [November 4, 2008, 2:08pm UTC](https://www.ruby-forum.com/t/where-is-error-in-this-code/152463 "2008-11-04T14:08:05Z")

</div>

I have an action like def create if params\[:ticket\]\[:title\].empty? flash\[:notice\] = ‘Please fill fields marked with \*’ redirect\_to :action =\> ‘create\_ticket\_ui’ else @contact\_id = ContactEmailAddress.get\_contact\_i…

---

## [Check for color](https://www.ruby-forum.com/t/check-for-color/152416)

<div class="topic-metadata">

**Author:** [@adistarmid](https://www.ruby-forum.com/u/adistarmid)\
**Replies:** 5\
**Last updated:** [November 4, 2008, 2:07pm UTC](https://www.ruby-forum.com/t/check-for-color/152416 "2008-11-04T14:07:29Z")

</div>

Does anyone know how to check to make sure that the text on a screen is a certain color. What I wish to do is check to make sure that the text color is red. Any ideas??

---

## [\_session\_id and form\_for](https://www.ruby-forum.com/t/session-id-and-form-for/152482)

<div class="topic-metadata">

**Author:** [@tatyree](https://www.ruby-forum.com/u/tatyree)\
**Replies:** 1\
**Last updated:** [November 4, 2008, 1:35pm UTC](https://www.ruby-forum.com/t/session-id-and-form-for/152482 "2008-11-04T13:35:10Z")

</div>

Hi, I’ve got a mobile enabled app that needs to be able to pass \_session\_id for certain phones/operators that cannot/will not handle cookies. I’ve outlined the problem here and given the code here: http://pastie.org…

---

## [Updating Rails](https://www.ruby-forum.com/t/updating-rails/152475)

<div class="topic-metadata">

**Author:** [@Richie](https://www.ruby-forum.com/u/Richie)\
**Replies:** 3\
**Last updated:** [November 4, 2008, 12:48pm UTC](https://www.ruby-forum.com/t/updating-rails/152475 "2008-11-04T12:48:48Z")

</div>

Hi there, Brand new to RoR just reading thru agile development with rails. I’m currently on version 2.1.0 and attempting to update to 2.1.2 however when I issue the command ‘gem update rails’ I see the following outp…

---

## [Error running rake db:test:prepare](https://www.ruby-forum.com/t/error-running-rake-dbprepare/152456)

<div class="topic-metadata">

**Author:** [@klancaster](https://www.ruby-forum.com/u/klancaster)\
**Replies:** 1\
**Last updated:** [November 4, 2008, 12:31pm UTC](https://www.ruby-forum.com/t/error-running-rake-dbprepare/152456 "2008-11-04T12:31:45Z")

</div>

Hey all, I am getting syntax errors in my schema.rb when I run rake db:test:prepare. In my migrations, I have created columns that look like this… add\_column :prizes, :“paypal\_amount”, :decimal, :precision =\> 8, :sc…

---

## [HAproxy not listening to all IP address](https://www.ruby-forum.com/t/haproxy-not-listening-to-all-ip-address/152465)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [November 4, 2008, 12:11pm UTC](https://www.ruby-forum.com/t/haproxy-not-listening-to-all-ip-address/152465 "2008-11-04T12:11:12Z")

</div>

guys, i am trying to install HAproxy infront of my webserver. usually my webserver listens on port 80 and since we have 5 ip address serving 5 different sites on the same physical server the webserver listens to all…

---

## [Put the list of posts in descending order](https://www.ruby-forum.com/t/put-the-list-of-posts-in-descending-order/152459)

<div class="topic-metadata">

**Author:** [@Ishara\_G](https://www.ruby-forum.com/u/Ishara_G)\
**Replies:** 2\
**Last updated:** [November 4, 2008, 11:18am UTC](https://www.ruby-forum.com/t/put-the-list-of-posts-in-descending-order/152459 "2008-11-04T11:18:20Z")

</div>

hi,i have a table called blogs which include t.column :user\_id, :integer t.column :post\_id, :integer t.column:title, :string t.column:body, :string and i have a seperate form to fill the title and post field,i can …

---

## [UTF-8 compliance in Rails](https://www.ruby-forum.com/t/utf-8-compliance-in-rails/151670)

<div class="topic-metadata">

**Author:** [@kiran1234](https://www.ruby-forum.com/u/kiran1234)\
**Replies:** 3\
**Last updated:** [November 4, 2008, 11:14am UTC](https://www.ruby-forum.com/t/utf-8-compliance-in-rails/151670 "2008-11-04T11:14:18Z")

</div>

I have a issue with UTF-8 compliance… Any solutions?

---

## [Code for insert calender](https://www.ruby-forum.com/t/code-for-insert-calender/152464)

<div class="topic-metadata">

**Author:** [@Ishara\_G](https://www.ruby-forum.com/u/Ishara_G)\
**Replies:** 1\
**Last updated:** [November 4, 2008, 9:15am UTC](https://www.ruby-forum.com/t/code-for-insert-calender/152464 "2008-11-04T09:15:51Z")

</div>

i want to create a pop up calendar,please can anyone tell me how to do it

---

## [Hi Everyone](https://www.ruby-forum.com/t/hi-everyone/152461)

<div class="topic-metadata">

**Author:** [@hema\_mca](https://www.ruby-forum.com/u/hema_mca)\
**Replies:** 0\
**Last updated:** [November 4, 2008, 8:15am UTC](https://www.ruby-forum.com/t/hi-everyone/152461 "2008-11-04T08:15:32Z")

</div>

I am Generating the Excel sheet using the ruby on rails I installed the gem spreadsheet/excel and the spreadsheet and in my code i wrote the lines require ‘spreadsheet/excel’ require ‘spreadsheet’ i used to format …

---

## [Hpricot - malformed HTML question](https://www.ruby-forum.com/t/hpricot-malformed-html-question/152447)

<div class="topic-metadata">

**Author:** [@cswebgrl](https://www.ruby-forum.com/u/cswebgrl)\
**Replies:** 0\
**Last updated:** [November 4, 2008, 1:37am UTC](https://www.ruby-forum.com/t/hpricot-malformed-html-question/152447 "2008-11-04T01:37:09Z")

</div>

Hi. I have some html links that are poorly formed. Note the capital “A”. link here This code will find all of the correctly formed links with the lower case “a”. search\_result.search("//a\[@href\*=’/link\_here/’\]") do…

---

## [Problems with Auth\_generator](https://www.ruby-forum.com/t/problems-with-auth-generator/152446)

<div class="topic-metadata">

**Author:** [@damaris](https://www.ruby-forum.com/u/damaris)\
**Replies:** 0\
**Last updated:** [November 4, 2008, 12:27am UTC](https://www.ruby-forum.com/t/problems-with-auth-generator/152446 "2008-11-04T00:27:10Z")

</div>

Hi you all, I was trying to get work the auth\_generator gem. I’m using Rails version 2.1.2 and auth\_generator 2.0.1. I managed to work with everything except: 1: ActionMailer configuration: I don’t know really much ab…

---

## [Reverse keys and values in a hash](https://www.ruby-forum.com/t/reverse-keys-and-values-in-a-hash/152439)

<div class="topic-metadata">

**Author:** [@Neal\_L](https://www.ruby-forum.com/u/Neal_L)\
**Replies:** 1\
**Last updated:** [November 3, 2008, 11:58pm UTC](https://www.ruby-forum.com/t/reverse-keys-and-values-in-a-hash/152439 "2008-11-03T23:58:32Z")

</div>

Hello all, This is more of a ruby question than a rails question, but I’m wondering if it’s possible to reverse the keys and values in a hash. I’m using a hash to map fields from one component of my app to another, a…

---

## [ActiveRecord in memory only object for wizard?](https://www.ruby-forum.com/t/activerecord-in-memory-only-object-for-wizard/152432)

<div class="topic-metadata">

**Author:** [@hangingclowns](https://www.ruby-forum.com/u/hangingclowns)\
**Replies:** 0\
**Last updated:** [November 3, 2008, 10:02pm UTC](https://www.ruby-forum.com/t/activerecord-in-memory-only-object-for-wizard/152432 "2008-11-03T22:02:50Z")

</div>

I have a wizard with multiple screens where I essentially populate an ActiveRecord object. However I DO NOT want to save it to the database until the last screen and the user clicks save. Meanwhile though, I want to g…

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

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