# Rails

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

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

---

## [Single avatar upload: attachment\_fu or file\_column?](https://www.ruby-forum.com/t/single-avatar-upload-attachment-fu-or-file-column/133946)

<div class="topic-metadata">

**Author:** [@chunkyslink](https://www.ruby-forum.com/u/chunkyslink)\
**Replies:** 2\
**Last updated:** [April 5, 2008, 11:21pm UTC](https://www.ruby-forum.com/t/single-avatar-upload-attachment-fu-or-file-column/133946 "2008-04-05T23:21:13Z")

</div>

I’m struggling with a single avatar upload system for a user. I’ve hit brick walls with two different routes, so I’d appreciate pointers on choosing the right solution and fixing it: First attempt: attachment\_fu (via …

---

## [Installing Instant Rails over existing Ruby Installation](https://www.ruby-forum.com/t/installing-instant-rails-over-existing-ruby-installation/133970)

<div class="topic-metadata">

**Author:** [@alexd](https://www.ruby-forum.com/u/alexd)\
**Replies:** 0\
**Last updated:** [April 5, 2008, 10:01pm UTC](https://www.ruby-forum.com/t/installing-instant-rails-over-existing-ruby-installation/133970 "2008-04-05T22:01:47Z")

</div>

I just installed Instant Rails on my Windows machine. I previously had Ruby already installed, and now I seem to have two copies of Ruby, one in the Instant Rails folder, and my original one in the Ruby folder. My q…

---

## [Array Count](https://www.ruby-forum.com/t/array-count/133931)

<div class="topic-metadata">

**Author:** [@isotope13](https://www.ruby-forum.com/u/isotope13)\
**Replies:** 10\
**Last updated:** [April 5, 2008, 9:13pm UTC](https://www.ruby-forum.com/t/array-count/133931 "2008-04-05T21:13:16Z")

</div>

I have an array that contains the following: 114,151,157,151,10,12,14,151,157,10 I need to count how many instances of each item show up in this string. In this case: 114 shows up 1 time 151 shows up 3 times 157 sh…

---

## [Delay before Field.focus?](https://www.ruby-forum.com/t/delay-before-field-focus/133960)

<div class="topic-metadata">

**Author:** [@vapor](https://www.ruby-forum.com/u/vapor)\
**Replies:** 2\
**Last updated:** [April 5, 2008, 8:34pm UTC](https://www.ruby-forum.com/t/delay-before-field-focus/133960 "2008-04-05T20:34:27Z")

</div>

I have two inline effects… Effect.BlindDown(‘form’, {duration:0.2}), Field.focus(‘user\_name’) Now, in IE7, field wont get focused because form element is not visible at the time execution. How can I delay second (Fie…

---

## [How can hide a div?](https://www.ruby-forum.com/t/how-can-hide-a-div/133953)

<div class="topic-metadata">

**Author:** [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Replies:** 3\
**Last updated:** [April 5, 2008, 7:10pm UTC](https://www.ruby-forum.com/t/how-can-hide-a-div/133953 "2008-04-05T19:10:24Z")

</div>

I have a form wich I want to show it only if I clic on a link. I want that form, with div=“related”, to appear with the Appear effect of scriptaculous. This form alreday has some AJAX.

---

## [Urgent help needed! "uninitialized constant" error](https://www.ruby-forum.com/t/urgent-help-needed-uninitialized-constant-error/133925)

<div class="topic-metadata">

**Author:** [@nasir](https://www.ruby-forum.com/u/nasir)\
**Replies:** 1\
**Last updated:** [April 5, 2008, 6:57pm UTC](https://www.ruby-forum.com/t/urgent-help-needed-uninitialized-constant-error/133925 "2008-04-05T18:57:31Z")

</div>

I need a hint on what could be causing the following error message: NameError in Project areasController#destroy uninitialized constant ProjectArea::KeyAspect D:/Ruby/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/li…

---

## [How do you model an article that has an author and readers w/ the same User model?](https://www.ruby-forum.com/t/how-do-you-model-an-article-that-has-an-author-and-readers-w-the-same-user-model/133913)

<div class="topic-metadata">

**Author:** [@frank\_programmer](https://www.ruby-forum.com/u/frank_programmer)\
**Replies:** 2\
**Last updated:** [April 5, 2008, 6:52pm UTC](https://www.ruby-forum.com/t/how-do-you-model-an-article-that-has-an-author-and-readers-w-the-same-user-model/133913 "2008-04-05T18:52:51Z")

</div>

Hi, I am stuck trying to figure out how to model this. I have a user model and an article model. It is easy enough to say the user has many articles and the article has one user. class User \< ActiveRecord::Base has…

---

## [Ruport - How to set page size?](https://www.ruby-forum.com/t/ruport-how-to-set-page-size/133899)

<div class="topic-metadata">

**Author:** [@Cassiano\_R](https://www.ruby-forum.com/u/Cassiano_R)\
**Replies:** 1\
**Last updated:** [April 5, 2008, 6:41pm UTC](https://www.ruby-forum.com/t/ruport-how-to-set-page-size/133899 "2008-04-05T18:41:41Z")

</div>

Hi I’m using Ruport to generate some pdf reports. Ruport uses PDF::Writer to render pdf files. I need generate report in A4 page format and by default, ruport generate pages in Letter format. How I can change this s…

---

## [Editable drop down menu](https://www.ruby-forum.com/t/editable-drop-down-menu/133809)

<div class="topic-metadata">

**Author:** [@pimeamark](https://www.ruby-forum.com/u/pimeamark)\
**Replies:** 3\
**Last updated:** [April 5, 2008, 6:35pm UTC](https://www.ruby-forum.com/t/editable-drop-down-menu/133809 "2008-04-05T18:35:14Z")

</div>

Does anyone know if there’s a method in rails to do this? Basically I want there to be a drop down menu with items to chose from, but also the ability to enter whatever you want in the box. I just dont know offhand if…

---

## [Assigning Show method to a field on Index/list views](https://www.ruby-forum.com/t/assigning-show-method-to-a-field-on-index-list-views/133936)

<div class="topic-metadata">

**Author:** [@Colleen\_RobledoS\_ML](https://www.ruby-forum.com/u/Colleen_RobledoS_ML)\
**Replies:** 2\
**Last updated:** [April 5, 2008, 6:31pm UTC](https://www.ruby-forum.com/t/assigning-show-method-to-a-field-on-index-list-views/133936 "2008-04-05T18:31:05Z")

</div>

Hello, I’m still very new to learning Rails (I’m better with Grails). On the Index/List views, how can I assign he Show method to a field in the table(making that particular table field the “clickable” link to the as…

---

## [Design question REST join table](https://www.ruby-forum.com/t/design-question-rest-join-table/133915)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [April 5, 2008, 5:51pm UTC](https://www.ruby-forum.com/t/design-question-rest-join-table/133915 "2008-04-05T17:51:34Z")

</div>

Hello, I’m currently designing a rails application using REST principles. I have an employee table, subservices table, and employees\_subservices join table. Should I create a resource called employee\_subservices or …

---

## [Help with Json1.1.2.gem error gem\_make.out?](https://www.ruby-forum.com/t/help-with-json1-1-2-gem-error-gem-make-out/133875)

<div class="topic-metadata">

**Author:** [@yetanothergeek](https://www.ruby-forum.com/u/yetanothergeek)\
**Replies:** 3\
**Last updated:** [April 5, 2008, 5:45pm UTC](https://www.ruby-forum.com/t/help-with-json1-1-2-gem-error-gem-make-out/133875 "2008-04-05T17:45:07Z")

</div>

Hi, Could someone please point me in the right direction, I need the json gem for an apps I am working on, Iâ€™m new to RoR been working with it for around 4 weeks now and have been given a requirements list for the g…

---

## [Dynamic select list @www.stonemind.net](https://www.ruby-forum.com/t/dynamic-select-list-www-stonemind-net/133954)

<div class="topic-metadata">

**Author:** [@drorchung](https://www.ruby-forum.com/u/drorchung)\
**Replies:** 5\
**Last updated:** [April 5, 2008, 5:07pm UTC](https://www.ruby-forum.com/t/dynamic-select-list-www-stonemind-net/133954 "2008-04-05T17:07:58Z")

</div>

Hi, Has anyone read the web page by â€œAdding Dynamic Select Lists to Resource Scaffolding in Railsâ€ at by Adam Smith. The logic is easy to follow. The codes are easy too. I followed the tutorial. I worked thru it…

---

## [Select\_tag - observe field](https://www.ruby-forum.com/t/select-tag-observe-field/133037)

<div class="topic-metadata">

**Author:** [@jimmypalmer](https://www.ruby-forum.com/u/jimmypalmer)\
**Replies:** 2\
**Last updated:** [April 5, 2008, 5:06pm UTC](https://www.ruby-forum.com/t/select-tag-observe-field/133037 "2008-04-05T17:06:48Z")

</div>

I’m trying to do an ajax call when the select (drop down) gets changed. What’s the best way to do this?

---

## [Employments example using Rich associations :through](https://www.ruby-forum.com/t/employments-example-using-rich-associations-through/133865)

<div class="topic-metadata">

**Author:** [@macarthy](https://www.ruby-forum.com/u/macarthy)\
**Replies:** 1\
**Last updated:** [April 5, 2008, 5:05pm UTC](https://www.ruby-forum.com/t/employments-example-using-rich-associations-through/133865 "2008-04-05T17:05:02Z")

</div>

What is the best way to deal with this model in rails 2.0 + class School \< ActiveRecord::Base school model has a name attribute has\_many :employments has\_many :teachers , :through=\> :employments end class Teacher \< …

---

## [Validates\_numericality\_of :not\_equal\_to](https://www.ruby-forum.com/t/validates-numericality-of-not-equal-to/133837)

<div class="topic-metadata">

**Author:** [@pkoebbe](https://www.ruby-forum.com/u/pkoebbe)\
**Replies:** 6\
**Last updated:** [April 5, 2008, 3:58pm UTC](https://www.ruby-forum.com/t/validates-numericality-of-not-equal-to/133837 "2008-04-05T15:58:10Z")

</div>

I have a situation in which I want to validate a number is not zero. Both positive and negative values are acceptable, just not zero. validates\_numericality\_of has an :equal\_to attribute, but I don’t see a :not\_equal\_…

---

## [How to call a dll file from rails application?](https://www.ruby-forum.com/t/how-to-call-a-dll-file-from-rails-application/133949)

<div class="topic-metadata">

**Author:** [@ratnavel](https://www.ruby-forum.com/u/ratnavel)\
**Replies:** 1\
**Last updated:** [April 5, 2008, 2:07pm UTC](https://www.ruby-forum.com/t/how-to-call-a-dll-file-from-rails-application/133949 "2008-04-05T14:07:14Z")

</div>

HI, In my application i have a requirement to call a dll file. How to call a dll file from rails application… Thanks, Ratnavel.

---

## [Crystal Reports in ROR application](https://www.ruby-forum.com/t/crystal-reports-in-ror-application/133939)

<div class="topic-metadata">

**Author:** [@karthikeyan](https://www.ruby-forum.com/u/karthikeyan)\
**Replies:** 0\
**Last updated:** [April 5, 2008, 7:58am UTC](https://www.ruby-forum.com/t/crystal-reports-in-ror-application/133939 "2008-04-05T07:58:30Z")

</div>

Hi, I want to use Crystal Reports in my ROR application. The way I am planning is to create an XML file and send the file as the input for the Crystal Report application. I believe there is no API in ROR to access th…

---

## [Lost: libruby1.8.so.1.8](https://www.ruby-forum.com/t/lost-libruby1-8-so-1-8/133930)

<div class="topic-metadata">

**Author:** [@explainer](https://www.ruby-forum.com/u/explainer)\
**Replies:** 0\
**Last updated:** [April 5, 2008, 5:38am UTC](https://www.ruby-forum.com/t/lost-libruby1-8-so-1-8/133930 "2008-04-05T05:38:28Z")

</div>

I had a minor meltdown of my system and some libraries got corrupted, including libruby1.8.so.1.8. I tried reinstalling the Ubuntu ruby- full and rubygems packages, but the library is still missing. Can anyone tell …

---

## [Overloading and wrapping an association method](https://www.ruby-forum.com/t/overloading-and-wrapping-an-association-method/133767)

<div class="topic-metadata">

**Author:** [@jesseproudman](https://www.ruby-forum.com/u/jesseproudman)\
**Replies:** 3\
**Last updated:** [April 5, 2008, 4:15am UTC](https://www.ruby-forum.com/t/overloading-and-wrapping-an-association-method/133767 "2008-04-05T04:15:27Z")

</div>

Hi all: For example I have: class Color \< ActiveRecord::Base belongs\_to :ball end class Ball \< ActiveRecord::Base has\_many :colors end What I want to do is to write a method that: takes the result of Ball#color…

---

## [Custom routes issue](https://www.ruby-forum.com/t/custom-routes-issue/133929)

<div class="topic-metadata">

**Author:** [@sumwutdum](https://www.ruby-forum.com/u/sumwutdum)\
**Replies:** 1\
**Last updated:** [April 5, 2008, 3:24am UTC](https://www.ruby-forum.com/t/custom-routes-issue/133929 "2008-04-05T03:24:21Z")

</div>

The url that is generated for an additional controller method is causing some confusion. I have a site where people can enter their email to get access for a beta account. This allows me to later grant each person a…

---

## [Routing and default module](https://www.ruby-forum.com/t/routing-and-default-module/133695)

<div class="topic-metadata">

**Author:** [@dburkes](https://www.ruby-forum.com/u/dburkes)\
**Replies:** 3\
**Last updated:** [April 5, 2008, 12:26am UTC](https://www.ruby-forum.com/t/routing-and-default-module/133695 "2008-04-05T00:26:34Z")

</div>

I would like to route all requests with the path “foo/:controller/:action” to a modulized controller like ‘bar/#{controller}’. So “foo/bro/index” goes to Bar::BroController, “foo/baz/index” goes to Bar::BazController…

---

## [Date.to\_s format with time\_ago\_in\_words](https://www.ruby-forum.com/t/date-to-s-format-with-time-ago-in-words/133922)

<div class="topic-metadata">

**Author:** [@jdugarte](https://www.ruby-forum.com/u/jdugarte)\
**Replies:** 0\
**Last updated:** [April 5, 2008, 12:21am UTC](https://www.ruby-forum.com/t/date-to-s-format-with-time-ago-in-words/133922 "2008-04-05T00:21:41Z")

</div>

Hello, Following this post’s instructions (railspikes.com) I’m trying to define a Date format like this: ActiveSupport::CoreExtensions::date::Conversions::DATE\_FORMATS.update(:date\_ago =\> lambda { |date| date.strftim…

---

## [\[Job\] ROR Developer Job - Palo Alto, CA - A2Z Development (An Amazon.com Company)](https://www.ruby-forum.com/t/job-ror-developer-job-palo-alto-ca-a2z-development-an-amazon-com-company/133920)

<div class="topic-metadata">

**Author:** [@JonathanSA2Z](https://www.ruby-forum.com/u/JonathanSA2Z)\
**Replies:** 0\
**Last updated:** [April 4, 2008, 11:37pm UTC](https://www.ruby-forum.com/t/job-ror-developer-job-palo-alto-ca-a2z-development-an-amazon-com-company/133920 "2008-04-04T23:37:03Z")

</div>

Please respond to: removed\_email\_address@domain.invalid Full Time - Senior Software Development Engineer - A2Z Development Center (An Amazon.com Company), Palo Alto == UnSpun == UnSpun by Amazon is a product being de…

---

## [\[ANN} log\_buddy 0.0.2 released](https://www.ruby-forum.com/t/ann-log-buddy-0-0-2-released/133919)

<div class="topic-metadata">

**Author:** [@rsanheim](https://www.ruby-forum.com/u/rsanheim)\
**Replies:** 0\
**Last updated:** [April 4, 2008, 11:27pm UTC](https://www.ruby-forum.com/t/ann-log-buddy-0-0-2-released/133919 "2008-04-04T23:27:41Z")

</div>

DESCRIPTION: log\_buddy is your friendly little log buddy at your side, helping you dev, debug, and test. SYNOPSIS: Call LogBuddy.init to use log\_buddy. It will add two methods to object instance and class level: “d…

---

## [Manually installing](https://www.ruby-forum.com/t/manually-installing/133917)

<div class="topic-metadata">

**Author:** [@cypherzero](https://www.ruby-forum.com/u/cypherzero)\
**Replies:** 0\
**Last updated:** [April 4, 2008, 11:21pm UTC](https://www.ruby-forum.com/t/manually-installing/133917 "2008-04-04T23:21:55Z")

</div>

After gems failing to work many times with missing dll errors I am wondering if there is any way to install manually? I’ve got ruby working and I downloaded the zip for rails but can’t seem to find an installer script…

---

## [In a migration, how to specify 'self.down' if self.up drops a table](https://www.ruby-forum.com/t/in-a-migration-how-to-specify-self-down-if-self-up-drops-a-table/133916)

<div class="topic-metadata">

**Author:** [@dino\_d](https://www.ruby-forum.com/u/dino_d)\
**Replies:** 2\
**Last updated:** [April 4, 2008, 10:53pm UTC](https://www.ruby-forum.com/t/in-a-migration-how-to-specify-self-down-if-self-up-drops-a-table/133916 "2008-04-04T22:53:38Z")

</div>

Hi- I no longer need a join table and want to drop it, but I want to be able to recover if I’ve made a mistake. Is there an easy way to capture the current state of the table and incorporate it into my self.down? A…

---

## [Validation for at least one record in database](https://www.ruby-forum.com/t/validation-for-at-least-one-record-in-database/133859)

<div class="topic-metadata">

**Author:** [@vapor](https://www.ruby-forum.com/u/vapor)\
**Replies:** 2\
**Last updated:** [April 4, 2008, 9:34pm UTC](https://www.ruby-forum.com/t/validation-for-at-least-one-record-in-database/133859 "2008-04-04T21:34:07Z")

</div>

I don’t want user to delete all entries in database. There should be at least one always present. How can I put this validation in model?

---

## [Rails \> email campage software available?](https://www.ruby-forum.com/t/rails-email-campage-software-available/133847)

<div class="topic-metadata">

**Author:** [@remco123](https://www.ruby-forum.com/u/remco123)\
**Replies:** 1\
**Last updated:** [April 4, 2008, 9:31pm UTC](https://www.ruby-forum.com/t/rails-email-campage-software-available/133847 "2008-04-04T21:31:11Z")

</div>

Hi, I am looking for a e-mail campagne management tool written in ruby for sending news-letters. Anynone suggestions? Grytz…remco

---

## [Rjs-file: javascript shown instead of executed - mime-type?](https://www.ruby-forum.com/t/rjs-file-javascript-shown-instead-of-executed-mime-type/133808)

<div class="topic-metadata">

**Author:** [@jehoho](https://www.ruby-forum.com/u/jehoho)\
**Replies:** 3\
**Last updated:** [April 4, 2008, 8:48pm UTC](https://www.ruby-forum.com/t/rjs-file-javascript-shown-instead-of-executed-mime-type/133808 "2008-04-04T20:48:48Z")

</div>

Hi. Using a rjs-file my browser shows the javascript-code instead of executing. Why? Is there a wrong mime-type configuration? Where to fix it? Thanks Jens

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

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