# Rails

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

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

---

## [Grabbing NTLM tokens](https://www.ruby-forum.com/t/grabbing-ntlm-tokens/124443)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [December 28, 2007, 6:15pm UTC](https://www.ruby-forum.com/t/grabbing-ntlm-tokens/124443 "2007-12-28T18:15:04Z")

</div>

I’m running a mongrel cluster behind apache 2 on a linux box and would like to grab the NTLM token(s) from an IE client logged on through the active directory domain. Has anyone done anything like this? Thank you

---

## [ApplicationController and request.host](https://www.ruby-forum.com/t/applicationcontroller-and-request-host/124386)

<div class="topic-metadata">

**Author:** [@devaulw](https://www.ruby-forum.com/u/devaulw)\
**Replies:** 5\
**Last updated:** [December 28, 2007, 5:52pm UTC](https://www.ruby-forum.com/t/applicationcontroller-and-request-host/124386 "2007-12-28T17:52:15Z")

</div>

Perhaps I’m not understanding this very well. I want to set a layout based on a domain name. The following works in ApplicationController.rb: before\_filter :set\_host case @host when ‘site1.com’ layout ‘site1’ whe…

---

## [Little things that bother me](https://www.ruby-forum.com/t/little-things-that-bother-me/124439)

<div class="topic-metadata">

**Author:** [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Replies:** 0\
**Last updated:** [December 28, 2007, 5:45pm UTC](https://www.ruby-forum.com/t/little-things-that-bother-me/124439 "2007-12-28T17:45:12Z")

</div>

I really have never been able to get this to work… $ rake doc:rails --trace (in /home/storage/users/craig/svn/th-db/branches/phase5) \*\* Invoke doc:rails (first\_time) \*\* Invoke doc/api/index.html (first\_time) \*\* Invo…

---

## [Re: Restful Route for a custom action](https://www.ruby-forum.com/t/re-restful-route-for-a-custom-action/124412)

<div class="topic-metadata">

**Author:** [@mslagell](https://www.ruby-forum.com/u/mslagell)\
**Replies:** 1\
**Last updated:** [December 28, 2007, 5:21pm UTC](https://www.ruby-forum.com/t/re-restful-route-for-a-custom-action/124412 "2007-12-28T17:21:46Z")

</div>

I’m using rails 2.0.2 and yes, I have restarted the server. What version of Rails? On Dec 28, 2007 3:10 PM, Mark W. removed\_email\_address@domain.invalid wrote: On Dec 27, 7:21pm, Mark removed\_email\_address@domain.inva…

---

## [Using PostgreSQL with Rails? - PGCon 2008 - call for papers](https://www.ruby-forum.com/t/using-postgresql-with-rails-pgcon-2008-call-for-papers/124427)

<div class="topic-metadata">

**Author:** [@robby247365](https://www.ruby-forum.com/u/robby247365)\
**Replies:** 0\
**Last updated:** [December 28, 2007, 5:07pm UTC](https://www.ruby-forum.com/t/using-postgresql-with-rails-pgcon-2008-call-for-papers/124427 "2007-12-28T17:07:43Z")

</div>

Hey all! I was asked by my friends in the PostgreSQL community to mention this here. If you’re using PostgreSQL with your Ruby on Rails applications, they’re hoping to get some of us from the Rails community involved …

---

## [Nested resources form\_for problem](https://www.ruby-forum.com/t/nested-resources-form-for-problem/124426)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [December 28, 2007, 5:02pm UTC](https://www.ruby-forum.com/t/nested-resources-form-for-problem/124426 "2007-12-28T17:02:24Z")

</div>

Hi, I have a resource map like this: map.resources :users do |user| user.resource :sreg10record end So a User is supposed to have (at most) one Sreg10record. The problem is in the views. I tried following this tuto…

---

## [ActiveResource and (polymorphic) associations](https://www.ruby-forum.com/t/activeresource-and-polymorphic-associations/124351)

<div class="topic-metadata">

**Author:** [@rails3000](https://www.ruby-forum.com/u/rails3000)\
**Replies:** 6\
**Last updated:** [December 28, 2007, 4:59pm UTC](https://www.ruby-forum.com/t/activeresource-and-polymorphic-associations/124351 "2007-12-28T16:59:28Z")

</div>

Hi, I’m just playing with ActiveResource and I did’nt find anything about the support of (polymorphic) associations. Is there a support at all? Thanks in advance

---

## [Restful Route for a custom action](https://www.ruby-forum.com/t/restful-route-for-a-custom-action/124374)

<div class="topic-metadata">

**Author:** [@mslagell](https://www.ruby-forum.com/u/mslagell)\
**Replies:** 3\
**Last updated:** [December 28, 2007, 4:49pm UTC](https://www.ruby-forum.com/t/restful-route-for-a-custom-action/124374 "2007-12-28T16:49:25Z")

</div>

I’m trying to create a restful route for a custom action and I can not seem to get it right. This is the code in my routes.rb map.resources :leagues map.resources :leagues, :collection =\> {:old =\> :get} old is an ac…

---

## [Plugin init.rb help](https://www.ruby-forum.com/t/plugin-init-rb-help/124423)

<div class="topic-metadata">

**Author:** [@ss\_1982](https://www.ruby-forum.com/u/ss_1982)\
**Replies:** 1\
**Last updated:** [December 28, 2007, 4:42pm UTC](https://www.ruby-forum.com/t/plugin-init-rb-help/124423 "2007-12-28T16:42:57Z")

</div>

Hi, I have created a plugin that has the following code in the init.rb ActionController::Base.send :include, PersonaliseSite The PersonaliseSite module has a class which\_country that returns ‘uk’ as a string. Which …

---

## [Quick update question](https://www.ruby-forum.com/t/quick-update-question/124420)

<div class="topic-metadata">

**Author:** [@daveamos](https://www.ruby-forum.com/u/daveamos)\
**Replies:** 0\
**Last updated:** [December 28, 2007, 4:16pm UTC](https://www.ruby-forum.com/t/quick-update-question/124420 "2007-12-28T16:16:26Z")

</div>

Hi there, I’m trying to take a few variables and update an entry in a database, and I don’t know the best way to do it. Here’s what I’ve been trying in my controller: var1 = whatever var2 = whatever guess = Guess.f…

---

## [Global settings for actionmailer](https://www.ruby-forum.com/t/global-settings-for-actionmailer/124309)

<div class="topic-metadata">

**Author:** [@gabru](https://www.ruby-forum.com/u/gabru)\
**Replies:** 2\
**Last updated:** [December 28, 2007, 3:37pm UTC](https://www.ruby-forum.com/t/global-settings-for-actionmailer/124309 "2007-12-28T15:37:04Z")

</div>

most of my emails sent through actionmailer have all the same sender … how can i set a default sender for each email defined within an actionmailer … but still have the chance to override it later.

---

## [OT: Sorry for this test](https://www.ruby-forum.com/t/ot-sorry-for-this-test/124409)

<div class="topic-metadata">

**Author:** [@jawosis](https://www.ruby-forum.com/u/jawosis)\
**Replies:** 1\
**Last updated:** [December 28, 2007, 2:20pm UTC](https://www.ruby-forum.com/t/ot-sorry-for-this-test/124409 "2007-12-28T14:20:09Z")

</div>

…but mein googlemail account does not forward mails to several rubyonrails mailinglists for hours…

---

## [Is AWDwR Still Useful?](https://www.ruby-forum.com/t/is-awdwr-still-useful/122798)

<div class="topic-metadata">

**Author:** [@dan](https://www.ruby-forum.com/u/dan)\
**Replies:** 10\
**Last updated:** [December 28, 2007, 1:57pm UTC](https://www.ruby-forum.com/t/is-awdwr-still-useful/122798 "2007-12-28T13:57:53Z")

</div>

I’m sure this is becoming an FAQ and I apologize. I haven’t quite found the answers I’m looking for yet and hope you can help. As a relative noob to Rails I’m trying to figure out how best to approach my learning of i…

---

## [Best way to perform a certain DB query](https://www.ruby-forum.com/t/best-way-to-perform-a-certain-db-query/124401)

<div class="topic-metadata">

**Author:** [@rpflaum](https://www.ruby-forum.com/u/rpflaum)\
**Replies:** 5\
**Last updated:** [December 28, 2007, 1:52pm UTC](https://www.ruby-forum.com/t/best-way-to-perform-a-certain-db-query/124401 "2007-12-28T13:52:03Z")

</div>

Hello, I’ve got two tables, users and books: create\_table :users do |t| t.column :name, :string t.column :rich, :boolean t.column :book\_id, :integer end create\_table :books do |t| t.column :name, :string end If…

---

## [Validates\_presence\_of message](https://www.ruby-forum.com/t/validates-presence-of-message/124366)

<div class="topic-metadata">

**Author:** [@wheels](https://www.ruby-forum.com/u/wheels)\
**Replies:** 2\
**Last updated:** [December 28, 2007, 11:50am UTC](https://www.ruby-forum.com/t/validates-presence-of-message/124366 "2007-12-28T11:50:51Z")

</div>

validates\_presence\_of :field\_name, :message =\> “message”; the message shows up with the :field\_name message concatenated. how can i just show just the message and not the field\_name? Thanks

---

## [Versione 2.02](https://www.ruby-forum.com/t/versione-2-02/124340)

<div class="topic-metadata">

**Author:** [@andxy](https://www.ruby-forum.com/u/andxy)\
**Replies:** 2\
**Last updated:** [December 28, 2007, 11:18am UTC](https://www.ruby-forum.com/t/versione-2-02/124340 "2007-12-28T11:18:01Z")

</div>

Ciao a tutti, ho aggiornato rails alla versione 2.02. Creo la mia applicazione ma quando vado ad avviare webrick mi da questo errore: ruby script/server =\> Booting WEBrick… /usr/lib/ruby/gems/1.8/gems/rails-2.0.2/li…

---

## [Downloading a video file and playing that(flv format.)](https://www.ruby-forum.com/t/downloading-a-video-file-and-playing-that-flv-format/124385)

<div class="topic-metadata">

**Author:** [@arpit\_jain](https://www.ruby-forum.com/u/arpit_jain)\
**Replies:** 2\
**Last updated:** [December 28, 2007, 8:57am UTC](https://www.ruby-forum.com/t/downloading-a-video-file-and-playing-that-flv-format/124385 "2007-12-28T08:57:39Z")

</div>

An issue?? Am providing a user to upload and download the video files. I am using attachment\_fu plugin and and usong its current\_data function to get the file, and send\_data to download it. Once the downloading is c…

---

## [Submit\_tag](https://www.ruby-forum.com/t/submit-tag/124336)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [December 28, 2007, 7:50am UTC](https://www.ruby-forum.com/t/submit-tag/124336 "2007-12-28T07:50:40Z")

</div>

This one works!!! Do not forget { \<%= submit\_tag value=‘OK’,{:onclick =\> “return confirm(‘Are you sure you want to delete this article?’)” }%\>

---

## [Download functionality](https://www.ruby-forum.com/t/download-functionality/124300)

<div class="topic-metadata">

**Author:** [@arpit\_jain](https://www.ruby-forum.com/u/arpit_jain)\
**Replies:** 2\
**Last updated:** [December 28, 2007, 7:24am UTC](https://www.ruby-forum.com/t/download-functionality/124300 "2007-12-28T07:24:45Z")

</div>

Hi. I am developing an application where users can upload videos. I need to implement the functionality to download the videos on the end users desktop. i.e. i need to provide download link that will download the …

---

## [Installing Ruby on Rails on Leopard](https://www.ruby-forum.com/t/installing-ruby-on-rails-on-leopard/124065)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 10\
**Last updated:** [December 28, 2007, 7:08am UTC](https://www.ruby-forum.com/t/installing-ruby-on-rails-on-leopard/124065 "2007-12-28T07:08:58Z")

</div>

I am completely new to Ruby on Rails, and programming in general, and so I have what imagine are two pretty idiotic questions: I am trying to install all of the components I need to run RoR on OS X Leopard (following…

---

## [Getting wrong route - fairly complete error description](https://www.ruby-forum.com/t/getting-wrong-route-fairly-complete-error-description/124384)

<div class="topic-metadata">

**Author:** [@Mikel\_L](https://www.ruby-forum.com/u/Mikel_L)\
**Replies:** 1\
**Last updated:** [December 28, 2007, 7:00am UTC](https://www.ruby-forum.com/t/getting-wrong-route-fairly-complete-error-description/124384 "2007-12-28T07:00:47Z")

</div>

OK, I have a routing problem, that seems to be working in the console, but not in the app. I have people that have nested tasks, like so: routes.rb map.resources :people do |person| person.resources :phone\_notes …

---

## [How to protect a form to be submitted several times](https://www.ruby-forum.com/t/how-to-protect-a-form-to-be-submitted-several-times/124379)

<div class="topic-metadata">

**Author:** [@jawosis](https://www.ruby-forum.com/u/jawosis)\
**Replies:** 2\
**Last updated:** [December 28, 2007, 6:33am UTC](https://www.ruby-forum.com/t/how-to-protect-a-form-to-be-submitted-several-times/124379 "2007-12-28T06:33:54Z")

</div>

I’am looking for a solution to prevent a user to submit a form several times. How do you solve this problem? Captchas? Only one submit per session…?? – Jochen K. figgfrosch.de / gissmoh.de / ror-ror.de / railswerk.…

---

## [Validation of acts\_as\_list in the model of the base class?](https://www.ruby-forum.com/t/validation-of-acts-as-list-in-the-model-of-the-base-class/124377)

<div class="topic-metadata">

**Author:** [@Mukund](https://www.ruby-forum.com/u/Mukund)\
**Replies:** 1\
**Last updated:** [December 28, 2007, 6:00am UTC](https://www.ruby-forum.com/t/validation-of-acts-as-list-in-the-model-of-the-base-class/124377 "2007-12-28T06:00:35Z")

</div>

Lets say I have 3 models, user, user\_group and user\_group\_nodes. A normal user has one user\_group\_id as a foreign key and a special user has multiple user\_groups which are defined in the user\_group\_nodes. The user\_g…

---

## [Class variable not retaining its old val after server start](https://www.ruby-forum.com/t/class-variable-not-retaining-its-old-val-after-server-start/124275)

<div class="topic-metadata">

**Author:** [@vidya1111](https://www.ruby-forum.com/u/vidya1111)\
**Replies:** 6\
**Last updated:** [December 28, 2007, 6:00am UTC](https://www.ruby-forum.com/t/class-variable-not-retaining-its-old-val-after-server-start/124275 "2007-12-28T06:00:00Z")

</div>

I want to get the names of the subclasses. In my model class, I have cattr\_accessor :subtypes def self.inherited(sub) super @@subtypes ||= \[\] @@subtypes.push(sub.name) session\[:subtypes\] = @@subtypes end @subtyp…

---

## [How to add index to a Model.attribute?](https://www.ruby-forum.com/t/how-to-add-index-to-a-model-attribute/124203)

<div class="topic-metadata">

**Author:** [@mokkai](https://www.ruby-forum.com/u/mokkai)\
**Replies:** 14\
**Last updated:** [December 28, 2007, 5:36am UTC](https://www.ruby-forum.com/t/how-to-add-index-to-a-model-attribute/124203 "2007-12-28T05:36:36Z")

</div>

is it possible add index to a column in database from rails itself ?

---

## [Checking to see if a day/hour/whatever has passed](https://www.ruby-forum.com/t/checking-to-see-if-a-day-hour-whatever-has-passed/124327)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [December 28, 2007, 4:34am UTC](https://www.ruby-forum.com/t/checking-to-see-if-a-day-hour-whatever-has-passed/124327 "2007-12-28T04:34:02Z")

</div>

I want to check if an hour has passed since the current time. When I run return (DateTime.now \> (@session\[‘user’\].account\_info.last\_reward + 0.04)) it returns the correct value I think, but when I put that same thing …

---

## [Which is faster: searching in a file or in a database](https://www.ruby-forum.com/t/which-is-faster-searching-in-a-file-or-in-a-database/124215)

<div class="topic-metadata">

**Author:** [@markthomas](https://www.ruby-forum.com/u/markthomas)\
**Replies:** 7\
**Last updated:** [December 28, 2007, 4:05am UTC](https://www.ruby-forum.com/t/which-is-faster-searching-in-a-file-or-in-a-database/124215 "2007-12-28T04:05:23Z")

</div>

Hello, I have ten CVS file with about 20000 rows in each. If I want to search in these files for example get every row that has the word “apple” i a column, which is faster: If I read all these ten files into the dat…

---

## [Field from from but not in DB](https://www.ruby-forum.com/t/field-from-from-but-not-in-db/124370)

<div class="topic-metadata">

**Author:** [@spokra](https://www.ruby-forum.com/u/spokra)\
**Replies:** 1\
**Last updated:** [December 28, 2007, 3:42am UTC](https://www.ruby-forum.com/t/field-from-from-but-not-in-db/124370 "2007-12-28T03:42:35Z")

</div>

ok I’m down to getting AR to ignore the field. the field is called turing… I have two function stubs… def turing end def turing=(temp) end what do i need to do in these two functions to emulate what AR would hav…

---

## [Keeping Person Loggen In For 2 Weeks](https://www.ruby-forum.com/t/keeping-person-loggen-in-for-2-weeks/124368)

<div class="topic-metadata">

**Author:** [@johnk](https://www.ruby-forum.com/u/johnk)\
**Replies:** 1\
**Last updated:** [December 28, 2007, 3:20am UTC](https://www.ruby-forum.com/t/keeping-person-loggen-in-for-2-weeks/124368 "2007-12-28T03:20:21Z")

</div>

Frig, I can never remember this… how do I keep someone logged in for 2 weeks? I know it is a simple one liner but google and my PDF books are failing me right now. – John K. removed\_email\_address@domain.invalid Blo…

---

## [Form field without column in DB](https://www.ruby-forum.com/t/form-field-without-column-in-db/124256)

<div class="topic-metadata">

**Author:** [@spokra](https://www.ruby-forum.com/u/spokra)\
**Replies:** 8\
**Last updated:** [December 28, 2007, 3:16am UTC](https://www.ruby-forum.com/t/form-field-without-column-in-db/124256 "2007-12-28T03:16:50Z")

</div>

I’m using authenticated gem and adding turing to it… I’d like to pass a form variable back to the controller. but there is no need to keep it in the DB. the form renders fine the initial time. but fails if it fail…

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

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