# Rails

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

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

---

## [Generator simple question: How to specify parameter?](https://www.ruby-forum.com/t/generator-simple-question-how-to-specify-parameter/137869)

<div class="topic-metadata">

**Author:** [@goodwill](https://www.ruby-forum.com/u/goodwill)\
**Replies:** 1\
**Last updated:** [May 17, 2008, 5:43am UTC](https://www.ruby-forum.com/t/generator-simple-question-how-to-specify-parameter/137869 "2008-05-17T05:43:24Z")

</div>

I wonder if I have did something fishy here (probably I did…) when I type: script/generate scaffold model --skip\_migration It saids: invalid option: --skip\_migration Perhaps some syntax I don’t know on how to specif…

---

## [Extend ApplicationController via lib code](https://www.ruby-forum.com/t/extend-applicationcontroller-via-lib-code/137684)

<div class="topic-metadata">

**Author:** [@goodwill](https://www.ruby-forum.com/u/goodwill)\
**Replies:** 2\
**Last updated:** [May 17, 2008, 4:49am UTC](https://www.ruby-forum.com/t/extend-applicationcontroller-via-lib-code/137684 "2008-05-17T04:49:02Z")

</div>

I have come across a problem when I am trying to extend ApplicationController with a .rb file containing a module inside /lib folder. The problem is, let’s say if I want to add a method called authenticate inside App…

---

## [Timeout not obeyed when trying to open bad url](https://www.ruby-forum.com/t/timeout-not-obeyed-when-trying-to-open-bad-url/137866)

<div class="topic-metadata">

**Author:** [@histrionics](https://www.ruby-forum.com/u/histrionics)\
**Replies:** 1\
**Last updated:** [May 17, 2008, 2:33am UTC](https://www.ruby-forum.com/t/timeout-not-obeyed-when-trying-to-open-bad-url/137866 "2008-05-17T02:33:59Z")

</div>

Here is something Ive never seen before: I have a list of urls fed into mechanize (which uses net/http to grab pages) I have it setup as thus: require ‘mechanize’ agent = WWW::Mechanize.new; error\_count = 0 begin …

---

## [Detect test cases are currently running](https://www.ruby-forum.com/t/detect-test-cases-are-currently-running/137860)

<div class="topic-metadata">

**Author:** [@ericgoodwin](https://www.ruby-forum.com/u/ericgoodwin)\
**Replies:** 2\
**Last updated:** [May 17, 2008, 12:25am UTC](https://www.ruby-forum.com/t/detect-test-cases-are-currently-running/137860 "2008-05-17T00:25:49Z")

</div>

How do I know in my code that Im in the middle of running test cases. I thought there was a “$TESTING” variable that I could check but that one is always empty. I would like to be able to know whether or not to load i…

---

## [Concern of admin panel management](https://www.ruby-forum.com/t/concern-of-admin-panel-management/137774)

<div class="topic-metadata">

**Author:** [@Realusers](https://www.ruby-forum.com/u/Realusers)\
**Replies:** 2\
**Last updated:** [May 16, 2008, 11:22pm UTC](https://www.ruby-forum.com/t/concern-of-admin-panel-management/137774 "2008-05-16T23:22:06Z")

</div>

Dear all, I am doing programming in ruby on rails platform from last three months . I have spent my last two years in PHP programming where i developed many shopping carts. I used to make a different section for a no…

---

## [Copenda.com - How Are They Doing This?](https://www.ruby-forum.com/t/copenda-com-how-are-they-doing-this/137763)

<div class="topic-metadata">

**Author:** [@wickNbomb](https://www.ruby-forum.com/u/wickNbomb)\
**Replies:** 1\
**Last updated:** [May 16, 2008, 10:32pm UTC](https://www.ruby-forum.com/t/copenda-com-how-are-they-doing-this/137763 "2008-05-16T22:32:00Z")

</div>

Does anyone have any thoughts on how Copenda is pulling off search results like this? http://www.copenda.com/SearchResults.aspx?gender=1&lookingfor=2&ageMin=29&ageMax=36&locatednear=CAMPBELL,%20CA&distance=10&savesearc…

---

## [Mocking Plugins](https://www.ruby-forum.com/t/mocking-plugins/137835)

<div class="topic-metadata">

**Author:** [@mdaoust](https://www.ruby-forum.com/u/mdaoust)\
**Replies:** 2\
**Last updated:** [May 16, 2008, 10:10pm UTC](https://www.ruby-forum.com/t/mocking-plugins/137835 "2008-05-16T22:10:48Z")

</div>

I’m using rspec on a current rails project and one of the plugins I’m using (Paperclip) uploads file attachments for a model to S3. This obviously slows the tests down somewhat, and I would like to remove this altoget…

---

## [LiveTree substitute](https://www.ruby-forum.com/t/livetree-substitute/136749)

<div class="topic-metadata">

**Author:** [@acras](https://www.ruby-forum.com/u/acras)\
**Replies:** 4\
**Last updated:** [May 16, 2008, 9:49pm UTC](https://www.ruby-forum.com/t/livetree-substitute/136749 "2008-05-16T21:49:35Z")

</div>

heyah! Is there any treeView plugin other than liveTree out there? thanks – Ricardo A. removed\_email\_address@domain.invalid Acras Sistemas +55+41-3232-6404 www.acras.net

---

## [Data Migrations using yaml, what to do about large text fields](https://www.ruby-forum.com/t/data-migrations-using-yaml-what-to-do-about-large-text-fields/137850)

<div class="topic-metadata">

**Author:** [@cephas](https://www.ruby-forum.com/u/cephas)\
**Replies:** 1\
**Last updated:** [May 16, 2008, 9:49pm UTC](https://www.ruby-forum.com/t/data-migrations-using-yaml-what-to-do-about-large-text-fields/137850 "2008-05-16T21:49:00Z")

</div>

Hello, I have a data in a FileMaker database that I migrate to my evolving rails app via migrations via yaml. This works great because I can change my application schema easily, and then output a matching yaml file …

---

## [How to check file size before file upload completes?](https://www.ruby-forum.com/t/how-to-check-file-size-before-file-upload-completes/137845)

<div class="topic-metadata">

**Author:** [@nickname123](https://www.ruby-forum.com/u/nickname123)\
**Replies:** 1\
**Last updated:** [May 16, 2008, 9:40pm UTC](https://www.ruby-forum.com/t/how-to-check-file-size-before-file-upload-completes/137845 "2008-05-16T21:40:49Z")

</div>

Is it possible to check a file’s size before a file upload completes? We want to limit file uploads early by checking the header’s content length from the request object. The controller action and before\_filter doesn’…

---

## [Observer not working for checkbox](https://www.ruby-forum.com/t/observer-not-working-for-checkbox/137823)

<div class="topic-metadata">

**Author:** [@neha-rohan](https://www.ruby-forum.com/u/neha-rohan)\
**Replies:** 4\
**Last updated:** [May 16, 2008, 9:29pm UTC](https://www.ruby-forum.com/t/observer-not-working-for-checkbox/137823 "2008-05-16T21:29:25Z")

</div>

Hi, My code is like this: \<%= check\_box\_tag(“criteria\[#{count}\]\[data\_auto\_complete\]”, “1”,true) %\>Private \<%= observe\_field(“criteria\[#{count}\]\[data\_auto\_complete\]”, :url =\> { :action =\> :choose\_auto\_complete\_selec…

---

## [Database best practice question](https://www.ruby-forum.com/t/database-best-practice-question/137633)

<div class="topic-metadata">

**Author:** [@brownerthanu](https://www.ruby-forum.com/u/brownerthanu)\
**Replies:** 3\
**Last updated:** [May 16, 2008, 9:17pm UTC](https://www.ruby-forum.com/t/database-best-practice-question/137633 "2008-05-16T21:17:01Z")

</div>

hi folks, i’d like some advice about how to approach this database “problem”. i have a website that sells products that are customizable, and are organized in lists. i can’t give the details of the actual product, b…

---

## [Trouble with :include](https://www.ruby-forum.com/t/trouble-with-include/137670)

<div class="topic-metadata">

**Author:** [@Mozmonkey](https://www.ruby-forum.com/u/Mozmonkey)\
**Replies:** 5\
**Last updated:** [May 16, 2008, 9:12pm UTC](https://www.ruby-forum.com/t/trouble-with-include/137670 "2008-05-16T21:12:35Z")

</div>

For some reason it seems that :include is not working for a couple of my associations. Here are the models I’m using: MODELS class Registration \< ActiveRecord::Base has\_many :events, :foreign\_key =\> :user\_id end No…

---

## [Find the last entry by user\_id](https://www.ruby-forum.com/t/find-the-last-entry-by-user-id/137838)

<div class="topic-metadata">

**Author:** [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Replies:** 3\
**Last updated:** [May 16, 2008, 9:08pm UTC](https://www.ruby-forum.com/t/find-the-last-entry-by-user-id/137838 "2008-05-16T21:08:29Z")

</div>

How do I find the all records that are the latest from each user, by user\_id? I’m trying to get an :average working but I can’t solve it. This is my find: Dada.average(:column\_with\_nr, :conditions =\> \[“created\_at \> ?”…

---

## [Render partial](https://www.ruby-forum.com/t/render-partial/137741)

<div class="topic-metadata">

**Author:** [@claus](https://www.ruby-forum.com/u/claus)\
**Replies:** 4\
**Last updated:** [May 16, 2008, 8:38pm UTC](https://www.ruby-forum.com/t/render-partial/137741 "2008-05-16T20:38:42Z")

</div>

hallo! momentan steht meine seite so, dass ich gewisse dinge mit link\_to\_remote auf bedarf nachlade. was mach ich jetzt, wenn javascript deaktiviert ist? kann ich das irgend wie mit render partial lÃ¶sen? kann ich mi…

---

## [Use The observe\_field Helper, or Something Else?](https://www.ruby-forum.com/t/use-the-observe-field-helper-or-something-else/137655)

<div class="topic-metadata">

**Author:** [@rornoob](https://www.ruby-forum.com/u/rornoob)\
**Replies:** 5\
**Last updated:** [May 16, 2008, 7:09pm UTC](https://www.ruby-forum.com/t/use-the-observe-field-helper-or-something-else/137655 "2008-05-16T19:09:01Z")

</div>

I’m trying to drop the contents of @show\_openers.subject and @show\_upeners.body into the onlick event of my dropdown whenever it is changed. Is the solution to use the observe\_field helper? If yes, what is the best ap…

---

## [Pre-baked forum code](https://www.ruby-forum.com/t/pre-baked-forum-code/137827)

<div class="topic-metadata">

**Author:** [@MaddyTheGoose](https://www.ruby-forum.com/u/MaddyTheGoose)\
**Replies:** 3\
**Last updated:** [May 16, 2008, 6:44pm UTC](https://www.ruby-forum.com/t/pre-baked-forum-code/137827 "2008-05-16T18:44:17Z")

</div>

Does anyone know some pre-baked code for making a forum. I know forums aren’t terribly difficult to do in RoR but if there’s something already out there it would be a nice time saver. I’ve done some googling for it bu…

---

## [Rails 2 general info](https://www.ruby-forum.com/t/rails-2-general-info/137810)

<div class="topic-metadata">

**Author:** [@roa](https://www.ruby-forum.com/u/roa)\
**Replies:** 5\
**Last updated:** [May 16, 2008, 6:36pm UTC](https://www.ruby-forum.com/t/rails-2-general-info/137810 "2008-05-16T18:36:39Z")

</div>

Hi, I’m starting a new Rails project on Rails 2. But I run in an error with authentication token on my register form. Searching this forum, I think I have found a solution. But my main consern is that I will stumble …

---

## [Sessions by Collective Idea](https://www.ruby-forum.com/t/sessions-by-collective-idea/137832)

<div class="topic-metadata">

**Author:** [@brandonpt](https://www.ruby-forum.com/u/brandonpt)\
**Replies:** 0\
**Last updated:** [May 16, 2008, 6:34pm UTC](https://www.ruby-forum.com/t/sessions-by-collective-idea/137832 "2008-05-16T18:34:53Z")

</div>

I just wanted to let you know about something we’re really excited about: Sessions by Collective Idea. Training doesn’t have to be boring. Come spend 4 days in Holland, Michigan learning Ruby and Rails on June 23-26.…

---

## [Has\_one and find\_by\_id issue](https://www.ruby-forum.com/t/has-one-and-find-by-id-issue/137780)

<div class="topic-metadata">

**Author:** [@heimdull](https://www.ruby-forum.com/u/heimdull)\
**Replies:** 3\
**Last updated:** [May 16, 2008, 6:20pm UTC](https://www.ruby-forum.com/t/has-one-and-find-by-id-issue/137780 "2008-05-16T18:20:49Z")

</div>

I have two models: testamonial photo (has\_attachement) testamonial has\_one photo The issue is when do this: @testamonial = Testamonial.find\_all\_by\_id(id) I get “undefined method \`photo’ for” in my browser?? BUT …

---

## [Mongrel\_service error](https://www.ruby-forum.com/t/mongrel-service-error/137751)

<div class="topic-metadata">

**Author:** [@Glen](https://www.ruby-forum.com/u/Glen)\
**Replies:** 2\
**Last updated:** [May 16, 2008, 5:21pm UTC](https://www.ruby-forum.com/t/mongrel-service-error/137751 "2008-05-16T17:21:25Z")

</div>

I have an odd situation. When running my app in production mode via mongrel\_service several things do not work at all. However when running in production mode with mongrel from the command line everything works as e…

---

## [Attachment\_fu and/or rmagick on osx -- weird error](https://www.ruby-forum.com/t/attachment-fu-and-or-rmagick-on-osx-weird-error/246517)

<div class="topic-metadata">

**Author:** [@helix\_tp](https://www.ruby-forum.com/u/helix_tp)\
**Replies:** 0\
**Last updated:** [May 16, 2008, 5:13pm UTC](https://www.ruby-forum.com/t/attachment-fu-and-or-rmagick-on-osx-weird-error/246517 "2008-05-16T17:13:40Z")

</div>

One of our developers is getting a weird error from attachment\_fu and/or rmagick on OSX. And even weirder because he’s used attachment\_fu and rmagick on other projects without difficulty. This all works fine on debia…

---

## ["pre-filled" value in form \> from database](https://www.ruby-forum.com/t/pre-filled-value-in-form-from-database/137698)

<div class="topic-metadata">

**Author:** [@remco123](https://www.ruby-forum.com/u/remco123)\
**Replies:** 3\
**Last updated:** [May 16, 2008, 5:07pm UTC](https://www.ruby-forum.com/t/pre-filled-value-in-form-from-database/137698 "2008-05-16T17:07:13Z")

</div>

Hi, This is a select \* from bestemmingen where bestemming\_id=‘BCN’; of my database bestemming\_id | naam | naam\_en | landcode | airport\_name | alt\_naam | dist\_ams | stad\_zoeknaam | ±--------------±----------…

---

## [Mysql errors in production after upgrading to rails 2](https://www.ruby-forum.com/t/mysql-errors-in-production-after-upgrading-to-rails-2/137756)

<div class="topic-metadata">

**Author:** [@phil](https://www.ruby-forum.com/u/phil)\
**Replies:** 6\
**Last updated:** [May 16, 2008, 5:00pm UTC](https://www.ruby-forum.com/t/mysql-errors-in-production-after-upgrading-to-rails-2/137756 "2008-05-16T17:00:09Z")

</div>

I’m trying to upgrade our production server to rails 2. I’ve already done this on my dev machine (osx) and it worked fine. But now, with everything at the same version, but running in production mode, the production m…

---

## [Stack level too deep](https://www.ruby-forum.com/t/stack-level-too-deep/137793)

<div class="topic-metadata">

**Author:** [@MohsinHijazee](https://www.ruby-forum.com/u/MohsinHijazee)\
**Replies:** 4\
**Last updated:** [May 16, 2008, 4:43pm UTC](https://www.ruby-forum.com/t/stack-level-too-deep/137793 "2008-05-16T16:43:37Z")

</div>

Hi! I am getting following error: SystemStackError in Database#index Showing layouts/application.rhtml where line #90 raised: stack level too deep Interesting thing is that this only occurs when I run the applicatio…

---

## [Find by datetime](https://www.ruby-forum.com/t/find-by-datetime/137811)

<div class="topic-metadata">

**Author:** [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Replies:** 2\
**Last updated:** [May 16, 2008, 4:35pm UTC](https://www.ruby-forum.com/t/find-by-datetime/137811 "2008-05-16T16:35:16Z")

</div>

If I have a string 2008-05-16 15:27:30 then how do I find by datetime (created\_at)?

---

## [Relations - data not saved](https://www.ruby-forum.com/t/relations-data-not-saved/137814)

<div class="topic-metadata">

**Author:** [@san1981](https://www.ruby-forum.com/u/san1981)\
**Replies:** 0\
**Last updated:** [May 16, 2008, 4:17pm UTC](https://www.ruby-forum.com/t/relations-data-not-saved/137814 "2008-05-16T16:17:49Z")

</div>

Hello, I’ve created 2 databases with a relation 1-N, for example 1 table “tasks” and 1 table “categories”, I’ve done the relation 1-N (in task.rb belongs\_to :category and in category.rb has\_many :tasks) and I’ve crea…

---

## [Starting mongrel rails server error](https://www.ruby-forum.com/t/starting-mongrel-rails-server-error/137747)

<div class="topic-metadata">

**Author:** [@smitty26](https://www.ruby-forum.com/u/smitty26)\
**Replies:** 4\
**Last updated:** [May 16, 2008, 4:14pm UTC](https://www.ruby-forum.com/t/starting-mongrel-rails-server-error/137747 "2008-05-16T16:14:40Z")

</div>

I have a new rails installation on a Mac and am running into problems when trying to start my mongrel server (mongrel\_rails start). The application I’m working on was created from an older version of rails (windows);…

---

## [Dependency](https://www.ruby-forum.com/t/dependency/137782)

<div class="topic-metadata">

**Author:** [@mikael](https://www.ruby-forum.com/u/mikael)\
**Replies:** 3\
**Last updated:** [May 16, 2008, 2:00pm UTC](https://www.ruby-forum.com/t/dependency/137782 "2008-05-16T14:00:26Z")

</div>

Hello! My problem is my :dependent =\> :destroy do not call the destroy method. Why is it so? Any sugesstions. class Comment belongs\_to :commentable, :polymorphic =\> true, end class Article has\_many :comments, :…

---

## [Running tests on ActionMailer](https://www.ruby-forum.com/t/running-tests-on-actionmailer/137792)

<div class="topic-metadata">

**Author:** [@matlin](https://www.ruby-forum.com/u/matlin)\
**Replies:** 3\
**Last updated:** [May 16, 2008, 1:36pm UTC](https://www.ruby-forum.com/t/running-tests-on-actionmailer/137792 "2008-05-16T13:36:54Z")

</div>

I have a very strange problem, I am trying to test my mailer and as far as I can see the fixture mail is exactly the same as the generated. Any ideas The first is the expected and the second is the result: \<“Date: F…

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

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