# Rails

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

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

---

## [Regexp not matched](https://www.ruby-forum.com/t/regexp-not-matched/107978)

<div class="topic-metadata">

**Author:** [@th8254](https://www.ruby-forum.com/u/th8254)\
**Replies:** 5\
**Last updated:** [July 2, 2007, 2:33am UTC](https://www.ruby-forum.com/t/regexp-not-matched/107978 "2007-07-02T02:33:34Z")

</div>

Sorry, meant to post this in the rails forum. Anyways, how would I write a rescue method to recover from a failed regexp parsing with error “regexp not matched” -Thanks

---

## [\[ANN\] link\_to\_magic](https://www.ruby-forum.com/t/ann-link-to-magic/108303)

<div class="topic-metadata">

**Author:** [@pratik](https://www.ruby-forum.com/u/pratik)\
**Replies:** 0\
**Last updated:** [July 2, 2007, 2:30am UTC](https://www.ruby-forum.com/t/ann-link-to-magic/108303 "2007-07-02T02:30:34Z")

</div>

Hi All, I’ve just released a plugin that adds extra functionality to link\_to helper to be used to polymorphic routes. You can find more details at http://m.onkey.org/2007/7/2/ann-link\_to\_magic Thanks, Pratik – htt…

---

## [Foreign Keys and Entering Data](https://www.ruby-forum.com/t/foreign-keys-and-entering-data/106545)

<div class="topic-metadata">

**Author:** [@oozy](https://www.ruby-forum.com/u/oozy)\
**Replies:** 2\
**Last updated:** [July 2, 2007, 2:21am UTC](https://www.ruby-forum.com/t/foreign-keys-and-entering-data/106545 "2007-07-02T02:21:34Z")

</div>

Hi, I’m new to Rails and Database Programming in general. I’m trying to create a site where there is a list of books and the authors. Right now I’ve got a two tables in my database. One contains information about …

---

## [Problem connecting PostgreSQL 8.2 to Rails 1.2](https://www.ruby-forum.com/t/problem-connecting-postgresql-8-2-to-rails-1-2/108302)

<div class="topic-metadata">

**Author:** [@bornboulder](https://www.ruby-forum.com/u/bornboulder)\
**Replies:** 1\
**Last updated:** [July 2, 2007, 1:36am UTC](https://www.ruby-forum.com/t/problem-connecting-postgresql-8-2-to-rails-1-2/108302 "2007-07-02T01:36:05Z")

</div>

Hello people, I just installed PostgreSQL on my Mac. I used the package available here: http://www.entropy.ch/software/macosx/postgresql/ Here is a screendump of initdb… $ $ $ $ $ /usr/local/bin/initdb -E UTF8 -…

---

## [Functional testing with logging in](https://www.ruby-forum.com/t/functional-testing-with-logging-in/108253)

<div class="topic-metadata">

**Author:** [@surge](https://www.ruby-forum.com/u/surge)\
**Replies:** 8\
**Last updated:** [July 2, 2007, 1:13am UTC](https://www.ruby-forum.com/t/functional-testing-with-logging-in/108253 "2007-07-02T01:13:29Z")

</div>

Hello, One of the actions in one of my controllers requires a login and I’m trying to write a test for that action. I don’t want to actually go through the login process. I just want to initialize a session variable …

---

## [What's a healthy code:test ratio?](https://www.ruby-forum.com/t/whats-a-healthy-code-test-ratio/108020)

<div class="topic-metadata">

**Author:** [@elliterate](https://www.ruby-forum.com/u/elliterate)\
**Replies:** 2\
**Last updated:** [July 2, 2007, 12:48am UTC](https://www.ruby-forum.com/t/whats-a-healthy-code-test-ratio/108020 "2007-07-02T00:48:27Z")

</div>

Hey, I’m just wondering what people consider to be a healthy code:test ratio (as shown in rake stats). Our new code base is currently 1:2, obviously not that great, what ratios do you lot have? I’m thinking 1:4 wo…

---

## [How to return to last viewed page?](https://www.ruby-forum.com/t/how-to-return-to-last-viewed-page/108263)

<div class="topic-metadata">

**Author:** [@lunaclaire](https://www.ruby-forum.com/u/lunaclaire)\
**Replies:** 4\
**Last updated:** [July 2, 2007, 12:15am UTC](https://www.ruby-forum.com/t/how-to-return-to-last-viewed-page/108263 "2007-07-02T00:15:25Z")

</div>

I have a Contact Us link in the footer of most of my pages. Clicking this takes the user to a new page containing a form for sending us a msg of some sort. The form has Submit and Cancel buttons. After the user click…

---

## [Auto\_complete\_field = stack overflow under IE & no effects u](https://www.ruby-forum.com/t/auto-complete-field-stack-overflow-under-ie-no-effects-u/108298)

<div class="topic-metadata">

**Author:** [@Digimage](https://www.ruby-forum.com/u/Digimage)\
**Replies:** 0\
**Last updated:** [July 1, 2007, 11:57pm UTC](https://www.ruby-forum.com/t/auto-complete-field-stack-overflow-under-ie-no-effects-u/108298 "2007-07-01T23:57:22Z")

</div>

Any help is appreciated… Thanks

---

## [Problem with \<hr\> placement in scaffold code](https://www.ruby-forum.com/t/problem-with-hr-placement-in-scaffold-code/108284)

<div class="topic-metadata">

**Author:** [@jseidel](https://www.ruby-forum.com/u/jseidel)\
**Replies:** 6\
**Last updated:** [July 1, 2007, 11:42pm UTC](https://www.ruby-forum.com/t/problem-with-hr-placement-in-scaffold-code/108284 "2007-07-01T23:42:21Z")

</div>

I’m customizing my scaffold on a simple app by adding a little formatting. However, the that I put inside the table row that displays the row gets moved outside the table and I can’t figure out why. Here’s the scaff…

---

## [Seven Qualities of a Good Leader](https://www.ruby-forum.com/t/seven-qualities-of-a-good-leader/108297)

<div class="topic-metadata">

**Author:** [@Moona\_Naeem](https://www.ruby-forum.com/u/Moona_Naeem)\
**Replies:** 0\
**Last updated:** [July 1, 2007, 11:34pm UTC](https://www.ruby-forum.com/t/seven-qualities-of-a-good-leader/108297 "2007-07-01T23:34:20Z")

</div>

Seven Qualities of a Good Leader How often have you heard the comment, “He or she is a born leader?” There are certain characteristics found in some people that seem to naturally put them in a position where they’re l…

---

## [Image not found -- rake db:migrate](https://www.ruby-forum.com/t/image-not-found-rake-db-migrate/108296)

<div class="topic-metadata">

**Author:** [@the\_dude](https://www.ruby-forum.com/u/the_dude)\
**Replies:** 0\
**Last updated:** [July 1, 2007, 11:24pm UTC](https://www.ruby-forum.com/t/image-not-found-rake-db-migrate/108296 "2007-07-01T23:24:19Z")

</div>

Hi. I’m learning from the book ‘beginning ruby on rails e-commerce’, and i just got to the point of running my first migration. When I run rake db:migrate (as it says in the book), I see this: (in /Users/me/dev/myap…

---

## [Attachment\_fu: Having problems with database\_backend](https://www.ruby-forum.com/t/attachment-fu-having-problems-with-database-backend/108234)

<div class="topic-metadata">

**Author:** [@bodikp](https://www.ruby-forum.com/u/bodikp)\
**Replies:** 4\
**Last updated:** [July 1, 2007, 9:10pm UTC](https://www.ruby-forum.com/t/attachment-fu-having-problems-with-database-backend/108234 "2007-07-01T21:10:06Z")

</div>

First, Rick O. - excellent plugin! Second, Mike C. - excellent tutorial on file\_system backend! Third, Ron Evans, excellent tutorial on database backend (http:// deadprogrammersociety.blogspot.com/2007/04/getting-your…

---

## [Auto\_complete\_field](https://www.ruby-forum.com/t/auto-complete-field/108244)

<div class="topic-metadata">

**Author:** [@Digimage](https://www.ruby-forum.com/u/Digimage)\
**Replies:** 2\
**Last updated:** [July 1, 2007, 8:43pm UTC](https://www.ruby-forum.com/t/auto-complete-field/108244 "2007-07-01T20:43:03Z")

</div>

Is there an auto\_complete\_field expert in this furm who’s willing to help out newbies? Thanks

---

## [\[ANN\] MasterView 0.3.3 Rails-optimized (x)html template engi](https://www.ruby-forum.com/t/ann-masterview-0-3-3-rails-optimized-x-html-template-engi/108291)

<div class="topic-metadata">

**Author:** [@jbell38](https://www.ruby-forum.com/u/jbell38)\
**Replies:** 0\
**Last updated:** [July 1, 2007, 7:58pm UTC](https://www.ruby-forum.com/t/ann-masterview-0-3-3-rails-optimized-x-html-template-engi/108291 "2007-07-01T19:58:58Z")

</div>

= MasterView - Rails-optimized (x)html friendly template engine MasterView is a template engine plugin that provides another option to the existing rails view templates (rhtml and rxml). This template engine has all t…

---

## [File path inconsistency?](https://www.ruby-forum.com/t/file-path-inconsistency/108276)

<div class="topic-metadata">

**Author:** [@Mister\_Yu](https://www.ruby-forum.com/u/Mister_Yu)\
**Replies:** 2\
**Last updated:** [July 1, 2007, 7:49pm UTC](https://www.ruby-forum.com/t/file-path-inconsistency/108276 "2007-07-01T19:49:57Z")

</div>

Hi all, i am a beginner of ROR. please excuse me if i ask newbie questions. i use Netbeans 6 as my IDE. i keep some of my image files under public/ images/ my question is: in the controller the images files’ path is…

---

## [ActiveRecord: why does 'self.name' and 'name' both work?](https://www.ruby-forum.com/t/activerecord-why-does-self-name-and-name-both-work/108283)

<div class="topic-metadata">

**Author:** [@rob](https://www.ruby-forum.com/u/rob)\
**Replies:** 1\
**Last updated:** [July 1, 2007, 6:24pm UTC](https://www.ruby-forum.com/t/activerecord-why-does-self-name-and-name-both-work/108283 "2007-07-01T18:24:45Z")

</div>

I’m trying to figure out why both ‘self.name’ and ‘name’ work in a model class. For example: class Category \< ActiveRecord::Base before\_save :set\_permalink private def set\_permalink # both work self.permalink = na…

---

## [Posting XML from Flash to Rials Controller](https://www.ruby-forum.com/t/posting-xml-from-flash-to-rials-controller/108282)

<div class="topic-metadata">

**Author:** [@divotdave](https://www.ruby-forum.com/u/divotdave)\
**Replies:** 0\
**Last updated:** [July 1, 2007, 5:42pm UTC](https://www.ruby-forum.com/t/posting-xml-from-flash-to-rials-controller/108282 "2007-07-01T17:42:45Z")

</div>

Hello, I am posting XML Data from flash XML.sendAndLoad fruntion to a rails controller …which works…in the mongrel log I see the data in the parameters. Parameters: {"\<?xml version"=\>"'1.0' encoding='UTF-8'?\>\<product …

---

## [Rake: uninitialized const ActionController::TestUploadedFile](https://www.ruby-forum.com/t/rake-uninitialized-const-actioncontroller-testuploadedfile/108280)

<div class="topic-metadata">

**Author:** [@ldk2005](https://www.ruby-forum.com/u/ldk2005)\
**Replies:** 0\
**Last updated:** [July 1, 2007, 5:11pm UTC](https://www.ruby-forum.com/t/rake-uninitialized-const-actioncontroller-testuploadedfile/108280 "2007-07-01T17:11:57Z")

</div>

Hi, My app uses attachment\_fu and I’d like to pre-load some data via a rake task. Thus: \[code\]desc “Upload template files” task :upload\_files\_test =\> :environment do |t| conf = Conference.find(1) \[{:f =\> ‘styles.c…

---

## [Is there a Unix text-based browser I can use on my hosting p](https://www.ruby-forum.com/t/is-there-a-unix-text-based-browser-i-can-use-on-my-hosting-p/108266)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 4\
**Last updated:** [July 1, 2007, 2:45pm UTC](https://www.ruby-forum.com/t/is-there-a-unix-text-based-browser-i-can-use-on-my-hosting-p/108266 "2007-07-01T14:45:20Z")

</div>

Hi, Is there a Unix text-based browser I can use on my hosting providers box? That is from my production site (Dreamhost) I could emulate a browser call to my application in text form? The main reason is I want to …

---

## [How to conditionally replace an element using RJS template](https://www.ruby-forum.com/t/how-to-conditionally-replace-an-element-using-rjs-template/108265)

<div class="topic-metadata">

**Author:** [@mikel](https://www.ruby-forum.com/u/mikel)\
**Replies:** 3\
**Last updated:** [July 1, 2007, 1:31pm UTC](https://www.ruby-forum.com/t/how-to-conditionally-replace-an-element-using-rjs-template/108265 "2007-07-01T13:31:14Z")

</div>

I have an RJS template that looks like this: page.replace “id\_#{@foo.id}”, :partial =\> “row” But I only want it to execute if “id\_#{@foo.id}” is an element on the current page? something like: if page.exists?(“id\_#{@…

---

## [Variable/reference question](https://www.ruby-forum.com/t/variable-reference-question/108267)

<div class="topic-metadata">

**Author:** [@mischa78](https://www.ruby-forum.com/u/mischa78)\
**Replies:** 1\
**Last updated:** [July 1, 2007, 1:14pm UTC](https://www.ruby-forum.com/t/variable-reference-question/108267 "2007-07-01T13:14:12Z")

</div>

Hi! I feel stupid for having to ask this, but I have never run into this before… I have this code that should send an email when someone upgrades their account. I am using this code: new\_plan = Plan.find(params\[:cus…

---

## [My form\_for example works correctly, but \*WHY\* does it work?](https://www.ruby-forum.com/t/my-form-for-example-works-correctly-but-why-does-it-work/108257)

<div class="topic-metadata">

**Author:** [@rob](https://www.ruby-forum.com/u/rob)\
**Replies:** 1\
**Last updated:** [July 1, 2007, 11:15am UTC](https://www.ruby-forum.com/t/my-form-for-example-works-correctly-but-why-does-it-work/108257 "2007-07-01T11:15:00Z")

</div>

Hello, I am still new to Rails and have been trying to understand forms and form\_for, but it seems there are a number of ways to do / specify things that all work fine. For example, I created this simple example that…

---

## [How to delete periodically\_call\_remote from the DOM](https://www.ruby-forum.com/t/how-to-delete-periodically-call-remote-from-the-dom/107632)

<div class="topic-metadata">

**Author:** [@mikel](https://www.ruby-forum.com/u/mikel)\
**Replies:** 5\
**Last updated:** [July 1, 2007, 9:55am UTC](https://www.ruby-forum.com/t/how-to-delete-periodically-call-remote-from-the-dom/107632 "2007-07-01T09:55:55Z")

</div>

I have set up a periodically call remote on a page. To get it to stop calling I have made it reliant on a hidden element being populated with some value, this is all working. But I want to actually delete the script …

---

## [Just want the id's back from the dynamic find](https://www.ruby-forum.com/t/just-want-the-ids-back-from-the-dynamic-find/108145)

<div class="topic-metadata">

**Author:** [@bowenmark](https://www.ruby-forum.com/u/bowenmark)\
**Replies:** 6\
**Last updated:** [July 1, 2007, 4:18am UTC](https://www.ruby-forum.com/t/just-want-the-ids-back-from-the-dynamic-find/108145 "2007-07-01T04:18:37Z")

</div>

Hey folks, in the rdoc for the ActiveRecord Base class they indicate how to retrieve records dynamically using find\_by\_XYZ, however, what if you don’t want the whole record back? Do all the find methods return arra…

---

## [Stress testing software](https://www.ruby-forum.com/t/stress-testing-software/107997)

<div class="topic-metadata">

**Author:** [@ktheory](https://www.ruby-forum.com/u/ktheory)\
**Replies:** 5\
**Last updated:** [July 1, 2007, 3:17am UTC](https://www.ruby-forum.com/t/stress-testing-software/107997 "2007-07-01T03:17:32Z")

</div>

anyone know of a pretty basic simple to use stress testing software? I’m not using it specifically for rails stress testing. So something that can be configured to do any http requests?? thanks -Aaron

---

## [Really simple routing question](https://www.ruby-forum.com/t/really-simple-routing-question/108215)

<div class="topic-metadata">

**Author:** [@surge](https://www.ruby-forum.com/u/surge)\
**Replies:** 4\
**Last updated:** [July 1, 2007, 2:19am UTC](https://www.ruby-forum.com/t/really-simple-routing-question/108215 "2007-07-01T02:19:29Z")

</div>

I’m just now trying to figure out how rails routing works and to be honest, I find it really confusing. Anyway, I just want to create two “named” routes to save me some typing. The routes are: map.home ‘’, :controlle…

---

## [ActionController filter chain question](https://www.ruby-forum.com/t/actioncontroller-filter-chain-question/108249)

<div class="topic-metadata">

**Author:** [@ktheory](https://www.ruby-forum.com/u/ktheory)\
**Replies:** 1\
**Last updated:** [July 1, 2007, 1:59am UTC](https://www.ruby-forum.com/t/actioncontroller-filter-chain-question/108249 "2007-07-01T01:59:39Z")

</div>

Hey all, wondering about ActionController filter chains. EX: require ‘rubygems’ require ‘action\_controller’ class Tray \< ActionController::Base before\_filter :aud def aud puts “AUD” end def run puts “RUN” end …

---

## [Map.resource and semi nested resources](https://www.ruby-forum.com/t/map-resource-and-semi-nested-resources/108211)

<div class="topic-metadata">

**Author:** [@Dave\_Warnock](https://www.ruby-forum.com/u/Dave_Warnock)\
**Replies:** 3\
**Last updated:** [July 1, 2007, 12:20am UTC](https://www.ruby-forum.com/t/map-resource-and-semi-nested-resources/108211 "2007-07-01T00:20:21Z")

</div>

Hi, I have the following in routes.rb map.resources :districts do |district| district.resources :circuits, :name\_prefix =\> ‘district\_’ end map.resources :circuits I want full CRUD for circuits at /circuits but only…

---

## [ActionMailer encoding](https://www.ruby-forum.com/t/actionmailer-encoding/108247)

<div class="topic-metadata">

**Author:** [@Spacen\_Jasset](https://www.ruby-forum.com/u/Spacen_Jasset)\
**Replies:** 0\
**Last updated:** [July 1, 2007, 12:11am UTC](https://www.ruby-forum.com/t/actionmailer-encoding/108247 "2007-07-01T00:11:21Z")

</div>

Hi, I am using ActionMailer to recieve emails as per the usual method. I use postfix. My Database is setup for utf8 encoding. I get a database error when I try to store email.body into a record in the database. This …

---

## [Ruby on Rails Developers Needed to Join Global Team](https://www.ruby-forum.com/t/ruby-on-rails-developers-needed-to-join-global-team/108246)

<div class="topic-metadata">

**Author:** [@julian](https://www.ruby-forum.com/u/julian)\
**Replies:** 0\
**Last updated:** [July 1, 2007, 12:06am UTC](https://www.ruby-forum.com/t/ruby-on-rails-developers-needed-to-join-global-team/108246 "2007-07-01T00:06:21Z")

</div>

auctionPAL Inc (http://www.auctionpal.com) is seeking to hire 1 or 2 experienced Ruby on Rails developers to join an existing global team of engineers. We have a mixed technology platform using Ruby as a front-end and…

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

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