# Rails

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

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

---

## [Rating plugin with text rating](https://www.ruby-forum.com/t/rating-plugin-with-text-rating/137007)

<div class="topic-metadata">

**Author:** [@philipp07](https://www.ruby-forum.com/u/philipp07)\
**Replies:** 0\
**Last updated:** [May 8, 2008, 7:24am UTC](https://www.ruby-forum.com/t/rating-plugin-with-text-rating/137007 "2008-05-08T07:24:50Z")

</div>

folks, is anyone aware of a rating plugin (such as acts\_as\_rateable, acts\_as\_rated) that has native support for more than just an integer rating, but also a textfield or so!? cheers

---

## [Regex functionality on String](https://www.ruby-forum.com/t/regex-functionality-on-string/137005)

<div class="topic-metadata">

**Author:** [@brijesh](https://www.ruby-forum.com/u/brijesh)\
**Replies:** 0\
**Last updated:** [May 8, 2008, 7:05am UTC](https://www.ruby-forum.com/t/regex-functionality-on-string/137005 "2008-05-08T07:05:19Z")

</div>

This is my partially string \*\*\* HOLE CARDS \*\*\* gogo1978: calls $0.15 istackdoe: checks \*\*\* FLOP \*\*\* \[5d Qd 2c\] istackdoe: checks gogo1978: checks \*\*\* TURN \*\*\* \[5d Qd 2c\] \[Ah\] istackdoe: checks gogo1978: checks …

---

## [How to test exception?](https://www.ruby-forum.com/t/how-to-test-exception/136877)

<div class="topic-metadata">

**Author:** [@ChandleWEi](https://www.ruby-forum.com/u/ChandleWEi)\
**Replies:** 2\
**Last updated:** [May 8, 2008, 6:52am UTC](https://www.ruby-forum.com/t/how-to-test-exception/136877 "2008-05-08T06:52:40Z")

</div>

def rescue\_action\_in\_public(exception) case exception when LoginException headers\[“Status”\] = “401 Unauthorized” goto\_login … so I def login! … raise LoginException end but I don’t know how to test it under fu…

---

## [Validate or empty?](https://www.ruby-forum.com/t/validate-or-empty/106394)

<div class="topic-metadata">

**Author:** [@surfman](https://www.ruby-forum.com/u/surfman)\
**Replies:** 9\
**Last updated:** [May 8, 2008, 5:08am UTC](https://www.ruby-forum.com/t/validate-or-empty/106394 "2008-05-08T05:08:57Z")

</div>

I want to do the following in a form: a field may either empty or something must be following the validation requirement. if a user submit the form with the field empty, that’s fine. but if the user submits something…

---

## [Webservice error: SOAP::HTTPStreamError](https://www.ruby-forum.com/t/webservice-error-soap-httpstreamerror/136912)

<div class="topic-metadata">

**Author:** [@huynd](https://www.ruby-forum.com/u/huynd)\
**Replies:** 1\
**Last updated:** [May 8, 2008, 5:08am UTC](https://www.ruby-forum.com/t/webservice-error-soap-httpstreamerror/136912 "2008-05-08T05:08:16Z")

</div>

hi all, i have learned the ROR for one month. i have a small web service program. my program have some file divide into some folder: in the apis folder: user\_api.rb feedback\_api.rb in the model folders: user.rb fe…

---

## [Rails + Postgres + Solaris =?](https://www.ruby-forum.com/t/rails-postgres-solaris/137003)

<div class="topic-metadata">

**Author:** [@hunter\_h](https://www.ruby-forum.com/u/hunter_h)\
**Replies:** 0\
**Last updated:** [May 8, 2008, 4:37am UTC](https://www.ruby-forum.com/t/rails-postgres-solaris/137003 "2008-05-08T04:37:41Z")

</div>

Hello All, I’m trying to move an application from Linux to OpenSolaris (Joyent). Our Rails 2.0.2 app uses PostgreSQL 8 for its main database. It seems there’s a known bug w/ Postgres and Solaris that requires the con…

---

## [ActiveRecord::Base.new](https://www.ruby-forum.com/t/activerecord-base-new/136891)

<div class="topic-metadata">

**Author:** [@pepe](https://www.ruby-forum.com/u/pepe)\
**Replies:** 8\
**Last updated:** [May 8, 2008, 3:25am UTC](https://www.ruby-forum.com/t/activerecord-base-new/136891 "2008-05-08T03:25:52Z")

</div>

I am new to RoR (new to both Ruby and Rails) and am creating a test ‘wizard’ that allows to enter information for an employee through several pages. Only when reaching the last one and passing all validations through …

---

## [RubyPlus screencasts question](https://www.ruby-forum.com/t/rubyplus-screencasts-question/136997)

<div class="topic-metadata">

**Author:** [@boothy](https://www.ruby-forum.com/u/boothy)\
**Replies:** 0\
**Last updated:** [May 8, 2008, 1:32am UTC](https://www.ruby-forum.com/t/rubyplus-screencasts-question/136997 "2008-05-08T01:32:11Z")

</div>

Hi I cannot play episodes 1-20 and 24 I can play all others. Does anyone else have this problem? http://www.rubyplus.org/episodes/archive I think you have to login to download them (they are zip files) I have the …

---

## [Multiple controllers / actions in one view / layout](https://www.ruby-forum.com/t/multiple-controllers-actions-in-one-view-layout/136962)

<div class="topic-metadata">

**Author:** [@railsstarter](https://www.ruby-forum.com/u/railsstarter)\
**Replies:** 1\
**Last updated:** [May 8, 2008, 1:18am UTC](https://www.ruby-forum.com/t/multiple-controllers-actions-in-one-view-layout/136962 "2008-05-08T01:18:08Z")

</div>

Hi, I like to create a portal like site with alot of different sidebars. A bit like yahoo.com for example. Is it possible to render a view / layout with data from different controllers / actions. A search on the ne…

---

## [Actionwebservice](https://www.ruby-forum.com/t/actionwebservice/136988)

<div class="topic-metadata">

**Author:** [@MingMingTian](https://www.ruby-forum.com/u/MingMingTian)\
**Replies:** 1\
**Last updated:** [May 8, 2008, 1:14am UTC](https://www.ruby-forum.com/t/actionwebservice/136988 "2008-05-08T01:14:38Z")

</div>

I am just learning some about web service. But many guys still use Java (Jws). But I wanna try ROR. There are less information about it. I can’t get install plugin in the ROR 2.0.x. So I followed the standard textbook…

---

## [RESTful Routes and Polymorphic Paths](https://www.ruby-forum.com/t/restful-routes-and-polymorphic-paths/136995)

<div class="topic-metadata">

**Author:** [@tamuski](https://www.ruby-forum.com/u/tamuski)\
**Replies:** 0\
**Last updated:** [May 8, 2008, 1:14am UTC](https://www.ruby-forum.com/t/restful-routes-and-polymorphic-paths/136995 "2008-05-08T01:14:37Z")

</div>

I am a newbie. I will describe what I have observed. Perhaps some kind soul will explain to me what is happening. I need to pass a url parameter with a route. I find that this is easily accomplished with a named ne…

---

## [2.0 Upgrade Woes](https://www.ruby-forum.com/t/2-0-upgrade-woes/136059)

<div class="topic-metadata">

**Author:** [@slappytang](https://www.ruby-forum.com/u/slappytang)\
**Replies:** 9\
**Last updated:** [May 8, 2008, 1:14am UTC](https://www.ruby-forum.com/t/2-0-upgrade-woes/136059 "2008-05-08T01:14:37Z")

</div>

I’ve upgraded to Rails 2.0.2. I installed Gems 1.1.1 then upgraded rails via a gem install. I’ve had problems fixing my existing previous 1.X applications, but I’ll wait on that. For now, for testing, I created a ne…

---

## [Render :update doesn't add proper script tags in 2.0?](https://www.ruby-forum.com/t/render-update-doesnt-add-proper-script-tags-in-2-0/136975)

<div class="topic-metadata">

**Author:** [@princenamor](https://www.ruby-forum.com/u/princenamor)\
**Replies:** 1\
**Last updated:** [May 8, 2008, 1:11am UTC](https://www.ruby-forum.com/t/render-update-doesnt-add-proper-script-tags-in-2-0/136975 "2008-05-08T01:11:41Z")

</div>

Guys, I’m using render :update in a few places in an app we just upgraded from 1.2 to 2.0.2. However, :update seems to be broken in 2.0.2. Consider the following: class TesterController \< ApplicationController def t…

---

## [Mongrel Permissions and Cache](https://www.ruby-forum.com/t/mongrel-permissions-and-cache/136993)

<div class="topic-metadata">

**Author:** [@PeteSalty](https://www.ruby-forum.com/u/PeteSalty)\
**Replies:** 0\
**Last updated:** [May 8, 2008, 12:59am UTC](https://www.ruby-forum.com/t/mongrel-permissions-and-cache/136993 "2008-05-08T00:59:25Z")

</div>

We’ve just started to implement page aching for our app, and it all works fine on our development machines, but when we move to staging there’s a problem, the cached don’t get written into the public directory because…

---

## [Calling a controller method with a rake task - plugin errors](https://www.ruby-forum.com/t/calling-a-controller-method-with-a-rake-task-plugin-errors/136991)

<div class="topic-metadata">

**Author:** [@russellquinn](https://www.ruby-forum.com/u/russellquinn)\
**Replies:** 0\
**Last updated:** [May 8, 2008, 12:10am UTC](https://www.ruby-forum.com/t/calling-a-controller-method-with-a-rake-task-plugin-errors/136991 "2008-05-08T00:10:04Z")

</div>

I have a rake task to call a controller method: require ‘action\_controller’ require ‘action\_controller/integration’ namespace :backup do desc “Starts automated backup procedure for all databases” task “do\_auto” do …

---

## [Remote\_function and :with =\>](https://www.ruby-forum.com/t/remote-function-and-with/136986)

<div class="topic-metadata">

**Author:** [@snantz](https://www.ruby-forum.com/u/snantz)\
**Replies:** 2\
**Last updated:** [May 7, 2008, 11:51pm UTC](https://www.ruby-forum.com/t/remote-function-and-with/136986 "2008-05-07T23:51:12Z")

</div>

I need to have this remote\_function method return more than a single value. Right now I have it being called when an input field blurs but I need it to pass more than the value for that one input field - I need it to …

---

## [JavaScript code call method in controller?](https://www.ruby-forum.com/t/javascript-code-call-method-in-controller/136977)

<div class="topic-metadata">

**Author:** [@snantz](https://www.ruby-forum.com/u/snantz)\
**Replies:** 3\
**Last updated:** [May 7, 2008, 11:49pm UTC](https://www.ruby-forum.com/t/javascript-code-call-method-in-controller/136977 "2008-05-07T23:49:45Z")

</div>

I have this text field that once a certain number of character are entered I would like it to call a method in the controller and save the data. To make a long story short, I do this because I don’t want the user to h…

---

## [ActiveRecord association lazy reload?](https://www.ruby-forum.com/t/activerecord-association-lazy-reload/136984)

<div class="topic-metadata">

**Author:** [@jrochkind](https://www.ruby-forum.com/u/jrochkind)\
**Replies:** 2\
**Last updated:** [May 7, 2008, 11:05pm UTC](https://www.ruby-forum.com/t/activerecord-association-lazy-reload/136984 "2008-05-07T23:05:19Z")

</div>

If I want to reload an AR association, I can call “reload” on it. department.employees.reload or what have you. But what I want to do is uncache it, but not actually take a trip to the db. I want to mark it so NEXT ti…

---

## [.save and .destroy Accessing Different Tables?](https://www.ruby-forum.com/t/save-and-destroy-accessing-different-tables/136979)

<div class="topic-metadata">

**Author:** [@lottario](https://www.ruby-forum.com/u/lottario)\
**Replies:** 2\
**Last updated:** [May 7, 2008, 10:46pm UTC](https://www.ruby-forum.com/t/save-and-destroy-accessing-different-tables/136979 "2008-05-07T22:46:38Z")

</div>

I’m new to Ruby and to Rails, so this whole problem is probably just bad coding on my part, but on the same object, .save and .destroy are accessing separate database tables, one which exists (which I want them to acc…

---

## [Flashing notice from a model throws](https://www.ruby-forum.com/t/flashing-notice-from-a-model-throws/136981)

<div class="topic-metadata">

**Author:** [@wickNbomb](https://www.ruby-forum.com/u/wickNbomb)\
**Replies:** 0\
**Last updated:** [May 7, 2008, 10:16pm UTC](https://www.ruby-forum.com/t/flashing-notice-from-a-model-throws/136981 "2008-05-07T22:16:38Z")

</div>

I have a view (list\_users) that calls destroy\_user and I’d like to get it to flash an error within the view. The code below works for the raise, but if I comment it out and try the 2 lines below it, I get the followin…

---

## [Custom libraries](https://www.ruby-forum.com/t/custom-libraries/136978)

<div class="topic-metadata">

**Author:** [@dannyheathcote](https://www.ruby-forum.com/u/dannyheathcote)\
**Replies:** 0\
**Last updated:** [May 7, 2008, 10:03pm UTC](https://www.ruby-forum.com/t/custom-libraries/136978 "2008-05-07T22:03:02Z")

</div>

Hi, Im working on a webshop system. Now I want to make modules for each payment method. These libraries must containt validation methods etc. The modules are loaded dynamicly by a dirlisting in e.g. modules/payment/…

---

## [Running Mongrel on startup](https://www.ruby-forum.com/t/running-mongrel-on-startup/136948)

<div class="topic-metadata">

**Author:** [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Replies:** 4\
**Last updated:** [May 7, 2008, 9:41pm UTC](https://www.ruby-forum.com/t/running-mongrel-on-startup/136948 "2008-05-07T21:41:50Z")

</div>

Hi I have a mongrel server running, but it stops whenever i reboot my machine Is there a way of starting the mongrel server on bootup? Thanks

---

## [Reducing Number Of Queries Required For Blog Archives Page](https://www.ruby-forum.com/t/reducing-number-of-queries-required-for-blog-archives-page/136902)

<div class="topic-metadata">

**Author:** [@johnt519](https://www.ruby-forum.com/u/johnt519)\
**Replies:** 2\
**Last updated:** [May 7, 2008, 9:10pm UTC](https://www.ruby-forum.com/t/reducing-number-of-queries-required-for-blog-archives-page/136902 "2008-05-07T21:10:19Z")

</div>

Hi, I’m writing the canonical blogging application and have come to the archives page. I need to display a matrix of years and months in such a way that only the months that contains posts are hyperlinked. The page w…

---

## [Can't Get a Combined Create Account and Login Working](https://www.ruby-forum.com/t/cant-get-a-combined-create-account-and-login-working/136972)

<div class="topic-metadata">

**Author:** [@rornoob](https://www.ruby-forum.com/u/rornoob)\
**Replies:** 0\
**Last updated:** [May 7, 2008, 9:04pm UTC](https://www.ruby-forum.com/t/cant-get-a-combined-create-account-and-login-working/136972 "2008-05-07T21:04:32Z")

</div>

Hi - I’m having problems getting a my dual purpose create account and login page working. If I try to login, the index method runs and throws errors based on some checks I’m running from my user model. I’m pretty sur…

---

## [Rcov segmentation faults on Debian and Ubuntu (not on OS X)](https://www.ruby-forum.com/t/rcov-segmentation-faults-on-debian-and-ubuntu-not-on-os-x/136969)

<div class="topic-metadata">

**Author:** [@stephen](https://www.ruby-forum.com/u/stephen)\
**Replies:** 0\
**Last updated:** [May 7, 2008, 8:39pm UTC](https://www.ruby-forum.com/t/rcov-segmentation-faults-on-debian-and-ubuntu-not-on-os-x/136969 "2008-05-07T20:39:30Z")

</div>

This has been driving me nuts and I’ve spent too much time on it. I’m running rcov under cruisecontrol.rb on OS X just fine. Both my slices at slicehost fail to do so and report seemingly random segmentation faults an…

---

## [Very easy "sort key" question (but I can't figure it out)](https://www.ruby-forum.com/t/very-easy-sort-key-question-but-i-cant-figure-it-out/136916)

<div class="topic-metadata">

**Author:** [@pierrederome](https://www.ruby-forum.com/u/pierrederome)\
**Replies:** 6\
**Last updated:** [May 7, 2008, 8:31pm UTC](https://www.ruby-forum.com/t/very-easy-sort-key-question-but-i-cant-figure-it-out/136916 "2008-05-07T20:31:31Z")

</div>

hello, I have an array, for instance: a = \[ 10, 2, 20, 14, 33\] I want to get: order= \[5, 3, 4, 1, 2\] I’m sure this can be done in one neat line… I only achieve ugly twisted code to do it… please enlighten me, many…

---

## [Question on authenticity tokens](https://www.ruby-forum.com/t/question-on-authenticity-tokens/136965)

<div class="topic-metadata">

**Author:** [@chrisolsen](https://www.ruby-forum.com/u/chrisolsen)\
**Replies:** 2\
**Last updated:** [May 7, 2008, 8:19pm UTC](https://www.ruby-forum.com/t/question-on-authenticity-tokens/136965 "2008-05-07T20:19:38Z")

</div>

Does anyone find them useful? I can see them being good in some cases, but I have many exceptions that occur because of expired sessions. I am also not sure if they are really required for pages that require a login …

---

## [How to transform a pdf document into an image..?](https://www.ruby-forum.com/t/how-to-transform-a-pdf-document-into-an-image/196671)

<div class="topic-metadata">

**Author:** [@Erwin](https://www.ruby-forum.com/u/Erwin)\
**Replies:** 2\
**Last updated:** [May 7, 2008, 8:12pm UTC](https://www.ruby-forum.com/t/how-to-transform-a-pdf-document-into-an-image/196671 "2008-05-07T20:12:39Z")

</div>

I would like to display in my app the image of the cover page af an pdf document produced internnally within my app ( wich plugin should be better … ? pdfwrite ?.. generally it will be a less than 2 pages document) o…

---

## [Some question about before filter in rails 2.02](https://www.ruby-forum.com/t/some-question-about-before-filter-in-rails-2-02/136970)

<div class="topic-metadata">

**Author:** [@2tcreative](https://www.ruby-forum.com/u/2tcreative)\
**Replies:** 0\
**Last updated:** [May 7, 2008, 7:53pm UTC](https://www.ruby-forum.com/t/some-question-about-before-filter-in-rails-2-02/136970 "2008-05-07T19:53:47Z")

</div>

Hi guys, Following is a simple before filter under rails 2.02 users\_controller.rb class UsersController \< ApplicationController skip\_before\_filter :authorize, :only =\> \[:login\] CRUD actions def login if request.po…

---

## [Plain english to conditions in ror?](https://www.ruby-forum.com/t/plain-english-to-conditions-in-ror/196672)

<div class="topic-metadata">

**Author:** [@varunkumargoel](https://www.ruby-forum.com/u/varunkumargoel)\
**Replies:** 2\
**Last updated:** [May 7, 2008, 7:06pm UTC](https://www.ruby-forum.com/t/plain-english-to-conditions-in-ror/196672 "2008-05-07T19:06:37Z")

</div>

Hi All, I wanna to do something like as: Use will type plain English in text box like designation equals PM or designation = PM. 2.Then i have to save this rule in DB and i have to made some function to verify thi…

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

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