# Rails

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

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

---

## [Gzip component with mongrel server](https://www.ruby-forum.com/t/gzip-component-with-mongrel-server/153604)

<div class="topic-metadata">

**Author:** [@ankitparekh](https://www.ruby-forum.com/u/ankitparekh)\
**Replies:** 3\
**Last updated:** [November 19, 2008, 12:27pm UTC](https://www.ruby-forum.com/t/gzip-component-with-mongrel-server/153604 "2008-11-19T12:27:10Z")

</div>

I want to enable gzip component on my site and i m using mongrel server can you please tell me how to do it thanks

---

## [InvalidAuthenticityToken when using XML, why?](https://www.ruby-forum.com/t/invalidauthenticitytoken-when-using-xml-why/153492)

<div class="topic-metadata">

**Author:** [@comopasta](https://www.ruby-forum.com/u/comopasta)\
**Replies:** 1\
**Last updated:** [November 19, 2008, 12:08pm UTC](https://www.ruby-forum.com/t/invalidauthenticitytoken-when-using-xml-why/153492 "2008-11-19T12:08:57Z")

</div>

Hi, I’m making an app where messages can be posted only from mobile phones. The clients that will connect to the app will NOT use a browser but the client is developed using native language, say C++, Java, etc. Users …

---

## [Div replacement](https://www.ruby-forum.com/t/div-replacement/153607)

<div class="topic-metadata">

**Author:** [@palani](https://www.ruby-forum.com/u/palani)\
**Replies:** 1\
**Last updated:** [November 19, 2008, 11:43am UTC](https://www.ruby-forum.com/t/div-replacement/153607 "2008-11-19T11:43:41Z")

</div>

Hi, Any one please solve the following situation: On my page i have a search text box and near with i have a link\_to\_function called “Find” with in one div tag. below this i have a flash animation on …

---

## [How to use has\_many and belongs\_to?](https://www.ruby-forum.com/t/how-to-use-has-many-and-belongs-to/153539)

<div class="topic-metadata">

**Author:** [@BoBKilla](https://www.ruby-forum.com/u/BoBKilla)\
**Replies:** 3\
**Last updated:** [November 19, 2008, 10:24am UTC](https://www.ruby-forum.com/t/how-to-use-has-many-and-belongs-to/153539 "2008-11-19T10:24:25Z")

</div>

Hello there, im kind of a newbie with ruby on rails and i have a question about has\_many and belongs\_to because i saw tutorials where they use it but i don’t see how it works ? What if you don’t use it ? In fact i do…

---

## [\[JOBS\] ROR Techies/Senior Techies and Managers](https://www.ruby-forum.com/t/jobs-ror-techies-senior-techies-and-managers/153602)

<div class="topic-metadata">

**Author:** [@Aru](https://www.ruby-forum.com/u/Aru)\
**Replies:** 0\
**Last updated:** [November 19, 2008, 10:00am UTC](https://www.ruby-forum.com/t/jobs-ror-techies-senior-techies-and-managers/153602 "2008-11-19T10:00:57Z")

</div>

Hey All, An opportunity for techies to talk abt opportunities. We are in Delhi, doing development in ROR. Need ppl who live in an open source world. Call me for details: 9811140115 Email: removed\_email\_address@domai…

---

## [Akismet Rails Plugin](https://www.ruby-forum.com/t/akismet-rails-plugin/153552)

<div class="topic-metadata">

**Author:** [@Schalk\_N](https://www.ruby-forum.com/u/Schalk_N)\
**Replies:** 3\
**Last updated:** [November 19, 2008, 10:00am UTC](https://www.ruby-forum.com/t/akismet-rails-plugin/153552 "2008-11-19T10:00:22Z")

</div>

Hi all, I am trying to get Akismet installed on a RoR app. When trying to install Rakismet using: script/plugin install git://github.com/jfrench/rakismet I always get, plugin not found. Does anyone know where I can …

---

## [How to generate url from use input](https://www.ruby-forum.com/t/how-to-generate-url-from-use-input/153601)

<div class="topic-metadata">

**Author:** [@liwenqiu](https://www.ruby-forum.com/u/liwenqiu)\
**Replies:** 0\
**Last updated:** [November 19, 2008, 9:06am UTC](https://www.ruby-forum.com/t/how-to-generate-url-from-use-input/153601 "2008-11-19T09:06:30Z")

</div>

Hi, Is there any way i can generate url according to use input dynamically. Now, i have a route : map.search '/search/:word', :controller =\> 'words', :action =\> ‘search’ and then i also have a input page which j…

---

## [Weird params from Safari/525.20 on 10.5.3, {"user"=\>"foo=x&bar=y"}, {"ids" =\> {"0"=\>"123", "1"=\>"45](https://www.ruby-forum.com/t/weird-params-from-safari-525-20-on-10-5-3-user-foo-x-bar-y-ids-0-123-1-45/153464)

<div class="topic-metadata">

**Author:** [@malesca](https://www.ruby-forum.com/u/malesca)\
**Replies:** 2\
**Last updated:** [November 19, 2008, 9:05am UTC](https://www.ruby-forum.com/t/weird-params-from-safari-525-20-on-10-5-3-user-foo-x-bar-y-ids-0-123-1-45/153464 "2008-11-19T09:05:20Z")

</div>

I’ve seen a bunch of logged exceptions the last few months, where Rails expects array params like { “ids” =\> \[“123”, “456”\] } but gets { “ids” =\> { “0” =\> “123”, “1” =\> “456”\] } or expects hash params like { “user”…

---

## [Dynamic input form view, based on model? Is there a helper or plugin for this?](https://www.ruby-forum.com/t/dynamic-input-form-view-based-on-model-is-there-a-helper-or-plugin-for-this/153600)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 0\
**Last updated:** [November 19, 2008, 8:14am UTC](https://www.ruby-forum.com/t/dynamic-input-form-view-based-on-model-is-there-a-helper-or-plugin-for-this/153600 "2008-11-19T08:14:25Z")

</div>

Hi, Is there an existing helper or plugin that let’s one define a dynamic input form page based on a model? For example I am going to have a tableless model to collect the input parameters required for a report to be…

---

## [Model.save not committing to DB with no errors](https://www.ruby-forum.com/t/model-save-not-committing-to-db-with-no-errors/153585)

<div class="topic-metadata">

**Author:** [@jkahn](https://www.ruby-forum.com/u/jkahn)\
**Replies:** 5\
**Last updated:** [November 19, 2008, 7:51am UTC](https://www.ruby-forum.com/t/model-save-not-committing-to-db-with-no-errors/153585 "2008-11-19T07:51:00Z")

</div>

I need some help to debug an issue that just came up, and I’ve never seen before. I have a model, let’s call it Allocation, and it has worked in the past (is working now on the live server). It’s fairly simple with …

---

## [\[JOBS\] Excellent Job Opportunity: Lead Engineering (Ruby On Rails), New Delhi](https://www.ruby-forum.com/t/jobs-excellent-job-opportunity-lead-engineering-ruby-on-rails-new-delhi/197183)

<div class="topic-metadata">

**Author:** [@Jitendra\_Singh](https://www.ruby-forum.com/u/Jitendra_Singh)\
**Replies:** 0\
**Last updated:** [November 19, 2008, 7:31am UTC](https://www.ruby-forum.com/t/jobs-excellent-job-opportunity-lead-engineering-ruby-on-rails-new-delhi/197183 "2008-11-19T07:31:42Z")

</div>

Hi All, We are looking for motivated Ruby on Rails/Java technology professionals with 3+ years of relevant experience and a strong background in computer science, in particular Internet technologies. The role would i…

---

## [HABTM Validation](https://www.ruby-forum.com/t/habtm-validation/153595)

<div class="topic-metadata">

**Author:** [@shiva](https://www.ruby-forum.com/u/shiva)\
**Replies:** 0\
**Last updated:** [November 19, 2008, 6:29am UTC](https://www.ruby-forum.com/t/habtm-validation/153595 "2008-11-19T06:29:42Z")

</div>

Hi I have a many-to-many relationship between users and groups set up in my application, using a join table (users\_groups). i have wrote validation in both a table, at the time of showing error message its add one e…

---

## [IE7 not calling formatted action properly](https://www.ruby-forum.com/t/ie7-not-calling-formatted-action-properly/143476)

<div class="topic-metadata">

**Author:** [@squeegy](https://www.ruby-forum.com/u/squeegy)\
**Replies:** 10\
**Last updated:** [November 19, 2008, 5:33am UTC](https://www.ruby-forum.com/t/ie7-not-calling-formatted-action-properly/143476 "2008-11-19T05:33:06Z")

</div>

This is completely bizarre. I have a respond\_to block that looks kinda like this: respond\_to do |format| format.html { render :template =\> 'home/index' } format.jpg { render :template =\> 'admin/products/small.fle…

---

## [Rss feed is not detected in firefox?](https://www.ruby-forum.com/t/rss-feed-is-not-detected-in-firefox/153534)

<div class="topic-metadata">

**Author:** [@thaniyarasu](https://www.ruby-forum.com/u/thaniyarasu)\
**Replies:** 2\
**Last updated:** [November 19, 2008, 5:03am UTC](https://www.ruby-forum.com/t/rss-feed-is-not-detected-in-firefox/153534 "2008-11-19T05:03:58Z")

</div>

my rails version is 2.2.0 i have created a rss feed It is working fine in IE but in fire fox only xml content is showned like “This XML file does not appear to have any style information associated with it. The do…

---

## [Extra Characters in Find?](https://www.ruby-forum.com/t/extra-characters-in-find/153590)

<div class="topic-metadata">

**Author:** [@pete](https://www.ruby-forum.com/u/pete)\
**Replies:** 1\
**Last updated:** [November 19, 2008, 4:51am UTC](https://www.ruby-forum.com/t/extra-characters-in-find/153590 "2008-11-19T04:51:29Z")

</div>

Hi- I’m trying to submit a query through active record, and when I watch the development log to see what is getting passed in, I see something like this: SELECT \* FROM “my\_model” WHERE (some\_name LIKE E’%search%’) I…

---

## [Installing Rails - Problem with zlib](https://www.ruby-forum.com/t/installing-rails-problem-with-zlib/153563)

<div class="topic-metadata">

**Author:** [@manouche](https://www.ruby-forum.com/u/manouche)\
**Replies:** 2\
**Last updated:** [November 19, 2008, 1:32am UTC](https://www.ruby-forum.com/t/installing-rails-problem-with-zlib/153563 "2008-11-19T01:32:05Z")

</div>

This is installed on CentOS 5.2. I have installed Ruby 1.8.7 I downloaded and expanded Gem Manager 1.3.1 and Rails 2.1.2 I tried to install Rails using this: gem install rails --include-dependencies The result is th…

---

## [Ruby on Rails Tutorial on IEEE Software Magazine](https://www.ruby-forum.com/t/ruby-on-rails-tutorial-on-ieee-software-magazine/153567)

<div class="topic-metadata">

**Author:** [@Alan\_Kelon\_Oliveira](https://www.ruby-forum.com/u/Alan_Kelon_Oliveira)\
**Replies:** 1\
**Last updated:** [November 18, 2008, 11:28pm UTC](https://www.ruby-forum.com/t/ruby-on-rails-tutorial-on-ieee-software-magazine/153567 "2008-11-18T23:28:28Z")

</div>

Hello! The November/December 2008 issue of IEEE Software has nice a tutorial on Ruby on Rails. IEEE Software is one the most prestigious magazines on Software Engineering. Tutorial: http://www.di.ufpb.br/~alan/ror-i…

---

## [Undefined method "add\_reference"](https://www.ruby-forum.com/t/undefined-method-add-reference/153576)

<div class="topic-metadata">

**Author:** [@asoto](https://www.ruby-forum.com/u/asoto)\
**Replies:** 0\
**Last updated:** [November 18, 2008, 11:17pm UTC](https://www.ruby-forum.com/t/undefined-method-add-reference/153576 "2008-11-18T23:17:45Z")

</div>

Greetings, I try to add a foreign key in one of my rails migrations in the following way: def self.up add\_reference :categories, :items end This, strangely, leads to the following error during the migration: – add…

---

## [Testing and fixture management against two databases](https://www.ruby-forum.com/t/testing-and-fixture-management-against-two-databases/153571)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 0\
**Last updated:** [November 18, 2008, 10:21pm UTC](https://www.ruby-forum.com/t/testing-and-fixture-management-against-two-databases/153571 "2008-11-18T22:21:55Z")

</div>

I have some models in my app. that connect to a different database than the rest of my app. How do I set things up so that when I run my tests, I can associate the appropriate fixtures with the appropriate database. …

---

## [How to make an image grow and make everything else dark until you click close](https://www.ruby-forum.com/t/how-to-make-an-image-grow-and-make-everything-else-dark-until-you-click-close/153557)

<div class="topic-metadata">

**Author:** [@dino\_d](https://www.ruby-forum.com/u/dino_d)\
**Replies:** 2\
**Last updated:** [November 18, 2008, 9:28pm UTC](https://www.ruby-forum.com/t/how-to-make-an-image-grow-and-make-everything-else-dark-until-you-click-close/153557 "2008-11-18T21:28:42Z")

</div>

Anyone know an easy way to do this? I have some web links in my app with pictures, and I’d like to implement that effect that I’ve seen a lot where when the user clicks on the image, it sort of grows and the rest of …

---

## [Searching multiple tables](https://www.ruby-forum.com/t/searching-multiple-tables/152933)

<div class="topic-metadata">

**Author:** [@Jables](https://www.ruby-forum.com/u/Jables)\
**Replies:** 1\
**Last updated:** [November 18, 2008, 8:55pm UTC](https://www.ruby-forum.com/t/searching-multiple-tables/152933 "2008-11-18T20:55:02Z")

</div>

Hey, I have three tables/models - stories, pictures, videos. I want to be able to search all of these at once to find entries within a date range. Currently I am searching each one and pushing the results onto an a…

---

## [Validations Question](https://www.ruby-forum.com/t/validations-question/153562)

<div class="topic-metadata">

**Author:** [@Jables](https://www.ruby-forum.com/u/Jables)\
**Replies:** 1\
**Last updated:** [November 18, 2008, 8:35pm UTC](https://www.ruby-forum.com/t/validations-question/153562 "2008-11-18T20:35:00Z")

</div>

I have a script that is run by a cron job. It is constantly trying to put the same records into the database plus a few unique ones so to solve this I put a validates\_uniqueness\_of :title on the model. This has the …

---

## [Creating a Query and then a select box based off query results](https://www.ruby-forum.com/t/creating-a-query-and-then-a-select-box-based-off-query-results/153523)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [November 18, 2008, 8:34pm UTC](https://www.ruby-forum.com/t/creating-a-query-and-then-a-select-box-based-off-query-results/153523 "2008-11-18T20:34:25Z")

</div>

Hello, I am a newbie here and was hoping someone had some experience and suggestions on how to accomplish the below task: I would like to figure out how to give my users a prepopulated list based off there selection.…

---

## [Best Practice for Timeliness?](https://www.ruby-forum.com/t/best-practice-for-timeliness/153525)

<div class="topic-metadata">

**Author:** [@blacknight](https://www.ruby-forum.com/u/blacknight)\
**Replies:** 3\
**Last updated:** [November 18, 2008, 7:19pm UTC](https://www.ruby-forum.com/t/best-practice-for-timeliness/153525 "2008-11-18T19:19:44Z")

</div>

Hey, I want to highlight rows in an index view based on their timeliness. That is, is a record late, due soon, etc. Is it a better practice to put the business logic in the helper or model?

---

## [How to give back the hand to AR error handling?](https://www.ruby-forum.com/t/how-to-give-back-the-hand-to-ar-error-handling/153556)

<div class="topic-metadata">

**Author:** [@itkin](https://www.ruby-forum.com/u/itkin)\
**Replies:** 0\
**Last updated:** [November 18, 2008, 7:18pm UTC](https://www.ruby-forum.com/t/how-to-give-back-the-hand-to-ar-error-handling/153556 "2008-11-18T19:18:15Z")

</div>

In controller I use to raise some specific error as follows : include CustomErrors rescue\_from NoGuestFound,NoHostFound,NoInvitation,WrongPass do |e| flash\[:message\] = e.message redirect\_to :action =\> :index end de…

---

## [Run migrations upon boot](https://www.ruby-forum.com/t/run-migrations-upon-boot/153196)

<div class="topic-metadata">

**Author:** [@clemens](https://www.ruby-forum.com/u/clemens)\
**Replies:** 11\
**Last updated:** [November 18, 2008, 6:59pm UTC](https://www.ruby-forum.com/t/run-migrations-upon-boot/153196 "2008-11-18T18:59:10Z")

</div>

We are in the development phase of a rails app which is hosted as war in GlassFish. Deployment works well, except for the migration part (which requires manual interaction). My question: is it “acceptable” to run mig…

---

## [Undefined method \`to\_query'](https://www.ruby-forum.com/t/undefined-method-to-query/153544)

<div class="topic-metadata">

**Author:** [@ian](https://www.ruby-forum.com/u/ian)\
**Replies:** 2\
**Last updated:** [November 18, 2008, 6:22pm UTC](https://www.ruby-forum.com/t/undefined-method-to-query/153544 "2008-11-18T18:22:47Z")

</div>

I’m trying to use a gem to access an API but I’m getting the message =\> undefined method \`to\_query’ I go into the terminal and run… p RAILS\_GEM\_VERSION “1.2.3” =\> nil Object.new.methods.include?(‘to\_query’) =\>…

---

## [Embedded SQL request](https://www.ruby-forum.com/t/embedded-sql-request/153549)

<div class="topic-metadata">

**Author:** [@vpredoehl](https://www.ruby-forum.com/u/vpredoehl)\
**Replies:** 0\
**Last updated:** [November 18, 2008, 5:14pm UTC](https://www.ruby-forum.com/t/embedded-sql-request/153549 "2008-11-18T17:14:17Z")

</div>

Hello, I’m trying to create a Rails like embedded request like that (it is working, I’m selecting projects ordered by number of contributors) : SELECT projects.id AS id, project\_topic, (SELECT count(\*) FROM project\_…

---

## [Testing controllers for DB changes?](https://www.ruby-forum.com/t/testing-controllers-for-db-changes/153419)

<div class="topic-metadata">

**Author:** [@davetron5000](https://www.ruby-forum.com/u/davetron5000)\
**Replies:** 2\
**Last updated:** [November 18, 2008, 5:05pm UTC](https://www.ruby-forum.com/t/testing-controllers-for-db-changes/153419 "2008-11-18T17:05:05Z")

</div>

New to Ruby and to Rails (but not to development or testing). Perhaps I’m going about this wrong, but I’m writing a functional test of my controller. The controller makes changes to the item being operated on and sa…

---

## [How to get results from database SQL query](https://www.ruby-forum.com/t/how-to-get-results-from-database-sql-query/153542)

<div class="topic-metadata">

**Author:** [@yan-oleg](https://www.ruby-forum.com/u/yan-oleg)\
**Replies:** 1\
**Last updated:** [November 18, 2008, 5:03pm UTC](https://www.ruby-forum.com/t/how-to-get-results-from-database-sql-query/153542 "2008-11-18T17:03:20Z")

</div>

I need to get results from SQL query to database. I have an SQL statement, e.g.: SELECT MAX(my\_field) max\_my\_field FROM my\_table WHERE id=5 I want to get the result, what is the max value. I have to get only one reco…

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

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