# Rails

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

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

---

## [Missin localizations](https://www.ruby-forum.com/t/missin-localizations/165731)

<div class="topic-metadata">

**Author:** [@giga](https://www.ruby-forum.com/u/giga)\
**Replies:** 0\
**Last updated:** [April 16, 2009, 8:40pm UTC](https://www.ruby-forum.com/t/missin-localizations/165731 "2009-04-16T20:40:52Z")

</div>

Is it possible to put in log-file if some localization is missing? I use Rails 2.3 i18n.

---

## [Problems with tests](https://www.ruby-forum.com/t/problems-with-tests/165675)

<div class="topic-metadata">

**Author:** [@josh](https://www.ruby-forum.com/u/josh)\
**Replies:** 7\
**Last updated:** [April 16, 2009, 8:39pm UTC](https://www.ruby-forum.com/t/problems-with-tests/165675 "2009-04-16T20:39:37Z")

</div>

Hi all I’m trying to write good unit tests. Here’s part of my blog\_test.rb: — blog\_test.rb: require File.dirname(FILE) + ‘/…/test\_helper’ class BlogTest \< Test::Unit::TestCase fixtures :blogs, :comments def setup …

---

## [Silence logging altogether for certain actions?](https://www.ruby-forum.com/t/silence-logging-altogether-for-certain-actions/165650)

<div class="topic-metadata">

**Author:** [@nwiger](https://www.ruby-forum.com/u/nwiger)\
**Replies:** 3\
**Last updated:** [April 16, 2009, 7:56pm UTC](https://www.ruby-forum.com/t/silence-logging-altogether-for-certain-actions/165650 "2009-04-16T19:56:41Z")

</div>

Hi, I am looking for a way to silence logging altogether for certain actions. Our app talks to other servers and session components, and our logs get filled up with this nonsense, even in Production mode. I want to …

---

## [ActiveRecord Comparison Bug?](https://www.ruby-forum.com/t/activerecord-comparison-bug/165112)

<div class="topic-metadata">

**Author:** [@moo](https://www.ruby-forum.com/u/moo)\
**Replies:** 6\
**Last updated:** [April 16, 2009, 7:12pm UTC](https://www.ruby-forum.com/t/activerecord-comparison-bug/165112 "2009-04-16T19:12:00Z")

</div>

Hi Everyone, I’m running into a problem with the ActiveRecord::Base “==” method defined here (it’s 2.3.2, but it looks the same in older versions too): # File rails-2.3.2/activerecord/lib/active\_record/base.rb, lin…

---

## [How to ensure](https://www.ruby-forum.com/t/how-to-ensure/165658)

<div class="topic-metadata">

**Author:** [@daociyiyou](https://www.ruby-forum.com/u/daociyiyou)\
**Replies:** 5\
**Last updated:** [April 16, 2009, 6:39pm UTC](https://www.ruby-forum.com/t/how-to-ensure/165658 "2009-04-16T18:39:07Z")

</div>

how do i get my app database info only after another server has called my app’s method and updated my app’s database? Now, i can just get the database info before anther server calls my app’s method. def one some co…

---

## [Deprec problem](https://www.ruby-forum.com/t/deprec-problem/165717)

<div class="topic-metadata">

**Author:** [@mahmoud\_cs](https://www.ruby-forum.com/u/mahmoud_cs)\
**Replies:** 0\
**Last updated:** [April 16, 2009, 6:39pm UTC](https://www.ruby-forum.com/t/deprec-problem/165717 "2009-04-16T18:39:07Z")

</div>

I install deprec with gem install deprec but when i write deprec --apply-to . this message display to me " ‘deprec’ is not recognized as an internal or external command, operable program or batch file. " what …

---

## [Rating Model and DB Relationships](https://www.ruby-forum.com/t/rating-model-and-db-relationships/165416)

<div class="topic-metadata">

**Author:** [@jason](https://www.ruby-forum.com/u/jason)\
**Replies:** 9\
**Last updated:** [April 16, 2009, 6:27pm UTC](https://www.ruby-forum.com/t/rating-model-and-db-relationships/165416 "2009-04-16T18:27:58Z")

</div>

I am still learning Rails and the relationships are still a little confusion. So I apologize in advance for the repetition of this question. I am building a user rating system for words and quotes. If I wanted a user…

---

## [Associations](https://www.ruby-forum.com/t/associations/165707)

<div class="topic-metadata">

**Author:** [@bingobob](https://www.ruby-forum.com/u/bingobob)\
**Replies:** 3\
**Last updated:** [April 16, 2009, 6:01pm UTC](https://www.ruby-forum.com/t/associations/165707 "2009-04-16T18:01:48Z")

</div>

I’d like to do something like this…in English, a Teacher is in a town (easy). They also can have qualifications (from none to lots). How do I do this, I mean I can see a Teacher could have a QualificationID field whic…

---

## [Time.now cached in model association?](https://www.ruby-forum.com/t/time-now-cached-in-model-association/165702)

<div class="topic-metadata">

**Author:** [@yannimac](https://www.ruby-forum.com/u/yannimac)\
**Replies:** 3\
**Last updated:** [April 16, 2009, 4:56pm UTC](https://www.ruby-forum.com/t/time-now-cached-in-model-association/165702 "2009-04-16T16:56:17Z")

</div>

I have an object that has\_many widgets, but I only want the widgets that are not expired associated with this object. My app is showing widgets that are expired, so the date must be getting cached. Anyone got a simp…

---

## [Chess game](https://www.ruby-forum.com/t/chess-game/165686)

<div class="topic-metadata">

**Author:** [@tunickelz](https://www.ruby-forum.com/u/tunickelz)\
**Replies:** 4\
**Last updated:** [April 16, 2009, 4:45pm UTC](https://www.ruby-forum.com/t/chess-game/165686 "2009-04-16T16:45:56Z")

</div>

I am making a website with one view while creating a chess game in ruby. I’d rather not use Rails… some info on easier ways to accomplish this would be great. But anyway, where do I put the game’s .rb files etc?

---

## [Email validation in controller](https://www.ruby-forum.com/t/email-validation-in-controller/196941)

<div class="topic-metadata">

**Author:** [@hamidraza](https://www.ruby-forum.com/u/hamidraza)\
**Replies:** 1\
**Last updated:** [April 16, 2009, 3:52pm UTC](https://www.ruby-forum.com/t/email-validation-in-controller/196941 "2009-04-16T15:52:02Z")

</div>

hi all , i want to check/validate email in controller, with out using model . plz some one help me out. thx in advance

---

## [Is it possible to render a modal dialog box from the server?](https://www.ruby-forum.com/t/is-it-possible-to-render-a-modal-dialog-box-from-the-server/165496)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 4\
**Last updated:** [April 16, 2009, 3:49pm UTC](https://www.ruby-forum.com/t/is-it-possible-to-render-a-modal-dialog-box-from-the-server/165496 "2009-04-16T15:49:06Z")

</div>

I have a before filter that authorizes a user’s credentials before giving them access to any protected methods (pretty standard practice). If they fail authorization, I want to direct them to a chance to login or to c…

---

## [Problem with deleting multiple users](https://www.ruby-forum.com/t/problem-with-deleting-multiple-users/165703)

<div class="topic-metadata">

**Author:** [@marika](https://www.ruby-forum.com/u/marika)\
**Replies:** 0\
**Last updated:** [April 16, 2009, 3:45pm UTC](https://www.ruby-forum.com/t/problem-with-deleting-multiple-users/165703 "2009-04-16T15:45:27Z")

</div>

Hello! I’m a beginner with ruby on rails, so I don’t really know what I’m doing :wink: I have a index.html.erb where I list users. Before every user is a checkbox, which I’d like to use when destroying several users. …

---

## [Validate\_presence\_of :user or :user\_id?](https://www.ruby-forum.com/t/validate-presence-of-user-or-user-id/165698)

<div class="topic-metadata">

**Author:** [@josh](https://www.ruby-forum.com/u/josh)\
**Replies:** 4\
**Last updated:** [April 16, 2009, 3:35pm UTC](https://www.ruby-forum.com/t/validate-presence-of-user-or-user-id/165698 "2009-04-16T15:35:30Z")

</div>

Hi all I’m a bit confused whether it’s better to check for the ID of a related object or the related object itself? validates\_presence\_of :user # is this better? validates\_presence\_of :user\_id # or is this better? …

---

## [How to convert the find\_by\_sql code to the find code](https://www.ruby-forum.com/t/how-to-convert-the-find-by-sql-code-to-the-find-code/165700)

<div class="topic-metadata">

**Author:** [@salil](https://www.ruby-forum.com/u/salil)\
**Replies:** 0\
**Last updated:** [April 16, 2009, 3:33pm UTC](https://www.ruby-forum.com/t/how-to-convert-the-find-by-sql-code-to-the-find-code/165700 "2009-04-16T15:33:55Z")

</div>

I want to convert following query into pure ruby one i.e. by using find @us\_state\_sales=SalesReport.find\_by\_sql(“SELECT z.state, sum(s.royalty\_price) as royalty\_price, sum(s.units) as units FROM sales\_reports s, zip\_c…

---

## [Query from tables that have one column name in common](https://www.ruby-forum.com/t/query-from-tables-that-have-one-column-name-in-common/165697)

<div class="topic-metadata">

**Author:** [@mikam](https://www.ruby-forum.com/u/mikam)\
**Replies:** 0\
**Last updated:** [April 16, 2009, 3:06pm UTC](https://www.ruby-forum.com/t/query-from-tables-that-have-one-column-name-in-common/165697 "2009-04-16T15:06:10Z")

</div>

Hi! I have a situation where I need to get data from multiple tables and two of them share one column name. In table “order\_items” and “products” there is column “cost\_price”. Now when I do the following query I get m…

---

## [Multiply forms?](https://www.ruby-forum.com/t/multiply-forms/165696)

<div class="topic-metadata">

**Author:** [@remco](https://www.ruby-forum.com/u/remco)\
**Replies:** 1\
**Last updated:** [April 16, 2009, 2:54pm UTC](https://www.ruby-forum.com/t/multiply-forms/165696 "2009-04-16T14:54:25Z")

</div>

Hi, On my homepage i want a form with the element drop-down-box. When the visitor select one of the values from the drop-down-box and click on submit, the visitor go’s to the details-page where the value from the dro…

---

## [Explicit Validation of Email in controller](https://www.ruby-forum.com/t/explicit-validation-of-email-in-controller/165693)

<div class="topic-metadata">

**Author:** [@hamidraza](https://www.ruby-forum.com/u/hamidraza)\
**Replies:** 1\
**Last updated:** [April 16, 2009, 2:34pm UTC](https://www.ruby-forum.com/t/explicit-validation-of-email-in-controller/165693 "2009-04-16T14:34:31Z")

</div>

hi all , i want to check/validate email in controller, with out using model . plz some one help me out. thx in advance

---

## [Magic multi connections with association problem](https://www.ruby-forum.com/t/magic-multi-connections-with-association-problem/165694)

<div class="topic-metadata">

**Author:** [@on9west](https://www.ruby-forum.com/u/on9west)\
**Replies:** 0\
**Last updated:** [April 16, 2009, 2:24pm UTC](https://www.ruby-forum.com/t/magic-multi-connections-with-association-problem/165694 "2009-04-16T14:24:57Z")

</div>

Dear all I am using magic multi connections, there is some problem when using association. How can I dynamic determine the module name (i.e. A::Request, B::Request) in activerecord association. Below is my code: mod…

---

## [New to Ruby on Rails](https://www.ruby-forum.com/t/new-to-ruby-on-rails/165681)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [April 16, 2009, 2:14pm UTC](https://www.ruby-forum.com/t/new-to-ruby-on-rails/165681 "2009-04-16T14:14:26Z")

</div>

Hi I have installed ruby186-26 using this link While i am trying to use this http://127.0.0.1:3000/garbage/ It says We’re sorry, but something went wrong. We’ve been notified about this issue and we’ll take a look …

---

## [Attachment foo - files security](https://www.ruby-forum.com/t/attachment-foo-files-security/165688)

<div class="topic-metadata">

**Author:** [@Zirael](https://www.ruby-forum.com/u/Zirael)\
**Replies:** 2\
**Last updated:** [April 16, 2009, 2:03pm UTC](https://www.ruby-forum.com/t/attachment-foo-files-security/165688 "2009-04-16T14:03:31Z")

</div>

Hi, I am using attachment\_foo for sharing files between users. Everything works fine but I am worry about the security. All files are stored in the public rails folder so any browser can easily access these files!! …

---

## [Have simple sidebar code snippet for application.html.erb?](https://www.ruby-forum.com/t/have-simple-sidebar-code-snippet-for-application-html-erb/165659)

<div class="topic-metadata">

**Author:** [@rubio](https://www.ruby-forum.com/u/rubio)\
**Replies:** 7\
**Last updated:** [April 16, 2009, 1:41pm UTC](https://www.ruby-forum.com/t/have-simple-sidebar-code-snippet-for-application-html-erb/165659 "2009-04-16T13:41:30Z")

</div>

Googled forever trying to find a good example of how to do a simple sidebar (code snippet) in application.html.erb. I’ve found bits and pieces, but I need the whole “piece of meat”. Is anyone willing to share a compl…

---

## [Check Box and Radio Button](https://www.ruby-forum.com/t/check-box-and-radio-button/165663)

<div class="topic-metadata">

**Author:** [@psnavaneethan](https://www.ruby-forum.com/u/psnavaneethan)\
**Replies:** 5\
**Last updated:** [April 16, 2009, 12:57pm UTC](https://www.ruby-forum.com/t/check-box-and-radio-button/165663 "2009-04-16T12:57:53Z")

</div>

I am using multiple check box and a radio button and when I click the “Submit” button, it calls the “create” method it is inserting only 1 value for checkbox and also for the radio button. Could you please tell how…

---

## [Error: Something went wrong](https://www.ruby-forum.com/t/error-something-went-wrong/165682)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [April 16, 2009, 12:48pm UTC](https://www.ruby-forum.com/t/error-something-went-wrong/165682 "2009-04-16T12:48:41Z")

</div>

Hi I have installed ruby 186-26. Not sql server. when i use 127.0.0.1/ garbage it says something went wrong in the browser. What is the problem ? Saravanan

---

## [How to test :dependent =\> :destroy](https://www.ruby-forum.com/t/how-to-test-dependent-destroy/165677)

<div class="topic-metadata">

**Author:** [@josh](https://www.ruby-forum.com/u/josh)\
**Replies:** 6\
**Last updated:** [April 16, 2009, 12:29pm UTC](https://www.ruby-forum.com/t/how-to-test-dependent-destroy/165677 "2009-04-16T12:29:29Z")

</div>

Hi there :slight\_smile: I wanted to know what’s a good way to test whether dependent objects are really destroyed when destroying the parent object? I have a Blog model which has\_many Comment model children. These co…

---

## [Passenger caching in development mode, wtf?](https://www.ruby-forum.com/t/passenger-caching-in-development-mode-wtf/165544)

<div class="topic-metadata">

**Author:** [@petrjanda](https://www.ruby-forum.com/u/petrjanda)\
**Replies:** 7\
**Last updated:** [April 16, 2009, 10:56am UTC](https://www.ruby-forum.com/t/passenger-caching-in-development-mode-wtf/165544 "2009-04-16T10:56:27Z")

</div>

Hi all, I updated an application to Rails 2.3.2(and ruby 1.9.1) and installed Passenger, after learning that it turns production mode on by default, i changed that to development mode. Logs are correctly being saved t…

---

## [Cant get my hello world working](https://www.ruby-forum.com/t/cant-get-my-hello-world-working/165668)

<div class="topic-metadata">

**Author:** [@madhu](https://www.ruby-forum.com/u/madhu)\
**Replies:** 1\
**Last updated:** [April 16, 2009, 10:40am UTC](https://www.ruby-forum.com/t/cant-get-my-hello-world-working/165668 "2009-04-16T10:40:38Z")

</div>

I followed the steps as mentioned in the link below to get up and running on rails, but I cant figure whats the issue with running the rails command. Can someone help me navigate further please. Thanks.

---

## [Oci 8 path prblem](https://www.ruby-forum.com/t/oci-8-path-prblem/165670)

<div class="topic-metadata">

**Author:** [@doelsengupta](https://www.ruby-forum.com/u/doelsengupta)\
**Replies:** 0\
**Last updated:** [April 16, 2009, 10:31am UTC](https://www.ruby-forum.com/t/oci-8-path-prblem/165670 "2009-04-16T10:31:25Z")

</div>

I have installed, ruby oci8, to run an application on oracle but still, error as no such file to load -------- for oci8 is coming.

---

## [College Summer Classes in Ruby-on-Rails](https://www.ruby-forum.com/t/college-summer-classes-in-ruby-on-rails/165667)

<div class="topic-metadata">

**Author:** [@Al\_Snow](https://www.ruby-forum.com/u/Al_Snow)\
**Replies:** 0\
**Last updated:** [April 16, 2009, 9:49am UTC](https://www.ruby-forum.com/t/college-summer-classes-in-ruby-on-rails/165667 "2009-04-16T09:49:01Z")

</div>

Looking for local tech college classes, hopefully starting in May or June 2009, in Ruby-on-Rails in metro-Atlanta, GA area. Please respond to jasnow1 (at) gmail (dot) com Thanks, Al

---

## [URL Redirect and affect on Routes?](https://www.ruby-forum.com/t/url-redirect-and-affect-on-routes/165546)

<div class="topic-metadata">

**Author:** [@jason](https://www.ruby-forum.com/u/jason)\
**Replies:** 2\
**Last updated:** [April 16, 2009, 4:59am UTC](https://www.ruby-forum.com/t/url-redirect-and-affect-on-routes/165546 "2009-04-16T04:59:54Z")

</div>

I still don’t fully understand routes, so I apologize in advance. I have a single rails app, but multiple domains pointing to different directories for marketing reasons. I am looking for a way to have the secondary d…

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

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