# Rails

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

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

---

## [Has\_and\_belong\_to\_many relation](https://www.ruby-forum.com/t/has-and-belong-to-many-relation/146515)

<div class="topic-metadata">

**Author:** [@pipex](https://www.ruby-forum.com/u/pipex)\
**Replies:** 4\
**Last updated:** [August 22, 2008, 4:41pm UTC](https://www.ruby-forum.com/t/has-and-belong-to-many-relation/146515 "2008-08-22T16:41:47Z")

</div>

First of all i have a conceptual doubt, I have 2 tables, post and user and both have many to many relation. Ok i do put in both models Post Model has\_and\_belongs\_to\_many :users Users Model has\_and\_belongs\_to\_many :…

---

## [About time compare](https://www.ruby-forum.com/t/about-time-compare/146542)

<div class="topic-metadata">

**Author:** [@daociyiyou](https://www.ruby-forum.com/u/daociyiyou)\
**Replies:** 4\
**Last updated:** [August 22, 2008, 4:13pm UTC](https://www.ruby-forum.com/t/about-time-compare/146542 "2008-08-22T16:13:35Z")

</div>

I have a submmited date param whose data type is date and want to use the Time object and the date param to judge if the date param passes the today. I use the following codes judging: ######### date.yday-Time.now.yd…

---

## [Not generating wsdl file?](https://www.ruby-forum.com/t/not-generating-wsdl-file/196787)

<div class="topic-metadata">

**Author:** [@varunkumargoel](https://www.ruby-forum.com/u/varunkumargoel)\
**Replies:** 0\
**Last updated:** [August 22, 2008, 3:25pm UTC](https://www.ruby-forum.com/t/not-generating-wsdl-file/196787 "2008-08-22T15:25:15Z")

</div>

Hi All, I have a class that extends ActionWebService and is able to generate a wsdl (http://localhost/mycontroller/service.wsdl) Error is: Template is missing Missing template ./script/…/config/…/app/views/mycontrol…

---

## [Has\_many and belongs\_to question](https://www.ruby-forum.com/t/has-many-and-belongs-to-question/146540)

<div class="topic-metadata">

**Author:** [@cobra050](https://www.ruby-forum.com/u/cobra050)\
**Replies:** 6\
**Last updated:** [August 22, 2008, 2:24pm UTC](https://www.ruby-forum.com/t/has-many-and-belongs-to-question/146540 "2008-08-22T14:24:05Z")

</div>

Hi, I have two tables, “users” and “users\_emails”. users have the following columns: |id|name| users\_emails have the following columns: |user\_id|email| The classes look like the following: class UsersEmail\< ActiveRe…

---

## [Db migrations](https://www.ruby-forum.com/t/db-migrations/146561)

<div class="topic-metadata">

**Author:** [@ramu](https://www.ruby-forum.com/u/ramu)\
**Replies:** 3\
**Last updated:** [August 22, 2008, 2:09pm UTC](https://www.ruby-forum.com/t/db-migrations/146561 "2008-08-22T14:09:50Z")

</div>

Hi All, I new to Rails worked for couple of projects in J2EE web technologies and PHP. I am very new to Rails while looking at the features, is it db migrations are really required?? I strongly feel that its over bur…

---

## [Model after\_\* methods](https://www.ruby-forum.com/t/model-after-methods/144976)

<div class="topic-metadata">

**Author:** [@predhme](https://www.ruby-forum.com/u/predhme)\
**Replies:** 2\
**Last updated:** [August 22, 2008, 1:18pm UTC](https://www.ruby-forum.com/t/model-after-methods/144976 "2008-08-22T13:18:52Z")

</div>

Hello, I have three models setup as such… User has\_many :requests Request has\_many :changes Changes belongs\_to :request belongs\_to :who, :class\_name =\> “User”, :foreign\_key =\> “user\_id” A user logs into the syst…

---

## [Install old version of rails](https://www.ruby-forum.com/t/install-old-version-of-rails/146565)

<div class="topic-metadata">

**Author:** [@ramu](https://www.ruby-forum.com/u/ramu)\
**Replies:** 2\
**Last updated:** [August 22, 2008, 1:02pm UTC](https://www.ruby-forum.com/t/install-old-version-of-rails/146565 "2008-08-22T13:02:37Z")

</div>

Hi, I am very new to rails, currently in my machine rails 2.0 is installed. But I want to have rails 1.2.3. Can you please let me know how I can install rails gme?? Thanks. Ramu.

---

## [Need help on REST API](https://www.ruby-forum.com/t/need-help-on-rest-api/146546)

<div class="topic-metadata">

**Author:** [@milindkanchan](https://www.ruby-forum.com/u/milindkanchan)\
**Replies:** 1\
**Last updated:** [August 22, 2008, 12:39pm UTC](https://www.ruby-forum.com/t/need-help-on-rest-api/146546 "2008-08-22T12:39:29Z")

</div>

Hi I have a User controller in my application(ROR 2.1.0) with CRUD actions. Now i need to create a REST WEBService API, so that the user registered to my site can use the API’s to CRUD the USER from there application…

---

## [Access denied](https://www.ruby-forum.com/t/access-denied/146562)

<div class="topic-metadata">

**Author:** [@redster](https://www.ruby-forum.com/u/redster)\
**Replies:** 1\
**Last updated:** [August 22, 2008, 11:52am UTC](https://www.ruby-forum.com/t/access-denied/146562 "2008-08-22T11:52:35Z")

</div>

Hi All i have run this program. i got this error Access denied for user ‘root’@‘localhost’ (using password: NO) i am using mysql db. below database.yml Install the MySQL driver: gem install mysql On MacOS X: gem…

---

## [\[ANN\] WiceAssignmentLists Plugin](https://www.ruby-forum.com/t/ann-wiceassignmentlists-plugin/146559)

<div class="topic-metadata">

**Author:** [@yuleven](https://www.ruby-forum.com/u/yuleven)\
**Replies:** 0\
**Last updated:** [August 22, 2008, 11:04am UTC](https://www.ruby-forum.com/t/ann-wiceassignmentlists-plugin/146559 "2008-08-22T11:04:31Z")

</div>

Hello, Our Rails team has published a small Rails plugin which is a view helper for a widget consisting of two multiple selection lists with items moveable from one to another, and an ajax filter field for the left …

---

## [Mime::Types where?](https://www.ruby-forum.com/t/mime-types-where/146555)

<div class="topic-metadata">

**Author:** [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Replies:** 2\
**Last updated:** [August 22, 2008, 10:29am UTC](https://www.ruby-forum.com/t/mime-types-where/146555 "2008-08-22T10:29:20Z")

</div>

I tried to use the Mime::Types in Ruby for my file upload. I added require ‘mime/types’ but it says “no such file to load”. Is it a gem or what? Something I should install?

---

## [How to apply a class method to a limited collection of the objects?](https://www.ruby-forum.com/t/how-to-apply-a-class-method-to-a-limited-collection-of-the-objects/146459)

<div class="topic-metadata">

**Author:** [@deegee](https://www.ruby-forum.com/u/deegee)\
**Replies:** 5\
**Last updated:** [August 22, 2008, 10:20am UTC](https://www.ruby-forum.com/t/how-to-apply-a-class-method-to-a-limited-collection-of-the-objects/146459 "2008-08-22T10:20:33Z")

</div>

Hi, I just can’t figure out how to do it, i’m sure it’s pretty simple: I have a model Order with a few named\_scope methods (:completed, :incompleted, :recent). Now I’d like to define a method that returns the latest …

---

## [Slow FIle Upload Safari and Litespeed](https://www.ruby-forum.com/t/slow-file-upload-safari-and-litespeed/146554)

<div class="topic-metadata">

**Author:** [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Replies:** 0\
**Last updated:** [August 22, 2008, 9:36am UTC](https://www.ruby-forum.com/t/slow-file-upload-safari-and-litespeed/146554 "2008-08-22T09:36:00Z")

</div>

When using file upload with Safari and Litespeed server it often get stuck and it looks like it’s loading but nothing happens. What could be wrong? Firefox is better. Also IE 7.

---

## [Javascript: click vs dblclick](https://www.ruby-forum.com/t/javascript-click-vs-dblclick/196788)

<div class="topic-metadata">

**Author:** [@mrdamien](https://www.ruby-forum.com/u/mrdamien)\
**Replies:** 2\
**Last updated:** [August 22, 2008, 9:21am UTC](https://www.ruby-forum.com/t/javascript-click-vs-dblclick/196788 "2008-08-22T09:21:11Z")

</div>

Hi All, I have some issues with click and dblclick event. I am listening both of them on some div but when I issue a dblclick, I get two single click plus another dblclick event. Do you know how to handle that and ge…

---

## [Need help regarding query log dataset](https://www.ruby-forum.com/t/need-help-regarding-query-log-dataset/146551)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [August 22, 2008, 9:11am UTC](https://www.ruby-forum.com/t/need-help-regarding-query-log-dataset/146551 "2008-08-22T09:11:26Z")

</div>

I am working on reserch thesis of inproving ranking of web search results. i need dataset of quey log of web search engine. I have AOL dataset but i need some other dataset i.e. google, altavista or ask. or any random…

---

## [How to show the images](https://www.ruby-forum.com/t/how-to-show-the-images/146550)

<div class="topic-metadata">

**Author:** [@lostwarrior](https://www.ruby-forum.com/u/lostwarrior)\
**Replies:** 1\
**Last updated:** [August 22, 2008, 9:00am UTC](https://www.ruby-forum.com/t/how-to-show-the-images/146550 "2008-08-22T09:00:53Z")

</div>

I am storing the images in /public/snapshots. for showing the images i have used image\_tag but in my image\_tag if i am going to write as \<%= image\_tag image.filename,:alt =\>image.filename,:size=\>‘320x244’%\> but the i…

---

## [ROR access through symlink(stylesheets are not called)](https://www.ruby-forum.com/t/ror-access-through-symlink-stylesheets-are-not-called/146549)

<div class="topic-metadata">

**Author:** [@mohdanas](https://www.ruby-forum.com/u/mohdanas)\
**Replies:** 0\
**Last updated:** [August 22, 2008, 8:46am UTC](https://www.ruby-forum.com/t/ror-access-through-symlink-stylesheets-are-not-called/146549 "2008-08-22T08:46:15Z")

</div>

Hi all. I have configured ROR in my server and its working fine when I access it through “localhost:3000”. But I want to access my ruby project as “localhost/ruby”. To do that I created a symlink of the public folder…

---

## [Ruby Openssl error / Webrick](https://www.ruby-forum.com/t/ruby-openssl-error-webrick/146397)

<div class="topic-metadata">

**Author:** [@mohdanas](https://www.ruby-forum.com/u/mohdanas)\
**Replies:** 3\
**Last updated:** [August 22, 2008, 8:42am UTC](https://www.ruby-forum.com/t/ruby-openssl-error-webrick/146397 "2008-08-22T08:42:10Z")

</div>

Hi There, I’m getting the following errors while starting webrick. I’m using (ruby 1.8.7 (2008-06-20 patchlevel 22) \[i686-linux\]), Rails 2.1.0, and Gem 1.2.0. I’m using the same in my local server and its working perf…

---

## [Has\_many show partial new foreign key - help](https://www.ruby-forum.com/t/has-many-show-partial-new-foreign-key-help/146498)

<div class="topic-metadata">

**Author:** [@tomtt](https://www.ruby-forum.com/u/tomtt)\
**Replies:** 3\
**Last updated:** [August 22, 2008, 4:55am UTC](https://www.ruby-forum.com/t/has-many-show-partial-new-foreign-key-help/146498 "2008-08-22T04:55:47Z")

</div>

Hi i have a 1-N Model: Company\<\>Division. everything is default. I want to have a Division/new partial in the Company/show view. so what i did was copying the new to \_new and render it with: Company/show: Title: …

---

## [Radio\_button\_tag - examining the selected value](https://www.ruby-forum.com/t/radio-button-tag-examining-the-selected-value/146438)

<div class="topic-metadata">

**Author:** [@mailbox\_abhishek](https://www.ruby-forum.com/u/mailbox_abhishek)\
**Replies:** 4\
**Last updated:** [August 22, 2008, 3:55am UTC](https://www.ruby-forum.com/t/radio-button-tag-examining-the-selected-value/146438 "2008-08-22T03:55:10Z")

</div>

Hi All I have four radio buttons created like this \<%= radio\_button\_tag :answers, 1, false %\> a \<br/\> \<%= radio\_button\_tag :answers, 2, false %\> b \<br/\> \<%= radio\_button\_tag :answers, 3, false %\> c \<br/\> …

---

## [Ar-extensions import - on\_duplicate\_key\_update error](https://www.ruby-forum.com/t/ar-extensions-import-on-duplicate-key-update-error/146534)

<div class="topic-metadata">

**Author:** [@frexuz](https://www.ruby-forum.com/u/frexuz)\
**Replies:** 0\
**Last updated:** [August 22, 2008, 3:52am UTC](https://www.ruby-forum.com/t/ar-extensions-import-on-duplicate-key-update-error/146534 "2008-08-22T03:52:00Z")

</div>

This works perfectly the first time i run the script and every row gets inserted. But when ran a second time, when the code should update duplicate table rows instead of inserting, then this error appears (first objec…

---

## [Installing on ubuntu (openssl)](https://www.ruby-forum.com/t/installing-on-ubuntu-openssl/139633)

<div class="topic-metadata">

**Author:** [@gorter9](https://www.ruby-forum.com/u/gorter9)\
**Replies:** 3\
**Last updated:** [August 22, 2008, 3:23am UTC](https://www.ruby-forum.com/t/installing-on-ubuntu-openssl/139633 "2008-08-22T03:23:54Z")

</div>

after the whole day of problems with installing ruby and rails on my ubuntu PC i got a problem i can’t find info on the web. =\> Booting Mongrel (use ‘script/server webrick’ to force WEBrick) =\> Rails 2.1.0 applicatio…

---

## [Problem deploying simplelog](https://www.ruby-forum.com/t/problem-deploying-simplelog/146530)

<div class="topic-metadata">

**Author:** [@farfignugen](https://www.ruby-forum.com/u/farfignugen)\
**Replies:** 0\
**Last updated:** [August 22, 2008, 2:00am UTC](https://www.ruby-forum.com/t/problem-deploying-simplelog/146530 "2008-08-22T02:00:41Z")

</div>

Hi, Im trying to run simplelogs instllation at the moment and im running into issues. Im not sure exactly what the error is telling me. the url is: www.chris-gallagher.com - if you browse there youll see the modrails …

---

## [Noobie guides](https://www.ruby-forum.com/t/noobie-guides/146517)

<div class="topic-metadata">

**Author:** [@rjt](https://www.ruby-forum.com/u/rjt)\
**Replies:** 1\
**Last updated:** [August 21, 2008, 10:35pm UTC](https://www.ruby-forum.com/t/noobie-guides/146517 "2008-08-21T22:35:47Z")

</div>

im looking for guides for noobies im new to ruby and rails so any guides people can give would be fantastic Richard Thomas

---

## [Ruby Sessions - getting created for every request from IE](https://www.ruby-forum.com/t/ruby-sessions-getting-created-for-every-request-from-ie/145744)

<div class="topic-metadata">

**Author:** [@sgudibanda](https://www.ruby-forum.com/u/sgudibanda)\
**Replies:** 4\
**Last updated:** [August 21, 2008, 10:24pm UTC](https://www.ruby-forum.com/t/ruby-sessions-getting-created-for-every-request-from-ie/145744 "2008-08-21T22:24:28Z")

</div>

Hi, I am seeing this weird bug. I create a session for each new user, and keep updating the same session. If he logs in, i update his user\_id into the session, so that i can keep track if he is logged in or not,and su…

---

## [How to bypass model validation](https://www.ruby-forum.com/t/how-to-bypass-model-validation/146507)

<div class="topic-metadata">

**Author:** [@Arslan\_Ali](https://www.ruby-forum.com/u/Arslan_Ali)\
**Replies:** 4\
**Last updated:** [August 21, 2008, 8:48pm UTC](https://www.ruby-forum.com/t/how-to-bypass-model-validation/146507 "2008-08-21T20:48:04Z")

</div>

I have a model named as user, this model have check of password between length 6 to 16. But there are some scenarios where i cannot provide password while creating instance of user model. Here i am unable to save part…

---

## [Using time.now.advance](https://www.ruby-forum.com/t/using-time-now-advance/146502)

<div class="topic-metadata">

**Author:** [@jeremy](https://www.ruby-forum.com/u/jeremy)\
**Replies:** 5\
**Last updated:** [August 21, 2008, 8:45pm UTC](https://www.ruby-forum.com/t/using-time-now-advance/146502 "2008-08-21T20:45:44Z")

</div>

Hi, I’m building somewhat of a billing system which needs to set next renewal dates for each account package. In my account\_package model I have this: class AccountPackage \< ActiveRecord::Base belongs\_to :account …

---

## [Validates\_uniqueness\_of not working - urgent](https://www.ruby-forum.com/t/validates-uniqueness-of-not-working-urgent/146505)

<div class="topic-metadata">

**Author:** [@vince](https://www.ruby-forum.com/u/vince)\
**Replies:** 1\
**Last updated:** [August 21, 2008, 8:25pm UTC](https://www.ruby-forum.com/t/validates-uniqueness-of-not-working-urgent/146505 "2008-08-21T20:25:47Z")

</div>

I’m using restful\_authentication to let users register and login. Lately, however, I’m seeing multiple login and emails being created even though I have validates\_uniqueness\_of as below: user.rb validates\_uniqueness\_…

---

## [Using Active records as data objects](https://www.ruby-forum.com/t/using-active-records-as-data-objects/146504)

<div class="topic-metadata">

**Author:** [@sanand83](https://www.ruby-forum.com/u/sanand83)\
**Replies:** 0\
**Last updated:** [August 21, 2008, 8:12pm UTC](https://www.ruby-forum.com/t/using-active-records-as-data-objects/146504 "2008-08-21T20:12:53Z")

</div>

Hi Is there a way to use Active Records only as data objects? I have a mixed server environment \[rails and non rails\] and I have to pass the data objects around \[memcached bus etc\]. The current option I have is to d…

---

## [Rails 2.1 after upgrade from 1.2.6 have fixture weirdness](https://www.ruby-forum.com/t/rails-2-1-after-upgrade-from-1-2-6-have-fixture-weirdness/145345)

<div class="topic-metadata">

**Author:** [@rooster](https://www.ruby-forum.com/u/rooster)\
**Replies:** 2\
**Last updated:** [August 21, 2008, 7:13pm UTC](https://www.ruby-forum.com/t/rails-2-1-after-upgrade-from-1-2-6-have-fixture-weirdness/145345 "2008-08-21T19:13:42Z")

</div>

Hi, I am seeing some strangeness with fixture loading in our suite of specs. 1st up any join table fixture or namespaced model causes an error in test.log example Unable to load advertising\_channels\_position\_profil…

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

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