# Rails

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

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

---

## [Capistrano 2 and deprec](https://www.ruby-forum.com/t/capistrano-2-and-deprec/111978)

<div class="topic-metadata">

**Author:** [@softf5ajivanet](https://www.ruby-forum.com/u/softf5ajivanet)\
**Replies:** 1\
**Last updated:** [August 14, 2007, 12:30am UTC](https://www.ruby-forum.com/t/capistrano-2-and-deprec/111978 "2007-08-14T00:30:27Z")

</div>

am i wrong or does deprec not work with capistrano 2 yet? running deprec 1.9 but can’t get capistrano 2 to play fair or even get cap -t to work?

---

## [HABTM: at least one coupled user](https://www.ruby-forum.com/t/habtm-at-least-one-coupled-user/111977)

<div class="topic-metadata">

**Author:** [@leonb](https://www.ruby-forum.com/u/leonb)\
**Replies:** 0\
**Last updated:** [August 14, 2007, 12:12am UTC](https://www.ruby-forum.com/t/habtm-at-least-one-coupled-user/111977 "2007-08-14T00:12:35Z")

</div>

Hi all! I have this “thing”. Let’s say it is a car. And a car belongs to one or more users. So there has to be at least one! How can I add this validation to Rails? I tried to create some extra validation. But that s…

---

## [Setting Primary Key (\`id\` field) with fixtures](https://www.ruby-forum.com/t/setting-primary-key-id-field-with-fixtures/111967)

<div class="topic-metadata">

**Author:** [@Ivan\_Von\_Girderboot](https://www.ruby-forum.com/u/Ivan_Von_Girderboot)\
**Replies:** 2\
**Last updated:** [August 13, 2007, 11:56pm UTC](https://www.ruby-forum.com/t/setting-primary-key-id-field-with-fixtures/111967 "2007-08-13T23:56:25Z")

</div>

Is there any way to explicitly set the id of an fixture entry? i tried adding id: 1 to the attributes list in the .yml file, but it seems to get ignored. example .yml file: default\_user: id: 1 name: Default Use…

---

## [Where does all the memory go?](https://www.ruby-forum.com/t/where-does-all-the-memory-go/111928)

<div class="topic-metadata">

**Author:** [@kevin\_evans](https://www.ruby-forum.com/u/kevin_evans)\
**Replies:** 5\
**Last updated:** [August 13, 2007, 11:54pm UTC](https://www.ruby-forum.com/t/where-does-all-the-memory-go/111928 "2007-08-13T23:54:08Z")

</div>

I’ve a method within an Event model… def batch\_import(folder) require ‘find’ Find::find("#{SOURCE\_PATH}/#{folder}") do |path| if path\[-3..-1\].downcase == 'jpg' @photo = Picture.new() @photo.dat…

---

## [Moving a record](https://www.ruby-forum.com/t/moving-a-record/111951)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [August 13, 2007, 11:27pm UTC](https://www.ruby-forum.com/t/moving-a-record/111951 "2007-08-13T23:27:02Z")

</div>

Hi! I’d like to move a record from one table to another. I’ve been reading the documentation, and I think I can accomplish this by finding the record, creating a new record with those attributes, and then removing t…

---

## [Rails exception catching](https://www.ruby-forum.com/t/rails-exception-catching/111823)

<div class="topic-metadata">

**Author:** [@miked](https://www.ruby-forum.com/u/miked)\
**Replies:** 4\
**Last updated:** [August 13, 2007, 11:20pm UTC](https://www.ruby-forum.com/t/rails-exception-catching/111823 "2007-08-13T23:20:24Z")

</div>

Hello I’m writting my first rails application and I would like to catch when an id cant be found. For instance have create records 1 2 and 3 I would like to: records=Record.find(4) and not get the error page rather…

---

## [\[ANN\] Mysql Replication Adapter](https://www.ruby-forum.com/t/ann-mysql-replication-adapter/111970)

<div class="topic-metadata">

**Author:** [@bdeverea](https://www.ruby-forum.com/u/bdeverea)\
**Replies:** 0\
**Last updated:** [August 13, 2007, 11:04pm UTC](https://www.ruby-forum.com/t/ann-mysql-replication-adapter/111970 "2007-08-13T23:04:14Z")

</div>

I thought some of you might be interested in a new gemified Rails database adapter I put together to make it easier to use a single write master and multiple read-only slave Mysql databases. I’ve called it (cleverly) …

---

## [Question about :include\_blank =\> true](https://www.ruby-forum.com/t/question-about-include-blank-true/111964)

<div class="topic-metadata">

**Author:** [@dparkmit](https://www.ruby-forum.com/u/dparkmit)\
**Replies:** 3\
**Last updated:** [August 13, 2007, 10:58pm UTC](https://www.ruby-forum.com/t/question-about-include-blank-true/111964 "2007-08-13T22:58:09Z")

</div>

Hi All, When you include the option “:include\_blank =\> true”, then the select function includes a blank option. How do you specify text for that option? Many thanks from this newbie for your help! For instance, rat…

---

## [Authorized.net-Bad file descriptor - connect(2)](https://www.ruby-forum.com/t/authorized-net-bad-file-descriptor-connect-2/111965)

<div class="topic-metadata">

**Author:** [@ksantoshp](https://www.ruby-forum.com/u/ksantoshp)\
**Replies:** 0\
**Last updated:** [August 13, 2007, 10:42pm UTC](https://www.ruby-forum.com/t/authorized-net-bad-file-descriptor-connect-2/111965 "2007-08-13T22:42:53Z")

</div>

Hello, I have developed a e-commerce application for magazine purchase/ subscription, (development environment) Payment Gateway- Authorized.net I am using the “payment” gem for processing payments. I have no issues …

---

## [Great new Website](https://www.ruby-forum.com/t/great-new-website/196429)

<div class="topic-metadata">

**Author:** [@pupsi](https://www.ruby-forum.com/u/pupsi)\
**Replies:** 0\
**Last updated:** [August 13, 2007, 10:26pm UTC](https://www.ruby-forum.com/t/great-new-website/196429 "2007-08-13T22:26:04Z")

</div>

http://www.pennergame.de/ref.php?uid=4762

---

## [Self. vs. @](https://www.ruby-forum.com/t/self-vs/111950)

<div class="topic-metadata">

**Author:** [@jkahn](https://www.ruby-forum.com/u/jkahn)\
**Replies:** 7\
**Last updated:** [August 13, 2007, 9:58pm UTC](https://www.ruby-forum.com/t/self-vs/111950 "2007-08-13T21:58:02Z")

</div>

I’m working on an application that creates a confirmation e.mail whenever you create and account or change an e.mail address. I thought I’d just use the same key generation code used for the password hash login examp…

---

## [Help with xml -\> database insertion](https://www.ruby-forum.com/t/help-with-xml-database-insertion/111877)

<div class="topic-metadata">

**Author:** [@charlie\_caroff](https://www.ruby-forum.com/u/charlie_caroff)\
**Replies:** 5\
**Last updated:** [August 13, 2007, 9:46pm UTC](https://www.ruby-forum.com/t/help-with-xml-database-insertion/111877 "2007-08-13T21:46:58Z")

</div>

Hello, I’m grabbing a few xml documents, representing 100 - 300 database rows in total, parsing them, and inserting them into my mysql database. I’m using rexml/document, parsing each entire xml document (some are …

---

## [Windows XP tricks and tips](https://www.ruby-forum.com/t/windows-xp-tricks-and-tips/111960)

<div class="topic-metadata">

**Author:** [@John\_Travolta](https://www.ruby-forum.com/u/John_Travolta)\
**Replies:** 0\
**Last updated:** [August 13, 2007, 9:40pm UTC](https://www.ruby-forum.com/t/windows-xp-tricks-and-tips/111960 "2007-08-13T21:40:56Z")

</div>

Windows XP tips and tricks. Learn how to bypass very common windows problems, to speed up your system and make it more reliable with useful tips and tricks.

---

## [Testing file upload to / download from database](https://www.ruby-forum.com/t/testing-file-upload-to-download-from-database/111956)

<div class="topic-metadata">

**Author:** [@wpwood](https://www.ruby-forum.com/u/wpwood)\
**Replies:** 0\
**Last updated:** [August 13, 2007, 8:54pm UTC](https://www.ruby-forum.com/t/testing-file-upload-to-download-from-database/111956 "2007-08-13T20:54:49Z")

</div>

Greetings! I need to test that a file got successfully saved to our database, and then that it got successfully downloaded. I’ve found some snippets on the upload side, but nothing on how to test that a file stored i…

---

## [\[routes\] resources with new actions](https://www.ruby-forum.com/t/routes-resources-with-new-actions/111954)

<div class="topic-metadata">

**Author:** [@bfsog](https://www.ruby-forum.com/u/bfsog)\
**Replies:** 0\
**Last updated:** [August 13, 2007, 8:26pm UTC](https://www.ruby-forum.com/t/routes-resources-with-new-actions/111954 "2007-08-13T20:26:10Z")

</div>

I’m building a ticketing program and I’m trying to get the following routes: tickets/all tickets/sorted tickets/unsorted cat/1/tickets/1 cat/1/tickets/all cat/1/tickets/sorted cat/1/tickets/unsorted currently my…

---

## [\[ANN\] SqueezeBox, a simple file system based routing framewo](https://www.ruby-forum.com/t/ann-squeezebox-a-simple-file-system-based-routing-framewo/111953)

<div class="topic-metadata">

**Author:** [@RyRyRy](https://www.ruby-forum.com/u/RyRyRy)\
**Replies:** 0\
**Last updated:** [August 13, 2007, 8:20pm UTC](https://www.ruby-forum.com/t/ann-squeezebox-a-simple-file-system-based-routing-framewo/111953 "2007-08-13T20:20:45Z")

</div>

SqueezeBox is a simple file system based routing framework for erubis templates. It aims for a couple of niceties as well: Instead of putting your logic inside your template, like you would with PHP, SqueezeBox recog…

---

## [Slovene characters in Views and in MySQL](https://www.ruby-forum.com/t/slovene-characters-in-views-and-in-mysql/111945)

<div class="topic-metadata">

**Author:** [@klemenv](https://www.ruby-forum.com/u/klemenv)\
**Replies:** 1\
**Last updated:** [August 13, 2007, 8:13pm UTC](https://www.ruby-forum.com/t/slovene-characters-in-views-and-in-mysql/111945 "2007-08-13T20:13:04Z")

</div>

Hi, am having troubles with Slovene characters in rails. If I set I am not getting Slovene characters in Views (I mean RHTML). However everithyng is fine with data that comes from data base. if I set : everythi…

---

## [How do I handle a 404 error from the open method in OpenURI](https://www.ruby-forum.com/t/how-do-i-handle-a-404-error-from-the-open-method-in-openuri/111845)

<div class="topic-metadata">

**Author:** [@Koalemos](https://www.ruby-forum.com/u/Koalemos)\
**Replies:** 2\
**Last updated:** [August 13, 2007, 7:57pm UTC](https://www.ruby-forum.com/t/how-do-i-handle-a-404-error-from-the-open-method-in-openuri/111845 "2007-08-13T19:57:43Z")

</div>

I was wondering if someone could quickly help me out with how i would go about handling a 404 error on a page i try and use the open method on.

---

## [Calling custom active resource methods/actions](https://www.ruby-forum.com/t/calling-custom-active-resource-methods-actions/111947)

<div class="topic-metadata">

**Author:** [@misleb](https://www.ruby-forum.com/u/misleb)\
**Replies:** 0\
**Last updated:** [August 13, 2007, 7:46pm UTC](https://www.ruby-forum.com/t/calling-custom-active-resource-methods-actions/111947 "2007-08-13T19:46:50Z")

</div>

Hi, I’m trying to work with active resources in Edge, but I’m having a difficult time trying to figure out the proper way to call custom methods/actions. I have things setup so I can do the standard finds and updates,…

---

## [Find the position/page of an item](https://www.ruby-forum.com/t/find-the-position-page-of-an-item/111944)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 0\
**Last updated:** [August 13, 2007, 7:23pm UTC](https://www.ruby-forum.com/t/find-the-position-page-of-an-item/111944 "2007-08-13T19:23:51Z")

</div>

I have a pagination system that works in a standard sort of way: i get the items (“articles” in this case) on a given page by saying Article.find( :all, :order =\> “points DESC, added\_at DESC”, :limit =\> items\_per\_p…

---

## [Retrieving validation messages without making errors](https://www.ruby-forum.com/t/retrieving-validation-messages-without-making-errors/110069)

<div class="topic-metadata">

**Author:** [@marmolin](https://www.ruby-forum.com/u/marmolin)\
**Replies:** 3\
**Last updated:** [August 13, 2007, 6:51pm UTC](https://www.ruby-forum.com/t/retrieving-validation-messages-without-making-errors/110069 "2007-08-13T18:51:37Z")

</div>

I would like to inform the users about attribute validation conditions for form fields using title as in . The simplest way would be to use the validation error messages already defined in the models, but I cannot fin…

---

## [Time zones - acts\_like? problem](https://www.ruby-forum.com/t/time-zones-acts-like-problem/111938)

<div class="topic-metadata">

**Author:** [@gamafranco](https://www.ruby-forum.com/u/gamafranco)\
**Replies:** 2\
**Last updated:** [August 13, 2007, 6:11pm UTC](https://www.ruby-forum.com/t/time-zones-acts-like-problem/111938 "2007-08-13T18:11:58Z")

</div>

Hi, I have just installed TzInfo and TzTime. One of my models as an attribute named “date”, and I have set: tz\_time\_attributes :date Unfortunately when I display this attribute in a view I get the following error: u…

---

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

<div class="topic-metadata">

**Author:** [@snantz](https://www.ruby-forum.com/u/snantz)\
**Replies:** 1\
**Last updated:** [August 13, 2007, 6:07pm UTC](https://www.ruby-forum.com/t/actionmailer/111935 "2007-08-13T18:07:21Z")

</div>

Be playing with ActionMailer and have yet to get anything to work. when I when my app, however, I get no errors except for this blurb in my development.log file: EnrollController: missing default helper path enroll\_he…

---

## [Image caching from the browser](https://www.ruby-forum.com/t/image-caching-from-the-browser/111939)

<div class="topic-metadata">

**Author:** [@jazzybuddy](https://www.ruby-forum.com/u/jazzybuddy)\
**Replies:** 0\
**Last updated:** [August 13, 2007, 5:40pm UTC](https://www.ruby-forum.com/t/image-caching-from-the-browser/111939 "2007-08-13T17:40:50Z")

</div>

Hello everyone, I am struck with the problem of retrieving an image from database. I am using \<%= form\_tag\_with\_upload\_progress({:action =\> ‘update\_plugin\_content’}, { :begin =\> “new Effect.Appear(‘loading’);”, :fin…

---

## [Link\_to image\_tag puts a box round my image](https://www.ruby-forum.com/t/link-to-image-tag-puts-a-box-round-my-image/111936)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 1\
**Last updated:** [August 13, 2007, 5:14pm UTC](https://www.ruby-forum.com/t/link-to-image-tag-puts-a-box-round-my-image/111936 "2007-08-13T17:14:28Z")

</div>

I’ve got a rather long conditional statement that either displays a link\_to(image\_tag(blah)blah) or just an image\_tag (i’ve edited it a bit to show the structure): \<%= (article.score\_from\_user(:user\_id =\> session\[:use…

---

## [How do i list strings vertically down a website from a datab](https://www.ruby-forum.com/t/how-do-i-list-strings-vertically-down-a-website-from-a-datab/111683)

<div class="topic-metadata">

**Author:** [@lodestone](https://www.ruby-forum.com/u/lodestone)\
**Replies:** 5\
**Last updated:** [August 13, 2007, 5:04pm UTC](https://www.ruby-forum.com/t/how-do-i-list-strings-vertically-down-a-website-from-a-datab/111683 "2007-08-13T17:04:31Z")

</div>

hi, I need to set up a page that lists words vertically, these words will be read from a database. I would also like a text box at the bottom of the list ready to add new words to the database, then have the newly add…

---

## [Search view result and back to search results](https://www.ruby-forum.com/t/search-view-result-and-back-to-search-results/111934)

<div class="topic-metadata">

**Author:** [@johnsonch](https://www.ruby-forum.com/u/johnsonch)\
**Replies:** 0\
**Last updated:** [August 13, 2007, 4:59pm UTC](https://www.ruby-forum.com/t/search-view-result-and-back-to-search-results/111934 "2007-08-13T16:59:23Z")

</div>

I have a site that has a search which I implemented the ez\_where plugin. I am trying to figure out the best way to go from a detailed view back to the search results. I have two possible ways that I can think of doi…

---

## [\[ANN\] PostgreSQL statistics plug-in](https://www.ruby-forum.com/t/ann-postgresql-statistics-plug-in/111932)

<div class="topic-metadata">

**Author:** [@sjmadsen](https://www.ruby-forum.com/u/sjmadsen)\
**Replies:** 0\
**Last updated:** [August 13, 2007, 4:45pm UTC](https://www.ruby-forum.com/t/ann-postgresql-statistics-plug-in/111932 "2007-08-13T16:45:23Z")

</div>

I’ve just released a new plugin for fetching and displaying the statistics generated by PostgreSQL. This is an extraction from ZingLists, my new list organization and sharing site. More information and a sample scree…

---

## [Automatically download file](https://www.ruby-forum.com/t/automatically-download-file/111926)

<div class="topic-metadata">

**Author:** [@Eivind\_LSSSSland-An](https://www.ruby-forum.com/u/Eivind_LSSSSland-An)\
**Replies:** 0\
**Last updated:** [August 13, 2007, 4:28pm UTC](https://www.ruby-forum.com/t/automatically-download-file/111926 "2007-08-13T16:28:19Z")

</div>

Hi, I’m trying to make a rails-application that checks out and downloads a file in a single click. The user should click on a file, and the application should download the file, update the database and display some r…

---

## [Invoice system](https://www.ruby-forum.com/t/invoice-system/111924)

<div class="topic-metadata">

**Author:** [@janc](https://www.ruby-forum.com/u/janc)\
**Replies:** 0\
**Last updated:** [August 13, 2007, 3:49pm UTC](https://www.ruby-forum.com/t/invoice-system/111924 "2007-08-13T15:49:35Z")

</div>

Hi, I wanna make a invoice system. I’ve set up a invoice model and a invoice\_item model (invoice has\_many invoice\_item and invoice\_item belongs\_to invoice). Also invoice belongs\_to a customer, and a customer has\_many…

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

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