# Rails

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

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

---

## [How to do password expire after 15 days?](https://www.ruby-forum.com/t/how-to-do-password-expire-after-15-days/183204)

<div class="topic-metadata">

**Author:** [@Maycon\_Felici](https://www.ruby-forum.com/u/Maycon_Felici)\
**Replies:** 2\
**Last updated:** [February 10, 2010, 12:54pm UTC](https://www.ruby-forum.com/t/how-to-do-password-expire-after-15-days/183204 "2010-02-10T12:54:30Z")

</div>

Hello, I need to create a application wich registereds users have yours passwords expired after 15 days in order that I can generate a new password and send them by email. Tanks, Sorry, my english no good.

---

## [Text\_field instead of a collection\_select](https://www.ruby-forum.com/t/text-field-instead-of-a-collection-select/182533)

<div class="topic-metadata">

**Author:** [@eugenio](https://www.ruby-forum.com/u/eugenio)\
**Replies:** 5\
**Last updated:** [February 10, 2010, 12:53pm UTC](https://www.ruby-forum.com/t/text-field-instead-of-a-collection-select/182533 "2010-02-10T12:53:55Z")

</div>

one of my model belongs\_to another (zip codes). i would like to let the user insert the zip code in a text field instead of the select menu generated by the collection\_select. No new zip code should be created and the…

---

## [Globalize2 advice needed](https://www.ruby-forum.com/t/globalize2-advice-needed/183118)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 6\
**Last updated:** [February 10, 2010, 10:07am UTC](https://www.ruby-forum.com/t/globalize2-advice-needed/183118 "2010-02-10T10:07:18Z")

</div>

Hey all I’m doing my first i18n app in rails 2.3.4. I installed the globalize2 plugin and am now struggling to understand what’s going on - there’s not much documentation i can see for globalize2 besides the home pag…

---

## [Undefined method \`generate\_token'](https://www.ruby-forum.com/t/undefined-method-generate-token/183209)

<div class="topic-metadata">

**Author:** [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Replies:** 2\
**Last updated:** [February 10, 2010, 9:29am UTC](https://www.ruby-forum.com/t/undefined-method-generate-token/183209 "2010-02-10T09:29:04Z")

</div>

Hi Everyone… I’m following a railscast episode on how to implement an invitation feature. It’s going really well, but i’ve hit a minor snag that I cant get over… undefined method \`generate\_token’ for #Invitation:0x2…

---

## [ActionMailer attaching generated files](https://www.ruby-forum.com/t/actionmailer-attaching-generated-files/182634)

<div class="topic-metadata">

**Author:** [@creativelogic](https://www.ruby-forum.com/u/creativelogic)\
**Replies:** 4\
**Last updated:** [February 10, 2010, 6:37am UTC](https://www.ruby-forum.com/t/actionmailer-attaching-generated-files/182634 "2010-02-10T06:37:23Z")

</div>

I have a script that is running as a runner script, its job is to find reports that have recently been published and send emails to the users notifying them of the reports. The reports are available online, but are al…

---

## [RangeError: 0x... is recycled object; rails-footnotes](https://www.ruby-forum.com/t/rangeerror-0x-is-recycled-object-rails-footnotes/183224)

<div class="topic-metadata">

**Author:** [@ralphshnelvar](https://www.ruby-forum.com/u/ralphshnelvar)\
**Replies:** 0\
**Last updated:** [February 10, 2010, 6:28am UTC](https://www.ruby-forum.com/t/rangeerror-0x-is-recycled-object-rails-footnotes/183224 "2010-02-10T06:28:07Z")

</div>

I am using the GEM, rails-footnotes. Preliminary testing shos that if I have it enabled … I get the RangeError: 0x379597a is recycled object strange message. It seems that the entire GEM directory is .rb files (excep…

---

## [How to get Website Templates for a Ruby on Rails](https://www.ruby-forum.com/t/how-to-get-website-templates-for-a-ruby-on-rails/183223)

<div class="topic-metadata">

**Author:** [@ashishdeb](https://www.ruby-forum.com/u/ashishdeb)\
**Replies:** 1\
**Last updated:** [February 10, 2010, 6:23am UTC](https://www.ruby-forum.com/t/how-to-get-website-templates-for-a-ruby-on-rails/183223 "2010-02-10T06:23:03Z")

</div>

Hi Guys, I am a ruby programmer and want to have a crack on building a online store website (eg.tshirt, pants, etc) using ruby on rails as it will be a known territory for me rather than learning php, etc. Anyways, I…

---

## [Accepts\_nested\_attributes\_for abilities](https://www.ruby-forum.com/t/accepts-nested-attributes-for-abilities/183216)

<div class="topic-metadata">

**Author:** [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Replies:** 1\
**Last updated:** [February 10, 2010, 2:24am UTC](https://www.ruby-forum.com/t/accepts-nested-attributes-for-abilities/183216 "2010-02-10T02:24:48Z")

</div>

Is there a way to use accepts\_nested\_attributes\_for to update another table from within a controller. For example, I have this in my students controller: def student\_fail @student = Subject.find(params\[:id\]) if param…

---

## [Proper Installation on Debian?](https://www.ruby-forum.com/t/proper-installation-on-debian/183211)

<div class="topic-metadata">

**Author:** [@snow-templar](https://www.ruby-forum.com/u/snow-templar)\
**Replies:** 0\
**Last updated:** [February 10, 2010, 1:01am UTC](https://www.ruby-forum.com/t/proper-installation-on-debian/183211 "2010-02-10T01:01:12Z")

</div>

So I have been trying to follow the instructions on Wayback Machine to get rails to be running properly on my Debian machine, but I have been running into several issues. The first one just being the version of RubyG…

---

## [Error running Mongrel on Ruby 1.9](https://www.ruby-forum.com/t/error-running-mongrel-on-ruby-1-9/180868)

<div class="topic-metadata">

**Author:** [@amabdelsalam](https://www.ruby-forum.com/u/amabdelsalam)\
**Replies:** 2\
**Last updated:** [February 9, 2010, 11:18pm UTC](https://www.ruby-forum.com/t/error-running-mongrel-on-ruby-1-9/180868 "2010-02-09T23:18:06Z")

</div>

Hi, I have a problem running Mongrel, I’m using the latest ruby 1.9 and rails 2.3.5 when I start the server (I’m using Aptana IDE), on mongrel, here is the output: C:/Ruby19/lib/ruby/gems/1.9.1/gems/activesupport-2.…

---

## [Quality Officer](https://www.ruby-forum.com/t/quality-officer/183202)

<div class="topic-metadata">

**Author:** [@irenka](https://www.ruby-forum.com/u/irenka)\
**Replies:** 0\
**Last updated:** [February 9, 2010, 11:12pm UTC](https://www.ruby-forum.com/t/quality-officer/183202 "2010-02-09T23:12:49Z")

</div>

Cubiware jest spó³ka zajmuj±ca siê tworzeniem oprogramowania dla urz±dzeñ interaktywnej telewizji cyfrowej oraz internetowej. Firma wspó³pracuje z klientami i partnerami zagranicznymi, a nasze oprogramowanie jest u¿yw…

---

## [Tool for visualizing schema and associations](https://www.ruby-forum.com/t/tool-for-visualizing-schema-and-associations/183001)

<div class="topic-metadata">

**Author:** [@jeffpritchard](https://www.ruby-forum.com/u/jeffpritchard)\
**Replies:** 5\
**Last updated:** [February 9, 2010, 10:15pm UTC](https://www.ruby-forum.com/t/tool-for-visualizing-schema-and-associations/183001 "2010-02-09T22:15:26Z")

</div>

I’m working with other people on a Rails project with a fairly “deep” set of interconnected data. This is the first time I’ve tried to discuss data organization with non-database-savvy folks (they know and understand …

---

## [Updating attributes of another model](https://www.ruby-forum.com/t/updating-attributes-of-another-model/183197)

<div class="topic-metadata">

**Author:** [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Replies:** 1\
**Last updated:** [February 9, 2010, 10:11pm UTC](https://www.ruby-forum.com/t/updating-attributes-of-another-model/183197 "2010-02-09T22:11:55Z")

</div>

I hve a relationship like this in my model: Student has\_one :student\_fail StudentFail belongs\_to :student\_fail\_state belongs\_to :student StudentFailState has\_many :students, :through =\> :student\_fail has\_many :st…

---

## [Auto\_complete always selects the first item, can i prevent this?](https://www.ruby-forum.com/t/auto-complete-always-selects-the-first-item-can-i-prevent-this/183196)

<div class="topic-metadata">

**Author:** [@dino\_d](https://www.ruby-forum.com/u/dino_d)\
**Replies:** 1\
**Last updated:** [February 9, 2010, 10:07pm UTC](https://www.ruby-forum.com/t/auto-complete-always-selects-the-first-item-can-i-prevent-this/183196 "2010-02-09T22:07:49Z")

</div>

if you use google or yahoo’s search autocomplete, you’ll see that they do not select the first item automatically. this way, if you don’t choose an item, and hit return, the return submits the form. is there a way t…

---

## [.find() with contents of Array](https://www.ruby-forum.com/t/find-with-contents-of-array/183194)

<div class="topic-metadata">

**Author:** [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Replies:** 1\
**Last updated:** [February 9, 2010, 9:14pm UTC](https://www.ruby-forum.com/t/find-with-contents-of-array/183194 "2010-02-09T21:14:50Z")

</div>

Hello all, I’m on my 4th month with Ruby on Rails. I’m doing good, I think, but have a long way to go. I have an array with several IDs. Array \[1,4,6,10,40\] I wish to perform a find() on a Model, on each of these I…

---

## [Text\_field\_with\_auto\_complete without a model](https://www.ruby-forum.com/t/text-field-with-auto-complete-without-a-model/183179)

<div class="topic-metadata">

**Author:** [@dino\_d](https://www.ruby-forum.com/u/dino_d)\
**Replies:** 1\
**Last updated:** [February 9, 2010, 9:12pm UTC](https://www.ruby-forum.com/t/text-field-with-auto-complete-without-a-model/183179 "2010-02-09T21:12:48Z")

</div>

hi- is this possible? basically, i have a simple search text box whose contents i want to send to my server to suggest a query. that suggested query will be in turn retrieved from a 3rd party API. I cannot figure o…

---

## [How to use ruby script/console to debug methods in application.rb?](https://www.ruby-forum.com/t/how-to-use-ruby-script-console-to-debug-methods-in-application-rb/183145)

<div class="topic-metadata">

**Author:** [@lukas](https://www.ruby-forum.com/u/lukas)\
**Replies:** 5\
**Last updated:** [February 9, 2010, 8:44pm UTC](https://www.ruby-forum.com/t/how-to-use-ruby-script-console-to-debug-methods-in-application-rb/183145 "2010-02-09T20:44:20Z")

</div>

Hello everyone, newbie question: I have a couple of methods that interact with a remote python server in application.rb. Is there a convenient way to debug them? e.g. run them from “ruby script/console” - debug-cons…

---

## [ym4r/GM GLatLng and RJS](https://www.ruby-forum.com/t/ym4r-gm-glatlng-and-rjs/69412)

<div class="topic-metadata">

**Author:** [@shaper](https://www.ruby-forum.com/u/shaper)\
**Replies:** 3\
**Last updated:** [February 9, 2010, 7:26pm UTC](https://www.ruby-forum.com/t/ym4r-gm-glatlng-and-rjs/69412 "2010-02-09T19:26:30Z")

</div>

I’m stepping through a variant of the tutorial for the ym4r/GM mapping library here: and with heavily simplified code I’m basically doing this in the controller (assume @map and @zoom are all good): @center = G…

---

## [Weird behavior on Ruby 1.9.1](https://www.ruby-forum.com/t/weird-behavior-on-ruby-1-9-1/183163)

<div class="topic-metadata">

**Author:** [@rodrigo3n](https://www.ruby-forum.com/u/rodrigo3n)\
**Replies:** 2\
**Last updated:** [February 9, 2010, 6:34pm UTC](https://www.ruby-forum.com/t/weird-behavior-on-ruby-1-9-1/183163 "2010-02-09T18:34:11Z")

</div>

Hello everyone, I’ve recently installed Rails 3 and beginning using it, but I found something strange: With a simple app, with no additional gems required I test using REE and all rails commands (rails server, rails g…

---

## [Double render/redirect philosophy](https://www.ruby-forum.com/t/double-render-redirect-philosophy/183133)

<div class="topic-metadata">

**Author:** [@ralphshnelvar](https://www.ruby-forum.com/u/ralphshnelvar)\
**Replies:** 3\
**Last updated:** [February 9, 2010, 4:59pm UTC](https://www.ruby-forum.com/t/double-render-redirect-philosophy/183133 "2010-02-09T16:59:19Z")

</div>

Ok, I think I understand why RoR will flag an attempt double render in an action. What I don’t understand is the philosophy of render and redirect\_to. Specifically, why isn’t a return implicit in both those methods? O…

---

## [Password Requests?](https://www.ruby-forum.com/t/password-requests/183175)

<div class="topic-metadata">

**Author:** [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Replies:** 4\
**Last updated:** [February 9, 2010, 4:25pm UTC](https://www.ruby-forum.com/t/password-requests/183175 "2010-02-09T16:25:39Z")

</div>

When I amended my registration page, I included the digest to encrypt the password in the database. If someone forgets their password, how do I get this mailed back to the user? The action is as follows: def remind …

---

## [ECONNABORTED: An established connection was aborted](https://www.ruby-forum.com/t/econnaborted-an-established-connection-was-aborted/183134)

<div class="topic-metadata">

**Author:** [@ralphshnelvar](https://www.ruby-forum.com/u/ralphshnelvar)\
**Replies:** 2\
**Last updated:** [February 9, 2010, 4:15pm UTC](https://www.ruby-forum.com/t/econnaborted-an-established-connection-was-aborted/183134 "2010-02-09T16:15:54Z")

</div>

What, exactly, does ECONNABORTED: An established connection was aborted by the software in your host machine. mean? So … let’s start with the most basic of questions: What’s a connection? When one has a connection…

---

## [Eager Loading](https://www.ruby-forum.com/t/eager-loading/183177)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [February 9, 2010, 4:03pm UTC](https://www.ruby-forum.com/t/eager-loading/183177 "2010-02-09T16:03:07Z")

</div>

Is there a way to specify within a model that an association should always be loaded. For example, the classic example from the API docs: Post.find(:all, :include =\> :author) What if I ALWAYS wanted the author to be …

---

## [Some success at last, and some questions](https://www.ruby-forum.com/t/some-success-at-last-and-some-questions/183166)

<div class="topic-metadata">

**Author:** [@bigos](https://www.ruby-forum.com/u/bigos)\
**Replies:** 4\
**Last updated:** [February 9, 2010, 3:22pm UTC](https://www.ruby-forum.com/t/some-success-at-last-and-some-questions/183166 "2010-02-09T15:22:43Z")

</div>

Hi Everyone, I’ve been using Ruby roughly since 2003, but I never could understand Rails nor do something meaningful with them. At last thanks to wonderful people from Rails Guides at Getting Started with Rails — Rub…

---

## [reCAPTCHA headache](https://www.ruby-forum.com/t/recaptcha-headache/183092)

<div class="topic-metadata">

**Author:** [@Eric\_J\_Gruber](https://www.ruby-forum.com/u/Eric_J_Gruber)\
**Replies:** 8\
**Last updated:** [February 9, 2010, 2:57pm UTC](https://www.ruby-forum.com/t/recaptcha-headache/183092 "2010-02-09T14:57:40Z")

</div>

I’m trying to use this (http://ambethia.com/recaptcha/) reCAPTCHA plugin and have almost got it working. Help me get the last part? I can’t seem to find anything in the logs that indicate an error. Here is my code. Ev…

---

## [Controller methods over instance variables?](https://www.ruby-forum.com/t/controller-methods-over-instance-variables/183106)

<div class="topic-metadata">

**Author:** [@dukael](https://www.ruby-forum.com/u/dukael)\
**Replies:** 7\
**Last updated:** [February 9, 2010, 2:51pm UTC](https://www.ruby-forum.com/t/controller-methods-over-instance-variables/183106 "2010-02-09T14:51:03Z")

</div>

Hi, I was thinking whether it would be more elegant for a view to call methods on the controller rather than rely on instance variables. I’m not really sure what the answer is so thought I would throw it out here. P…

---

## [Testing Java Script in a View](https://www.ruby-forum.com/t/testing-java-script-in-a-view/183137)

<div class="topic-metadata">

**Author:** [@railslist](https://www.ruby-forum.com/u/railslist)\
**Replies:** 2\
**Last updated:** [February 9, 2010, 2:43pm UTC](https://www.ruby-forum.com/t/testing-java-script-in-a-view/183137 "2010-02-09T14:43:05Z")

</div>

Hello Everybody, I am a newbie with rails, so please forgive me if I made a mistake. I have a link in a view that uses java script to toggle a div. Now, I need to test this. But I simply don’t know how to trigger the…

---

## [Why are double sided polymorphic relationships lacking in Rails?](https://www.ruby-forum.com/t/why-are-double-sided-polymorphic-relationships-lacking-in-rails/183144)

<div class="topic-metadata">

**Author:** [@tsenart](https://www.ruby-forum.com/u/tsenart)\
**Replies:** 5\
**Last updated:** [February 9, 2010, 2:37pm UTC](https://www.ruby-forum.com/t/why-are-double-sided-polymorphic-relationships-lacking-in-rails/183144 "2010-02-09T14:37:12Z")

</div>

http://stackoverflow.com/questions/2224994/why-are-double-sided-polymorphic-relationships-lacking-in-rails

---

## [Getting Twitter usernames](https://www.ruby-forum.com/t/getting-twitter-usernames/183157)

<div class="topic-metadata">

**Author:** [@Rails\_ROR](https://www.ruby-forum.com/u/Rails_ROR)\
**Replies:** 1\
**Last updated:** [February 9, 2010, 2:31pm UTC](https://www.ruby-forum.com/t/getting-twitter-usernames/183157 "2010-02-09T14:31:05Z")

</div>

Hi all, I want to display the list of all twitter user names.’ Please suggest me something on that Getlists is a method which i have seen it in the API looking forward for a response Thankyou

---

## [Acts\_as\_tree question](https://www.ruby-forum.com/t/acts-as-tree-question/183158)

<div class="topic-metadata">

**Author:** [@db\_333](https://www.ruby-forum.com/u/db_333)\
**Replies:** 3\
**Last updated:** [February 9, 2010, 2:13pm UTC](https://www.ruby-forum.com/t/acts-as-tree-question/183158 "2010-02-09T14:13:03Z")

</div>

Hi, I’m trying to implement a very simple acts\_as\_tree search in my index html. I am able to show the parents, with no issue, but the children will not show. I have something like this for the parent, which displays…

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

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