# Rails

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

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

---

## [widgEditor not showing on edit page?](https://www.ruby-forum.com/t/widgeditor-not-showing-on-edit-page/88482)

<div class="topic-metadata">

**Author:** [@surfman](https://www.ruby-forum.com/u/surfman)\
**Replies:** 0\
**Last updated:** [March 11, 2007, 10:16pm UTC](https://www.ruby-forum.com/t/widgeditor-not-showing-on-edit-page/88482 "2007-03-11T22:16:35Z")

</div>

I implemented widgEditor for a text\_area, I use \<%= text\_area ‘post’, ‘description’, ‘class’=\>‘widgEditor’ %\> to offer a basic textarea allowing users to enter text. it shows when creating a new record, but not shows…

---

## [How to remove spaces from phone number](https://www.ruby-forum.com/t/how-to-remove-spaces-from-phone-number/86575)

<div class="topic-metadata">

**Author:** [@rmehta](https://www.ruby-forum.com/u/rmehta)\
**Replies:** 2\
**Last updated:** [March 11, 2007, 9:24pm UTC](https://www.ruby-forum.com/t/how-to-remove-spaces-from-phone-number/86575 "2007-03-11T21:24:01Z")

</div>

Hi, I need to allow login based on the phone number. During the signup they can give the number in any format with spaces, slash or (). But for storing in database and then during login to compare I just want the 10 …

---

## [Where to put the bubble?](https://www.ruby-forum.com/t/where-to-put-the-bubble/88475)

<div class="topic-metadata">

**Author:** [@jeffpritchard](https://www.ruby-forum.com/u/jeffpritchard)\
**Replies:** 1\
**Last updated:** [March 11, 2007, 8:21pm UTC](https://www.ruby-forum.com/t/where-to-put-the-bubble/88475 "2007-03-11T20:21:44Z")

</div>

OK, here’s the scenario. I’ve got a bunch of unordered lists on a page. Each item has a little bubble icon in it that is supposed to act like a rollover target. User rolls over one of these icons, and a help bubbl…

---

## [Credit card best practice](https://www.ruby-forum.com/t/credit-card-best-practice/88285)

<div class="topic-metadata">

**Author:** [@jordelver](https://www.ruby-forum.com/u/jordelver)\
**Replies:** 2\
**Last updated:** [March 11, 2007, 8:13pm UTC](https://www.ruby-forum.com/t/credit-card-best-practice/88285 "2007-03-11T20:13:43Z")

</div>

Hi, I need to handle credit cards and would like some advice. I won’t be storing any credit card details for future payments but instead requiring the customer to enter their payment details each time they make a pu…

---

## [Navigational Menus](https://www.ruby-forum.com/t/navigational-menus/88414)

<div class="topic-metadata">

**Author:** [@doug](https://www.ruby-forum.com/u/doug)\
**Replies:** 4\
**Last updated:** [March 11, 2007, 7:14pm UTC](https://www.ruby-forum.com/t/navigational-menus/88414 "2007-03-11T19:14:35Z")

</div>

Hi, this is my 2nd and last naive question for the day. Based on the observation that Rails addresses so many issues and handles them so well, I was a little surprised that it seems that Rails doesn’t appear to have …

---

## [Out of Office reply - Re: Re: alias \_method error with 1.2](https://www.ruby-forum.com/t/out-of-office-reply-re-re-alias-method-error-with-1-2/102710)

<div class="topic-metadata">

**Author:** [@tekin](https://www.ruby-forum.com/u/tekin)\
**Replies:** 1\
**Last updated:** [March 11, 2007, 7:09pm UTC](https://www.ruby-forum.com/t/out-of-office-reply-re-re-alias-method-error-with-1-2/102710 "2007-03-11T19:09:34Z")

</div>

Hi, I shall be out of the office from Monday 12th of March to Monday 19th. If you have an urgent enquiry, please contact either Mike or Liam at the Raid office. Regards, Tekin S. Raid Associates Ltd

---

## [RMagick not working](https://www.ruby-forum.com/t/rmagick-not-working/88432)

<div class="topic-metadata">

**Author:** [@marotte](https://www.ruby-forum.com/u/marotte)\
**Replies:** 3\
**Last updated:** [March 11, 2007, 6:52pm UTC](https://www.ruby-forum.com/t/rmagick-not-working/88432 "2007-03-11T18:52:30Z")

</div>

Hello, On Windows XP, I got a ruby program using RMagick and working perfectly. I put this at the begining of my code: require 'rubygems' require 'RMagick' include 'Magick' Now, when I use the exact same code within …

---

## [Clean way to detect change using callbacks](https://www.ruby-forum.com/t/clean-way-to-detect-change-using-callbacks/87920)

<div class="topic-metadata">

**Author:** [@dmcclean](https://www.ruby-forum.com/u/dmcclean)\
**Replies:** 5\
**Last updated:** [March 11, 2007, 6:27pm UTC](https://www.ruby-forum.com/t/clean-way-to-detect-change-using-callbacks/87920 "2007-03-11T18:27:24Z")

</div>

I would like in my ‘after\_update’ callback to detect if an attribute has been changed, and if so change some related objects. Is the best way something like this class Thing \< ActiveRecord::Base def before\_update @…

---

## [Select Box population](https://www.ruby-forum.com/t/select-box-population/88401)

<div class="topic-metadata">

**Author:** [@mike](https://www.ruby-forum.com/u/mike)\
**Replies:** 4\
**Last updated:** [March 11, 2007, 6:18pm UTC](https://www.ruby-forum.com/t/select-box-population/88401 "2007-03-11T18:18:14Z")

</div>

I would like to populate a select box in rails with the values 0 - 100 - how can this be done in rails?

---

## [Cant get fixtures to load](https://www.ruby-forum.com/t/cant-get-fixtures-to-load/88456)

<div class="topic-metadata">

**Author:** [@KSRajesh](https://www.ruby-forum.com/u/KSRajesh)\
**Replies:** 2\
**Last updated:** [March 11, 2007, 6:10pm UTC](https://www.ruby-forum.com/t/cant-get-fixtures-to-load/88456 "2007-03-11T18:10:22Z")

</div>

Hi, I cant get yaml fixtures to load. The brief error is Errno::ENOENT: No such file or directory - some. I have NO idea what this ‘some’ is. The yaml file is simplicity itself. hq: id: 1 role\_name: HeadQua…

---

## [Beyond Rails (quite long and perhaps OT but not the same top](https://www.ruby-forum.com/t/beyond-rails-quite-long-and-perhaps-ot-but-not-the-same-top/88383)

<div class="topic-metadata">

**Author:** [@Brubix](https://www.ruby-forum.com/u/Brubix)\
**Replies:** 2\
**Last updated:** [March 11, 2007, 5:50pm UTC](https://www.ruby-forum.com/t/beyond-rails-quite-long-and-perhaps-ot-but-not-the-same-top/88383 "2007-03-11T17:50:19Z")

</div>

I love Rails. And Ruby too ! Though I must admit that learn OOP, Ruby and Rails all together, coming from years of mainframe programming with prehistoric languages, without a mentor and having only a few hours per wee…

---

## [Testing acts\_as\_attachment?](https://www.ruby-forum.com/t/testing-acts-as-attachment/87979)

<div class="topic-metadata">

**Author:** [@jeff](https://www.ruby-forum.com/u/jeff)\
**Replies:** 1\
**Last updated:** [March 11, 2007, 5:45pm UTC](https://www.ruby-forum.com/t/testing-acts-as-attachment/87979 "2007-03-11T17:45:13Z")

</div>

Since attachment\_fu isnâ€™t working for me at the moment, Iâ€™ve switched to acts\_as\_attachment. Does anyone know how to set up a simple unit test for acts\_as\_attachment? Iâ€™ve ventured into the included tests but th…

---

## [Order by dynamic field](https://www.ruby-forum.com/t/order-by-dynamic-field/88453)

<div class="topic-metadata">

**Author:** [@Justas](https://www.ruby-forum.com/u/Justas)\
**Replies:** 3\
**Last updated:** [March 11, 2007, 4:58pm UTC](https://www.ruby-forum.com/t/order-by-dynamic-field/88453 "2007-03-11T16:58:00Z")

</div>

Hello, If I have the following model: class MyModel \< ActiveRecord::Base def self.some\_calculations(id) … end end Is it possible to use MyModel.find() and order the results by my defined method self.some\_calculat…

---

## [Database structure question](https://www.ruby-forum.com/t/database-structure-question/88457)

<div class="topic-metadata">

**Author:** [@MJMJMJ](https://www.ruby-forum.com/u/MJMJMJ)\
**Replies:** 1\
**Last updated:** [March 11, 2007, 4:44pm UTC](https://www.ruby-forum.com/t/database-structure-question/88457 "2007-03-11T16:44:59Z")

</div>

Hi, I have a database question. I have a table called ‘posts’ which holds all the blog posts. Now I want to store updates of a specific post in the same table. Normal post would get the type ‘normal’ and updates woul…

---

## [Auth before proxy](https://www.ruby-forum.com/t/auth-before-proxy/88468)

<div class="topic-metadata">

**Author:** [@zakifataya](https://www.ruby-forum.com/u/zakifataya)\
**Replies:** 0\
**Last updated:** [March 11, 2007, 4:39pm UTC](https://www.ruby-forum.com/t/auth-before-proxy/88468 "2007-03-11T16:39:19Z")

</div>

I’m planning on deploying a Rails app using Apache 2, mod\_proxy, and Mongrel, which seems to be the recommended scheme. I need authentication, but I’m OK with Apache handling that, as long as Apache passes REMOTE\_USER…

---

## [Getting Distinct Rows While Still Returning Other Fields](https://www.ruby-forum.com/t/getting-distinct-rows-while-still-returning-other-fields/88466)

<div class="topic-metadata">

**Author:** [@johnk](https://www.ruby-forum.com/u/johnk)\
**Replies:** 0\
**Last updated:** [March 11, 2007, 4:27pm UTC](https://www.ruby-forum.com/t/getting-distinct-rows-while-still-returning-other-fields/88466 "2007-03-11T16:27:57Z")

</div>

On occasion I encounter this problem but I never remember how I fix it the time before… which is annoying for myself. I have the following find: @conversations = Message.find(:all, :select =\> “DISTINCT from\_user\_id, …

---

## [Render RJS in Index](https://www.ruby-forum.com/t/render-rjs-in-index/88462)

<div class="topic-metadata">

**Author:** [@sp00nyg](https://www.ruby-forum.com/u/sp00nyg)\
**Replies:** 4\
**Last updated:** [March 11, 2007, 4:12pm UTC](https://www.ruby-forum.com/t/render-rjs-in-index/88462 "2007-03-11T16:12:55Z")

</div>

Greetings Having the darndest time trying to render an inline RJS page element in my index page. I don’t have any trouble linking to a remote page and rendering RJS, but it’s got me stumped how to do it from the index …

---

## [Playing with link\_to helper](https://www.ruby-forum.com/t/playing-with-link-to-helper/88396)

<div class="topic-metadata">

**Author:** [@Nicholas\_W](https://www.ruby-forum.com/u/Nicholas_W)\
**Replies:** 1\
**Last updated:** [March 11, 2007, 4:07pm UTC](https://www.ruby-forum.com/t/playing-with-link-to-helper/88396 "2007-03-11T16:07:54Z")

</div>

Hi \*, someone has suggestions on how to improve this code ? For example I’d like my parameteres to be similar to the original link\_to helper, :controller =\> :blah, :action =\> :blah and so on … def link\_to\_current\_cla…

---

## [Ruby on Rails and Eclipse](https://www.ruby-forum.com/t/ruby-on-rails-and-eclipse/88400)

<div class="topic-metadata">

**Author:** [@jsn1](https://www.ruby-forum.com/u/jsn1)\
**Replies:** 2\
**Last updated:** [March 11, 2007, 4:02pm UTC](https://www.ruby-forum.com/t/ruby-on-rails-and-eclipse/88400 "2007-03-11T16:02:07Z")

</div>

Now that RadRails disappears, what ar ethe option to run RoR in eclipse?

---

## [Question on rake and migrations in netbeans](https://www.ruby-forum.com/t/question-on-rake-and-migrations-in-netbeans/88458)

<div class="topic-metadata">

**Author:** [@dlittman](https://www.ruby-forum.com/u/dlittman)\
**Replies:** 0\
**Last updated:** [March 11, 2007, 3:08pm UTC](https://www.ruby-forum.com/t/question-on-rake-and-migrations-in-netbeans/88458 "2007-03-11T15:08:49Z")

</div>

The demos on the netbeans site are good but show creating the db by running a sql script. Has anyone figured out how to run migrations from the ide? And how do rake tasks get executed from the ide? (I wasn’t sure w…

---

## [Best way to store binary data](https://www.ruby-forum.com/t/best-way-to-store-binary-data/88265)

<div class="topic-metadata">

**Author:** [@amrkamel](https://www.ruby-forum.com/u/amrkamel)\
**Replies:** 7\
**Last updated:** [March 11, 2007, 2:24pm UTC](https://www.ruby-forum.com/t/best-way-to-store-binary-data/88265 "2007-03-11T14:24:43Z")

</div>

Dear all, can any one tell me what is the best way to store binary data “e.g. images, videos …etc” of various sizes in a ROR application? should I store them in mysql database or in file system? Thanks alot :slight\_s…

---

## [View not working with . but works with \[' '\]](https://www.ruby-forum.com/t/view-not-working-with-but-works-with/88449)

<div class="topic-metadata">

**Author:** [@KSRajesh](https://www.ruby-forum.com/u/KSRajesh)\
**Replies:** 8\
**Last updated:** [March 11, 2007, 1:16pm UTC](https://www.ruby-forum.com/t/view-not-working-with-but-works-with/88449 "2007-03-11T13:16:37Z")

</div>

I have some weird view behavior going around which I am unable to understand. \<% for b in @admin\_budget %\> \<%= b\['rental'\] %\> \<%= b\['phone'\] %\> \<%= b\['consumables'\] %\> \<% end %\> works… but \<% for b in @admin…

---

## [Markdown/Textile shootout](https://www.ruby-forum.com/t/markdown-textile-shootout/88455)

<div class="topic-metadata">

**Author:** [@revlob](https://www.ruby-forum.com/u/revlob)\
**Replies:** 0\
**Last updated:** [March 11, 2007, 12:45pm UTC](https://www.ruby-forum.com/t/markdown-textile-shootout/88455 "2007-03-11T12:45:58Z")

</div>

There seem to be a number of simple text-formatting modules available for Ruby, including RedCloth, BlueCloth, SuperRedCloth, and Maruku. It seems that the latest release of RedCloth is simply unusable (:filter\_html d…

---

## [Getting 12:00 PM instead of 12:00 AM](https://www.ruby-forum.com/t/getting-12-00-pm-instead-of-12-00-am/88437)

<div class="topic-metadata">

**Author:** [@dorelal](https://www.ruby-forum.com/u/dorelal)\
**Replies:** 3\
**Last updated:** [March 11, 2007, 12:35pm UTC](https://www.ruby-forum.com/t/getting-12-00-pm-instead-of-12-00-am/88437 "2007-03-11T12:35:33Z")

</div>

t1 = Time.now =\> Sat Mar 10 19:27:33 -0500 2007 t2 = t1.change(:hour =\> 12, :min =\> 0, :sec =\> 0) =\> Sat Mar 10 12:00:00 -0500 2007 t2.strftime("%H:%M %p") =\> “12:00 PM” Since I am setting hour to 12, I was…

---

## [Create a script that includes the resources of a project](https://www.ruby-forum.com/t/create-a-script-that-includes-the-resources-of-a-project/88454)

<div class="topic-metadata">

**Author:** [@budu](https://www.ruby-forum.com/u/budu)\
**Replies:** 1\
**Last updated:** [March 11, 2007, 12:06pm UTC](https://www.ruby-forum.com/t/create-a-script-that-includes-the-resources-of-a-project/88454 "2007-03-11T12:06:31Z")

</div>

Hi! What includes/requires should I write to create a separate console script that includes all the resources (models) of a Rails project (like script/console) ? Thanks. Nicolas.

---

## [Updated to 1.2.2. and it doesn't run anymore](https://www.ruby-forum.com/t/updated-to-1-2-2-and-it-doesnt-run-anymore/88415)

<div class="topic-metadata">

**Author:** [@dxk3355](https://www.ruby-forum.com/u/dxk3355)\
**Replies:** 2\
**Last updated:** [March 11, 2007, 11:47am UTC](https://www.ruby-forum.com/t/updated-to-1-2-2-and-it-doesnt-run-anymore/88415 "2007-03-11T11:47:02Z")

</div>

hi! after installing 1.2.2 (gem update --system) changing the version in environment.rb and doing rake rails:update , I get this, when trying to start the sever: ruby script/server --binding localhost =\> Booting WE…

---

## [Embedding links in text fields](https://www.ruby-forum.com/t/embedding-links-in-text-fields/88438)

<div class="topic-metadata">

**Author:** [@vin](https://www.ruby-forum.com/u/vin)\
**Replies:** 1\
**Last updated:** [March 11, 2007, 10:37am UTC](https://www.ruby-forum.com/t/embedding-links-in-text-fields/88438 "2007-03-11T10:37:18Z")

</div>

I am trying to buld a link with text displayed within a text\_field or text\_field\_tag. e.g. the following text field displays an ID of 1. \<%= text\_field\_tag(@contact, @contact.id , {:readonly =\> true}) %\> I would like …

---

## [ActionView::Template Error](https://www.ruby-forum.com/t/actionview-template-error/88448)

<div class="topic-metadata">

**Author:** [@Serdar\_KSSSSlSSSSSS](https://www.ruby-forum.com/u/Serdar_KSSSSlSSSSSS)\
**Replies:** 0\
**Last updated:** [March 11, 2007, 8:08am UTC](https://www.ruby-forum.com/t/actionview-template-error/88448 "2007-03-11T08:08:01Z")

</div>

All, I’ve started to get ActionView::TemplateError (undefined method \`errors’ for nil:NilClass) on all forms that have error\_message\_on. I’m stumped as this is not ocurring in development but in production so I can’t…

---

## [Modular scripts](https://www.ruby-forum.com/t/modular-scripts/88445)

<div class="topic-metadata">

**Author:** [@chris\_loper](https://www.ruby-forum.com/u/chris_loper)\
**Replies:** 0\
**Last updated:** [March 11, 2007, 6:46am UTC](https://www.ruby-forum.com/t/modular-scripts/88445 "2007-03-11T06:46:57Z")

</div>

Not sure how to really phrase the question so I will explain what I am doing: I need to allow users to perform some “system” commands, that is, Rails will execute these commands. In order to parse the return data and…

---

## [IE 5.5 not sending params when it sends Ajax](https://www.ruby-forum.com/t/ie-5-5-not-sending-params-when-it-sends-ajax/88435)

<div class="topic-metadata">

**Author:** [@wpwood](https://www.ruby-forum.com/u/wpwood)\
**Replies:** 2\
**Last updated:** [March 11, 2007, 5:10am UTC](https://www.ruby-forum.com/t/ie-5-5-not-sending-params-when-it-sends-ajax/88435 "2007-03-11T05:10:52Z")

</div>

Greetings! When a vistor enters my site, the first page submits via a form\_remote\_tag that calls a method that uses responds\_to to see if the visitor has js enabled. My problem is that IE5.5 is not sending anything b…

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

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