# Rails

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

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

---

## [How to test for relationships](https://www.ruby-forum.com/t/how-to-test-for-relationships/108170)

<div class="topic-metadata">

**Author:** [@mark](https://www.ruby-forum.com/u/mark)\
**Replies:** 1\
**Last updated:** [June 29, 2007, 7:56pm UTC](https://www.ruby-forum.com/t/how-to-test-for-relationships/108170 "2007-06-29T19:56:58Z")

</div>

Hi, Is there a way to test the relationships of my models exist wwihtin my new unit tests? e.g. test this is here class Blog \< ActiveRecord::Base belongs\_to :user end and so is this? class User\< ActiveRecord::Bas…

---

## [Contest Idea](https://www.ruby-forum.com/t/contest-idea/108178)

<div class="topic-metadata">

**Author:** [@cpher](https://www.ruby-forum.com/u/cpher)\
**Replies:** 0\
**Last updated:** [June 29, 2007, 7:50pm UTC](https://www.ruby-forum.com/t/contest-idea/108178 "2007-06-29T19:50:57Z")

</div>

Hello, I am fairly new to RoR. I heard about a contest that the community had awhile back where developer teams were given 24 hours to write an web application. I recently participated in a photo contest that was o…

---

## [Bug? Filter chain halted as \[#\<ActionController::Filters::](https://www.ruby-forum.com/t/bug-filter-chain-halted-as-actioncontroller/105528)

<div class="topic-metadata">

**Author:** [@babygodzilla](https://www.ruby-forum.com/u/babygodzilla)\
**Replies:** 2\
**Last updated:** [June 29, 2007, 7:28pm UTC](https://www.ruby-forum.com/t/bug-filter-chain-halted-as-actioncontroller/105528 "2007-06-29T19:28:56Z")

</div>

OK so I’ve been trying to follow the tutorial here: http://rails.homelinux.org/ When I simply do “scaffold: category” in the controller.rb, everything works fine. BUT after I generate the controllers and other files u…

---

## [Attachment\_fu: Saving files with random filenames (using Dig](https://www.ruby-forum.com/t/attachment-fu-saving-files-with-random-filenames-using-dig/108114)

<div class="topic-metadata">

**Author:** [@rob](https://www.ruby-forum.com/u/rob)\
**Replies:** 3\
**Last updated:** [June 29, 2007, 6:45pm UTC](https://www.ruby-forum.com/t/attachment-fu-saving-files-with-random-filenames-using-dig/108114 "2007-06-29T18:45:53Z")

</div>

Hi all, I’m creating an image uploader of sorts, and would like all of the filenames of uploaded files to be completely random when saved. I am fairly new to Ruby, Rails, and attachment\_fu, and came up with the follo…

---

## [RSpec, controller testing, and routes.rb](https://www.ruby-forum.com/t/rspec-controller-testing-and-routes-rb/108176)

<div class="topic-metadata">

**Author:** [@kelleysislander](https://www.ruby-forum.com/u/kelleysislander)\
**Replies:** 1\
**Last updated:** [June 29, 2007, 6:28pm UTC](https://www.ruby-forum.com/t/rspec-controller-testing-and-routes-rb/108176 "2007-06-29T18:28:51Z")

</div>

I didn’t see any forums or lists for RSpec users, so I’m hoping there are RSpec users on this list who may be able to help. I have this in my routes.rb: map.signup ‘signup/:step’, :controller =\> ‘register’, :action …

---

## [Piston problem](https://www.ruby-forum.com/t/piston-problem/107977)

<div class="topic-metadata">

**Author:** [@jordelver](https://www.ruby-forum.com/u/jordelver)\
**Replies:** 2\
**Last updated:** [June 29, 2007, 6:03pm UTC](https://www.ruby-forum.com/t/piston-problem/107977 "2007-06-29T18:03:47Z")

</div>

Hi, I couldn’t find a piston list, please let me know if anyone knows of one. I’m having a few problems using piston. I have vendor/rails under piston control, but when I run a piston update I get the following mess…

---

## [Find results help!](https://www.ruby-forum.com/t/find-results-help/108168)

<div class="topic-metadata">

**Author:** [@incoroneta](https://www.ruby-forum.com/u/incoroneta)\
**Replies:** 11\
**Last updated:** [June 29, 2007, 6:02pm UTC](https://www.ruby-forum.com/t/find-results-help/108168 "2007-06-29T18:02:58Z")

</div>

Hi, i’m trying to get the results from find(). The code of the find is: @user = User.find(:all, :conditions =\> \[ “user\_id = ?”, val \]) i’ve checked it with the function @user.size and it returns me one record. The p…

---

## [How to get recently saved record](https://www.ruby-forum.com/t/how-to-get-recently-saved-record/108137)

<div class="topic-metadata">

**Author:** [@mani](https://www.ruby-forum.com/u/mani)\
**Replies:** 1\
**Last updated:** [June 29, 2007, 5:28pm UTC](https://www.ruby-forum.com/t/how-to-get-recently-saved-record/108137 "2007-06-29T17:28:45Z")

</div>

hi all… im new to rails…im developin a app in which wen a record is created through create method in controller class…my create method in controller is shown below… voicechats—\>table1 chatusers----\>table2 foreign ke…

---

## [Speeding up :dependent =\> :destroy](https://www.ruby-forum.com/t/speeding-up-dependent-destroy/108131)

<div class="topic-metadata">

**Author:** [@mikel](https://www.ruby-forum.com/u/mikel)\
**Replies:** 1\
**Last updated:** [June 29, 2007, 5:24pm UTC](https://www.ruby-forum.com/t/speeding-up-dependent-destroy/108131 "2007-06-29T17:24:44Z")

</div>

I have a tree of models that represent a book. Looks like this: book sections documents paragraphs index entries glossary entries footnotes index entries glossary entries These are all models with has\_many fro…

---

## [Best Ruby on Rails authentication plugin](https://www.ruby-forum.com/t/best-ruby-on-rails-authentication-plugin/108113)

<div class="topic-metadata">

**Author:** [@gabordemeter](https://www.ruby-forum.com/u/gabordemeter)\
**Replies:** 4\
**Last updated:** [June 29, 2007, 5:20pm UTC](https://www.ruby-forum.com/t/best-ruby-on-rails-authentication-plugin/108113 "2007-06-29T17:20:32Z")

</div>

We’re currently in the process of deciding if we will build our custom RoR login / registration / user management system or use an existing plugin. One solution we tend to find interesting is ninja (http://okoru.org/ …

---

## [How to test for relationships](https://www.ruby-forum.com/t/how-to-test-for-relationships/108171)

<div class="topic-metadata">

**Author:** [@mark](https://www.ruby-forum.com/u/mark)\
**Replies:** 0\
**Last updated:** [June 29, 2007, 5:15pm UTC](https://www.ruby-forum.com/t/how-to-test-for-relationships/108171 "2007-06-29T17:15:16Z")

</div>

Hi, Is there a way to test the relationships of my models e.g. class Blog \< ActiveRecord::Base belongs\_to :user end

---

## [Mongrel & multiple config files](https://www.ruby-forum.com/t/mongrel-multiple-config-files/106947)

<div class="topic-metadata">

**Author:** [@chrislo](https://www.ruby-forum.com/u/chrislo)\
**Replies:** 5\
**Last updated:** [June 29, 2007, 4:28pm UTC](https://www.ruby-forum.com/t/mongrel-multiple-config-files/106947 "2007-06-29T16:28:38Z")

</div>

I’m deploying a rails app to separate production and staging environments using Capistrano. They’re basically running as two apps on the same machine, so I want to make them available on different ports, and may also …

---

## [Passing parameter by link\_to](https://www.ruby-forum.com/t/passing-parameter-by-link-to/108157)

<div class="topic-metadata">

**Author:** [@incoroneta](https://www.ruby-forum.com/u/incoroneta)\
**Replies:** 2\
**Last updated:** [June 29, 2007, 4:11pm UTC](https://www.ruby-forum.com/t/passing-parameter-by-link-to/108157 "2007-06-29T16:11:14Z")

</div>

Hi i’ve to pass the variable user.user\_id by the function link\_to to the action show. the code is: \<%= link\_to 'Show', :action =\> 'show', :id =\> user.user\_id %\> inside the action show the value of “id” is totally diff…

---

## [Attachment\_fu and mysql](https://www.ruby-forum.com/t/attachment-fu-and-mysql/108165)

<div class="topic-metadata">

**Author:** [@mattclarkson](https://www.ruby-forum.com/u/mattclarkson)\
**Replies:** 0\
**Last updated:** [June 29, 2007, 3:55pm UTC](https://www.ruby-forum.com/t/attachment-fu-and-mysql/108165 "2007-06-29T15:55:35Z")

</div>

Hi folks, I’m using attachment\_fu to upload mp3 files to amazon s3. The files are between 1 and 5mb each. Mostly it works fine, but about 1 in 4 uploads will fail, and once an upload fails the app responds erratical…

---

## [Ruby on Rails and LDAP](https://www.ruby-forum.com/t/ruby-on-rails-and-ldap/108092)

<div class="topic-metadata">

**Author:** [@Dev](https://www.ruby-forum.com/u/Dev)\
**Replies:** 2\
**Last updated:** [June 29, 2007, 3:52pm UTC](https://www.ruby-forum.com/t/ruby-on-rails-and-ldap/108092 "2007-06-29T15:52:11Z")

</div>

Hey guys, I’m new to both Ruby, ROR and LDAP, although not new to programming. I’ve been messing with Ruby for the last couple weeks and have been enjoying it. My setup for Ruby is Locomotive on Mac OS X. I successful…

---

## [Ruby On Rails Facebook Tutorial](https://www.ruby-forum.com/t/ruby-on-rails-facebook-tutorial/108164)

<div class="topic-metadata">

**Author:** [@liverail](https://www.ruby-forum.com/u/liverail)\
**Replies:** 1\
**Last updated:** [June 29, 2007, 3:41pm UTC](https://www.ruby-forum.com/t/ruby-on-rails-facebook-tutorial/108164 "2007-06-29T15:41:34Z")

</div>

Hi, I’ve created a tutorial which explains how to create a Facebook application from scratch with RubyOnRails at http://www.liverail.net/articles/2007/6/29/tutorial-on-developing-a-facebook-platform-application-with-r…

---

## [Creating a controller object from a refrencse](https://www.ruby-forum.com/t/creating-a-controller-object-from-a-refrencse/108106)

<div class="topic-metadata">

**Author:** [@emuen](https://www.ruby-forum.com/u/emuen)\
**Replies:** 1\
**Last updated:** [June 29, 2007, 3:03pm UTC](https://www.ruby-forum.com/t/creating-a-controller-object-from-a-refrencse/108106 "2007-06-29T15:03:28Z")

</div>

Hi there. I need to add a image to a given controlers imagepool. This is to be done from the image controller list action. This lists the images, and suplies a selectbox which contains the possible image pools and an …

---

## [\[Screencast ANN\] Smarticast: ActiveRecord Grab Bag](https://www.ruby-forum.com/t/screencast-ann-smarticast-activerecord-grab-bag/108160)

<div class="topic-metadata">

**Author:** [@bryanl](https://www.ruby-forum.com/u/bryanl)\
**Replies:** 0\
**Last updated:** [June 29, 2007, 2:42pm UTC](https://www.ruby-forum.com/t/screencast-ann-smarticast-activerecord-grab-bag/108160 "2007-06-29T14:42:24Z")

</div>

I just put a new screencast with a few ActiveRecord tips: http://smartic.us/2007/6/29/2-activerecord-grab-bag thanks bryanl

---

## [Undefined method 'dom\_id'](https://www.ruby-forum.com/t/undefined-method-dom-id/105781)

<div class="topic-metadata">

**Author:** [@jason](https://www.ruby-forum.com/u/jason)\
**Replies:** 6\
**Last updated:** [June 29, 2007, 2:09pm UTC](https://www.ruby-forum.com/t/undefined-method-dom-id/105781 "2007-06-29T14:09:20Z")

</div>

I am working through the rjs and rest screencast tutorials from peepcode. In my local development environment I’m running rails 1.2.3. When I attempt to generate a dom id with dom\_id @object I cannot get past the exc…

---

## [Objects returned from JOINS](https://www.ruby-forum.com/t/objects-returned-from-joins/108149)

<div class="topic-metadata">

**Author:** [@GPB](https://www.ruby-forum.com/u/GPB)\
**Replies:** 0\
**Last updated:** [June 29, 2007, 1:15pm UTC](https://www.ruby-forum.com/t/objects-returned-from-joins/108149 "2007-06-29T13:15:10Z")

</div>

Hello… This is my first Ruby on Rails application so please bear with me. I have a Find that looks like this: Record.find(:all, :select =\> “records.id, records.firstname, records.lastname, cities.city, departments.d…

---

## [Encrypting password](https://www.ruby-forum.com/t/encrypting-password/108144)

<div class="topic-metadata">

**Author:** [@unnikrishnanes](https://www.ruby-forum.com/u/unnikrishnanes)\
**Replies:** 4\
**Last updated:** [June 29, 2007, 1:12pm UTC](https://www.ruby-forum.com/t/encrypting-password/108144 "2007-06-29T13:12:10Z")

</div>

Hi all is there any way to encrypt password in ruby like sha1(‘password’) or md5(‘password’) in PHP? please help

---

## [Concerns when uploading html documents to an app](https://www.ruby-forum.com/t/concerns-when-uploading-html-documents-to-an-app/108146)

<div class="topic-metadata">

**Author:** [@bex3000](https://www.ruby-forum.com/u/bex3000)\
**Replies:** 0\
**Last updated:** [June 29, 2007, 12:55pm UTC](https://www.ruby-forum.com/t/concerns-when-uploading-html-documents-to-an-app/108146 "2007-06-29T12:55:13Z")

</div>

Hiya, I haven’t dealt developed many applications in any language so I’m a bit clueless as to the aspects I need to be thinking about when uploading to my app. I have the upload in place and it uploads the files chose…

---

## [Trying to Create a Friend System](https://www.ruby-forum.com/t/trying-to-create-a-friend-system/108116)

<div class="topic-metadata">

**Author:** [@starnix17](https://www.ruby-forum.com/u/starnix17)\
**Replies:** 1\
**Last updated:** [June 29, 2007, 9:02am UTC](https://www.ruby-forum.com/t/trying-to-create-a-friend-system/108116 "2007-06-29T09:02:43Z")

</div>

I’m trying to add the ability to add other users of my app as friends (to follow their recent activity, etc.), however I can’t grasp what ActiveRecord association should be used. Basically, I’ve tried to do this: cla…

---

## [Problem with file upload](https://www.ruby-forum.com/t/problem-with-file-upload/106773)

<div class="topic-metadata">

**Author:** [@princenamor](https://www.ruby-forum.com/u/princenamor)\
**Replies:** 2\
**Last updated:** [June 29, 2007, 8:51am UTC](https://www.ruby-forum.com/t/problem-with-file-upload/106773 "2007-06-29T08:51:42Z")

</div>

I have a simple app that allows users to upload image files to the web server. It works fine on my laptop with Webrick, when I deploy to the web server it also works fine with webrick. However, when I try to connect …

---

## [Params](https://www.ruby-forum.com/t/params/108085)

<div class="topic-metadata">

**Author:** [@snantz](https://www.ruby-forum.com/u/snantz)\
**Replies:** 1\
**Last updated:** [June 29, 2007, 8:41am UTC](https://www.ruby-forum.com/t/params/108085 "2007-06-29T08:41:43Z")

</div>

Here is a simple question - I think, but is has been giving me a headache all day. When using a helper such as \<%= text\_field…%\>, how to I access that value when gathering it from params? Is it by the id or the name?

---

## [Javascript include issue](https://www.ruby-forum.com/t/javascript-include-issue/107990)

<div class="topic-metadata">

**Author:** [@Camo](https://www.ruby-forum.com/u/Camo)\
**Replies:** 4\
**Last updated:** [June 29, 2007, 7:56am UTC](https://www.ruby-forum.com/t/javascript-include-issue/107990 "2007-06-29T07:56:35Z")

</div>

Hey guys, I’ve started working on a codepress plugin, (codepress.org) however I am having a problem with the javascript include via ruby code, rails adds ?something to stop caching, however this ?soemthing is affecti…

---

## [Remote\_function doubt](https://www.ruby-forum.com/t/remote-function-doubt/108123)

<div class="topic-metadata">

**Author:** [@chryste](https://www.ruby-forum.com/u/chryste)\
**Replies:** 2\
**Last updated:** [June 29, 2007, 7:52am UTC](https://www.ruby-forum.com/t/remote-function-doubt/108123 "2007-06-29T07:52:22Z")

</div>

Hi all, I have two hidden fields in a form purpose\_id and qtntype\_id. I need to pass these two to the controller. I’m trying the following code in a javascript function \<%= remote\_function(:update =\> “list3”, :url =\>…

---

## [Need some info regarding "how to add friends"](https://www.ruby-forum.com/t/need-some-info-regarding-how-to-add-friends/107998)

<div class="topic-metadata">

**Author:** [@gow](https://www.ruby-forum.com/u/gow)\
**Replies:** 4\
**Last updated:** [June 29, 2007, 6:08am UTC](https://www.ruby-forum.com/t/need-some-info-regarding-how-to-add-friends/107998 "2007-06-29T06:08:26Z")

</div>

hi every one, i’m new to ruby on rails.so, need some help. my project is that a user can add friends to his profile where friends are users themselves. i thought of creating two tables one for users and other for us…

---

## [Shared Domain](https://www.ruby-forum.com/t/shared-domain/108110)

<div class="topic-metadata">

**Author:** [@Geoffrey\_W](https://www.ruby-forum.com/u/Geoffrey_W)\
**Replies:** 2\
**Last updated:** [June 29, 2007, 4:48am UTC](https://www.ruby-forum.com/t/shared-domain/108110 "2007-06-29T04:48:21Z")

</div>

This seems like something that people must have already worked out, so I’m probably just not finding the right combination of search terms. If I were to share some domain classes between one Rails application and anot…

---

## [Link\_to restfully](https://www.ruby-forum.com/t/link-to-restfully/108115)

<div class="topic-metadata">

**Author:** [@pezdude](https://www.ruby-forum.com/u/pezdude)\
**Replies:** 4\
**Last updated:** [June 29, 2007, 4:32am UTC](https://www.ruby-forum.com/t/link-to-restfully/108115 "2007-06-29T04:32:22Z")

</div>

Should be a simple solution for this: I have: \<%= link\_to “Add Address”, order\_new\_addressbook\_path(@order) %\> which generates Add Address I want to pass in additional parameters, yet cant figure out where to put t…

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

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