# Rails

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

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

---

## [BetterNestedSet and Rails Caching](https://www.ruby-forum.com/t/betternestedset-and-rails-caching/150413)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [October 8, 2008, 10:34am UTC](https://www.ruby-forum.com/t/betternestedset-and-rails-caching/150413 "2008-10-08T10:34:17Z")

</div>

Hi, we have a simple category structure which is using BetterNestedSet. We also use the caching functionality of Rails 2.1. In the development environment config.cache\_classes = false config.cache\_store = :memory\_st…

---

## [Web Engineer Needed in DC! Willing to Train Ruby](https://www.ruby-forum.com/t/web-engineer-needed-in-dc-willing-to-train-ruby/150410)

<div class="topic-metadata">

**Author:** [@DCRecruiter-New\_Med](https://www.ruby-forum.com/u/DCRecruiter-New_Med)\
**Replies:** 0\
**Last updated:** [October 8, 2008, 9:44am UTC](https://www.ruby-forum.com/t/web-engineer-needed-in-dc-willing-to-train-ruby/150410 "2008-10-08T09:44:55Z")

</div>

Work at a profitable and well-funded, late stage start-up environment funded by VC luminaries like Sequoia, Polaris Ventures, The Carlyle Group, and Allen and Co Be part of a team that has a passion for coding and sof…

---

## [Problem with collection\_select](https://www.ruby-forum.com/t/problem-with-collection-select/150379)

<div class="topic-metadata">

**Author:** [@kojilab](https://www.ruby-forum.com/u/kojilab)\
**Replies:** 2\
**Last updated:** [October 8, 2008, 7:35am UTC](https://www.ruby-forum.com/t/problem-with-collection-select/150379 "2008-10-08T07:35:53Z")

</div>

Hi, I am getting undefined method \`map’ for #UserJob:0x7f42671ae1a8 with the code below. I’ve looked everywhere and I don’t get what I am doing wrong Controller: @user\_jobs = UserJob.find\_by\_user\_id(current\_user.id…

---

## [RangeError (bignum too big to convert into \`long'](https://www.ruby-forum.com/t/rangeerror-bignum-too-big-to-convert-into-long/150407)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [October 8, 2008, 7:04am UTC](https://www.ruby-forum.com/t/rangeerror-bignum-too-big-to-convert-into-long/150407 "2008-10-08T07:04:53Z")

</div>

I have written the following function in RoR for my website . The function on execution gives an error for the Rmagick crop method , the error is wriiten after the function . I am using the same function(except for th…

---

## [Import scripts](https://www.ruby-forum.com/t/import-scripts/150404)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [October 8, 2008, 6:49am UTC](https://www.ruby-forum.com/t/import-scripts/150404 "2008-10-08T06:49:06Z")

</div>

Hi, I am working on the some project where I required to do the import contacts from GMail, Yahoo, facebook, Orkut and LinkedIn. Is there any library or the predefined scripts which can help me. I think many develope…

---

## [Polymorphic Associations in Rails 2 not configurable](https://www.ruby-forum.com/t/polymorphic-associations-in-rails-2-not-configurable/150400)

<div class="topic-metadata">

**Author:** [@ericgoodwin](https://www.ruby-forum.com/u/ericgoodwin)\
**Replies:** 6\
**Last updated:** [October 8, 2008, 6:30am UTC](https://www.ruby-forum.com/t/polymorphic-associations-in-rails-2-not-configurable/150400 "2008-10-08T06:30:05Z")

</div>

This has been bugging me for some time. The implementation for polymorphic associations in Rails is still using the record\_type, record\_id model where record type has to be the entire written out class name. All of t…

---

## [Where do I add my class in RoR](https://www.ruby-forum.com/t/where-do-i-add-my-class-in-ror/150331)

<div class="topic-metadata">

**Author:** [@jsn1](https://www.ruby-forum.com/u/jsn1)\
**Replies:** 4\
**Last updated:** [October 8, 2008, 5:02am UTC](https://www.ruby-forum.com/t/where-do-i-add-my-class-in-ror/150331 "2008-10-08T05:02:45Z")

</div>

If I want to add my class where do I add it? as a module or as a controller? class Contact def initialize(name, email, message) @name = name @email= email @message= message end def name(name) @name = name end d…

---

## [Namespaces for admin fucntionality, worth the effort?](https://www.ruby-forum.com/t/namespaces-for-admin-fucntionality-worth-the-effort/150282)

<div class="topic-metadata">

**Author:** [@comopasta](https://www.ruby-forum.com/u/comopasta)\
**Replies:** 7\
**Last updated:** [October 8, 2008, 4:08am UTC](https://www.ruby-forum.com/t/namespaces-for-admin-fucntionality-worth-the-effort/150282 "2008-10-08T04:08:47Z")

</div>

Hi, I’m currently having the admin part of one of my apps accessible by pure username and password + role management checking. I was planning to add namespaces for it. Then I came accross this (a bit old but still…): …

---

## [Self-referencing model](https://www.ruby-forum.com/t/self-referencing-model/150397)

<div class="topic-metadata">

**Author:** [@divotdave](https://www.ruby-forum.com/u/divotdave)\
**Replies:** 4\
**Last updated:** [October 8, 2008, 3:11am UTC](https://www.ruby-forum.com/t/self-referencing-model/150397 "2008-10-08T03:11:19Z")

</div>

I’m fairly new to Ruby on Rails, and am having trouble figuring out how to do this. I have a model called Organization. I want to set things up so that an org can have sub-orgs (which can have sub-orgs themselves). …

---

## [Inflections](https://www.ruby-forum.com/t/inflections/150398)

<div class="topic-metadata">

**Author:** [@stuart.coyle](https://www.ruby-forum.com/u/stuart.coyle)\
**Replies:** 1\
**Last updated:** [October 8, 2008, 3:08am UTC](https://www.ruby-forum.com/t/inflections/150398 "2008-10-08T03:08:56Z")

</div>

I’m having difficulty getting inflections to work properly. I have put this into environment inflection.rb : ActiveSupport::Inflector.inflections do |inflect| inflect.plural ‘criterion’, ‘criteria’ inflect.singular ‘…

---

## [Ajax Star Rating in Rails 2.1](https://www.ruby-forum.com/t/ajax-star-rating-in-rails-2-1/150270)

<div class="topic-metadata">

**Author:** [@sinkva](https://www.ruby-forum.com/u/sinkva)\
**Replies:** 1\
**Last updated:** [October 8, 2008, 2:35am UTC](https://www.ruby-forum.com/t/ajax-star-rating-in-rails-2-1/150270 "2008-10-08T02:35:34Z")

</div>

I’ve searched high and low and come up with: http://blog.aisleten.com/2007/05/03/ajax-css-star-rating-with-acts\_as\_rateable/ http://www.naffis.com/blog/articles/2006/08/31/rails-ajax-star-rating-system But they are al…

---

## [What Blog Engine Is Best?](https://www.ruby-forum.com/t/what-blog-engine-is-best/150367)

<div class="topic-metadata">

**Author:** [@Abel](https://www.ruby-forum.com/u/Abel)\
**Replies:** 3\
**Last updated:** [October 8, 2008, 1:34am UTC](https://www.ruby-forum.com/t/what-blog-engine-is-best/150367 "2008-10-08T01:34:03Z")

</div>

I have a running Rails Application and now I want to append a blog to it. I’ve been researching on the matter and decided to try three engines that I thought were the most popular: Typo, Simple Log and Comatose, but …

---

## [Form\_for with RESTful route calling the wrong action](https://www.ruby-forum.com/t/form-for-with-restful-route-calling-the-wrong-action/150374)

<div class="topic-metadata">

**Author:** [@soderic](https://www.ruby-forum.com/u/soderic)\
**Replies:** 6\
**Last updated:** [October 7, 2008, 11:21pm UTC](https://www.ruby-forum.com/t/form-for-with-restful-route-calling-the-wrong-action/150374 "2008-10-07T23:21:03Z")

</div>

Hi, I am using RESTFUL routes with the following setup with a form\_for tag, but instead of calling the :create action my form is calling the :new action. I have read and re-read the resources documentation, and I am …

---

## [Model.create(!) doesn't add to database, no errors](https://www.ruby-forum.com/t/model-create-doesnt-add-to-database-no-errors/150369)

<div class="topic-metadata">

**Author:** [@sovok](https://www.ruby-forum.com/u/sovok)\
**Replies:** 2\
**Last updated:** [October 7, 2008, 9:42pm UTC](https://www.ruby-forum.com/t/model-create-doesnt-add-to-database-no-errors/150369 "2008-10-07T21:42:22Z")

</div>

Hi, I am trying to get form submitted data be submitted to my database, however not matter what I try it won’t work. in script/console Model.create(args) adds to the database just fine. pastie is here I’ve tried .cr…

---

## [Has\_many :through selections based on attributes of the :through table](https://www.ruby-forum.com/t/has-many-through-selections-based-on-attributes-of-the-through-table/150354)

<div class="topic-metadata">

**Author:** [@Neal\_L](https://www.ruby-forum.com/u/Neal_L)\
**Replies:** 1\
**Last updated:** [October 7, 2008, 9:31pm UTC](https://www.ruby-forum.com/t/has-many-through-selections-based-on-attributes-of-the-through-table/150354 "2008-10-07T21:31:48Z")

</div>

Hi all, I’d like to get your feedback on the easiest way to find records that are related via has\_many :through based on options in the :through table. Suppose an Author has\_many Books :through a table called Author…

---

## [Restriction in form Validation](https://www.ruby-forum.com/t/restriction-in-form-validation/150351)

<div class="topic-metadata">

**Author:** [@siradh](https://www.ruby-forum.com/u/siradh)\
**Replies:** 2\
**Last updated:** [October 7, 2008, 8:52pm UTC](https://www.ruby-forum.com/t/restriction-in-form-validation/150351 "2008-10-07T20:52:39Z")

</div>

Hi All, How can I restrict form validation ? say I have a model address, and wants to validate that model only in certain forms and ignores in others. Apologies if its already been posted Thanks, Sira

---

## [Unitialized constant ActiveRecord](https://www.ruby-forum.com/t/unitialized-constant-activerecord/150352)

<div class="topic-metadata">

**Author:** [@AnaRL](https://www.ruby-forum.com/u/AnaRL)\
**Replies:** 2\
**Last updated:** [October 7, 2008, 8:36pm UTC](https://www.ruby-forum.com/t/unitialized-constant-activerecord/150352 "2008-10-07T20:36:01Z")

</div>

Hi there, I’m learning to use RoR. I’m trying to run rake to create my blank database, but I get this “rake aborted! uninitialized constant ActiveRecord ” msg I don’t know what to do about it, I’ve checked I’ve ins…

---

## [Textilize with --- (3 dashes) removes text](https://www.ruby-forum.com/t/textilize-with-3-dashes-removes-text/150271)

<div class="topic-metadata">

**Author:** [@jan](https://www.ruby-forum.com/u/jan)\
**Replies:** 2\
**Last updated:** [October 7, 2008, 8:21pm UTC](https://www.ruby-forum.com/t/textilize-with-3-dashes-removes-text/150271 "2008-10-07T20:21:19Z")

</div>

Hi, using — (3 dashes) at the end of a string that is textilized, results in a single hr tag without any text. This seems weird to me. Am I overlooking something? av = ActionView::Base.new av.textilize(“sometext —…

---

## [Rails production version not accessible from other machines](https://www.ruby-forum.com/t/rails-production-version-not-accessible-from-other-machines/150296)

<div class="topic-metadata">

**Author:** [@amrita](https://www.ruby-forum.com/u/amrita)\
**Replies:** 7\
**Last updated:** [October 7, 2008, 8:11pm UTC](https://www.ruby-forum.com/t/rails-production-version-not-accessible-from-other-machines/150296 "2008-10-07T20:11:54Z")

</div>

Hi, I just deployed my first rails application in production mode using Capistrano and mongrel clusters. Here are the lines in my mongrel\_cluster.yml file. cwd: /myrailsdeploymath/current log\_file: log/mongrel.log …

---

## [.htaccess rewrite](https://www.ruby-forum.com/t/htaccess-rewrite/150297)

<div class="topic-metadata">

**Author:** [@Sav](https://www.ruby-forum.com/u/Sav)\
**Replies:** 8\
**Last updated:** [October 7, 2008, 7:35pm UTC](https://www.ruby-forum.com/t/htaccess-rewrite/150297 "2008-10-07T19:35:24Z")

</div>

can someone help me with an .htaccess rewrite? i’m trying to convert all requests to “/?spot=8888” to be “/locations/ 888”. thanks.

---

## [Login and logout doesn't work in different actions](https://www.ruby-forum.com/t/login-and-logout-doesnt-work-in-different-actions/150337)

<div class="topic-metadata">

**Author:** [@Shawn\_Tang](https://www.ruby-forum.com/u/Shawn_Tang)\
**Replies:** 3\
**Last updated:** [October 7, 2008, 7:32pm UTC](https://www.ruby-forum.com/t/login-and-logout-doesnt-work-in-different-actions/150337 "2008-10-07T19:32:29Z")

</div>

Hi,I am trying to create a user autentication system. Normally the user autentication system works fine but now i want to include the login and logout in the header of the application. so that u can login and logout i…

---

## [WEBrick - Illegal instruction](https://www.ruby-forum.com/t/webrick-illegal-instruction/150360)

<div class="topic-metadata">

**Author:** [@matte\_S](https://www.ruby-forum.com/u/matte_S)\
**Replies:** 1\
**Last updated:** [October 7, 2008, 7:09pm UTC](https://www.ruby-forum.com/t/webrick-illegal-instruction/150360 "2008-10-07T19:09:34Z")

</div>

Hi all, I had create a scaffold in a new rails app. Just title:string and body:text for a Note scaffold. The problem is that when I go to the new page (http://0.0.0.0:3000/notes/new) webrick crash and I can just see …

---

## [Should I create foreign keys on my database?](https://www.ruby-forum.com/t/should-i-create-foreign-keys-on-my-database/150286)

<div class="topic-metadata">

**Author:** [@elioncho](https://www.ruby-forum.com/u/elioncho)\
**Replies:** 9\
**Last updated:** [October 7, 2008, 7:07pm UTC](https://www.ruby-forum.com/t/should-i-create-foreign-keys-on-my-database/150286 "2008-10-07T19:07:15Z")

</div>

Hello, I have a dilemma. Should I create foreign keys on my database or should I let the app models do all the work? Thanks, Elioncho

---

## [Internet Explorer and Windows Media Player cause double send\_file downloads?](https://www.ruby-forum.com/t/internet-explorer-and-windows-media-player-cause-double-send-file-downloads/150166)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 5\
**Last updated:** [October 7, 2008, 6:58pm UTC](https://www.ruby-forum.com/t/internet-explorer-and-windows-media-player-cause-double-send-file-downloads/150166 "2008-10-07T18:58:27Z")

</div>

Hi, Our Rails application allows WAV file downloads. The user clicks on a link, or clicks a button, and the WAV file gets sent as a response, using send\_file. It looks like IE is discarding the initial WAV file and…

---

## [Moving from one dns domain to another](https://www.ruby-forum.com/t/moving-from-one-dns-domain-to-another/150340)

<div class="topic-metadata">

**Author:** [@bruparel](https://www.ruby-forum.com/u/bruparel)\
**Replies:** 4\
**Last updated:** [October 7, 2008, 6:49pm UTC](https://www.ruby-forum.com/t/moving-from-one-dns-domain-to-another/150340 "2008-10-07T18:49:39Z")

</div>

My Rails 2.1 app is changing DNS domains. For example: From: www.oldcompany.com To: www.newcompany.com The app uses Apache2, mongrel\_cluster, MySQL. I would like the existing users who visit www.oldcompany.com URL…

---

## [Monit newbie problem](https://www.ruby-forum.com/t/monit-newbie-problem/150335)

<div class="topic-metadata">

**Author:** [@friofool](https://www.ruby-forum.com/u/friofool)\
**Replies:** 10\
**Last updated:** [October 7, 2008, 6:32pm UTC](https://www.ruby-forum.com/t/monit-newbie-problem/150335 "2008-10-07T18:32:55Z")

</div>

Hi, I tried to make monit up on my server to manage ruby on rails application. I have some problem when i try to start monit : \[root@seb seb\]# /usr/local/bin/monit start all ‘mongrel\_rails\_3003’ start: /usr/bin/ruby …

---

## [Redirecting .php / .aspx requests?](https://www.ruby-forum.com/t/redirecting-php-aspx-requests/150330)

<div class="topic-metadata">

**Author:** [@softf5ajivanet](https://www.ruby-forum.com/u/softf5ajivanet)\
**Replies:** 2\
**Last updated:** [October 7, 2008, 6:11pm UTC](https://www.ruby-forum.com/t/redirecting-php-aspx-requests/150330 "2008-10-07T18:11:10Z")

</div>

I’m rebuilding my site and with google i’m getting a load of requests for .php or .aspx files which the previous site was built on. Is there any way of redirecting these www.mysite.com/index.aspx requests to the /inde…

---

## [Uninitialized constant ActiveRecord](https://www.ruby-forum.com/t/uninitialized-constant-activerecord/196820)

<div class="topic-metadata">

**Author:** [@AnaRL](https://www.ruby-forum.com/u/AnaRL)\
**Replies:** 0\
**Last updated:** [October 7, 2008, 5:37pm UTC](https://www.ruby-forum.com/t/uninitialized-constant-activerecord/196820 "2008-10-07T17:37:13Z")

</div>

Hi there, I’m learning to use RoR. I’m trying to run rake to create my blank database, but I get this “rake aborted! uninitialized constant ActiveRecord ” msg I don’t know what to do about it, I’ve checked I’ve ins…

---

## [How call distance\_of\_time\_in\_words() from controller?](https://www.ruby-forum.com/t/how-call-distance-of-time-in-words-from-controller/147966)

<div class="topic-metadata">

**Author:** [@mrpete](https://www.ruby-forum.com/u/mrpete)\
**Replies:** 6\
**Last updated:** [October 7, 2008, 5:12pm UTC](https://www.ruby-forum.com/t/how-call-distance-of-time-in-words-from-controller/147966 "2008-10-07T17:12:57Z")

</div>

How call distance\_of\_time\_in\_words() from a controller instead of a view? Reference: This page says this method is in: Module ActionView::Helpers::DateHelper which also says is here: in: actionpack/lib/action\_vi…

---

## [Grouping controllers into modules](https://www.ruby-forum.com/t/grouping-controllers-into-modules/150348)

<div class="topic-metadata">

**Author:** [@aldoitalo](https://www.ruby-forum.com/u/aldoitalo)\
**Replies:** 0\
**Last updated:** [October 7, 2008, 5:08pm UTC](https://www.ruby-forum.com/t/grouping-controllers-into-modules/150348 "2008-10-07T17:08:12Z")

</div>

i have grouping administration controllers into module (admin) for maintaining more order and logical structure. then i have modified class controller: class Admin::LocationsController \< ApplicationController … end …

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

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