# Rails

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

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

---

## [Rails and Social Networking Sites](https://www.ruby-forum.com/t/rails-and-social-networking-sites/146315)

<div class="topic-metadata">

**Author:** [@Elizabeth\_B](https://www.ruby-forum.com/u/Elizabeth_B)\
**Replies:** 3\
**Last updated:** [August 20, 2008, 10:34pm UTC](https://www.ruby-forum.com/t/rails-and-social-networking-sites/146315 "2008-08-20T22:34:38Z")

</div>

We’ve added more info to our Rails learning tool on Rails and Social Networking Sites: http://www.yoyobrain.com/subjects/show/490 You can use material on YoYoBrain, or create your own for learning drills to help you …

---

## [Association \> Correct way?](https://www.ruby-forum.com/t/association-correct-way/146368)

<div class="topic-metadata">

**Author:** [@remco](https://www.ruby-forum.com/u/remco)\
**Replies:** 3\
**Last updated:** [August 20, 2008, 10:09pm UTC](https://www.ruby-forum.com/t/association-correct-way/146368 "2008-08-20T22:09:20Z")

</div>

Hi, newbie-question: 2 tables countries countrydescription (additional info \> metadata etc. ) Models class countries \< ActiveRecord::Base has\_one :countrydescription end class countrydescription \< ActiveRecord::…

---

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

<div class="topic-metadata">

**Author:** [@gormo](https://www.ruby-forum.com/u/gormo)\
**Replies:** 0\
**Last updated:** [August 20, 2008, 9:09pm UTC](https://www.ruby-forum.com/t/attachment-fu-and-inheritance/146416 "2008-08-20T21:09:01Z")

</div>

Hello, I have the following class hierarchy Attachment \< Image \< SpecialImage . An Attachment should be a plain attachment (anything should be allowed) where an Image should be an image (obviously :wink: ). SpecialIm…

---

## [Find(:user\_id)](https://www.ruby-forum.com/t/find-user-id/146290)

<div class="topic-metadata">

**Author:** [@jsimone](https://www.ruby-forum.com/u/jsimone)\
**Replies:** 5\
**Last updated:** [August 20, 2008, 8:27pm UTC](https://www.ruby-forum.com/t/find-user-id/146290 "2008-08-20T20:27:52Z")

</div>

I’m trying to get the current user by using the find method from the User object. I’m using restful authentication to handle session management. The login page redirects to the user page, on successful log in, whose …

---

## [Can't get scaffolding to work](https://www.ruby-forum.com/t/cant-get-scaffolding-to-work/146401)

<div class="topic-metadata">

**Author:** [@nick1123](https://www.ruby-forum.com/u/nick1123)\
**Replies:** 3\
**Last updated:** [August 20, 2008, 8:21pm UTC](https://www.ruby-forum.com/t/cant-get-scaffolding-to-work/146401 "2008-08-20T20:21:31Z")

</div>

I am running Rails 2.1.0 and Ruby 1.8,6 I ran the following successfully: ruby script/generate model User name:text email:text password:text is\_admin:int type:int status:int rake db:migrate No I try to run: ruby sc…

---

## [Cancel upload button](https://www.ruby-forum.com/t/cancel-upload-button/146265)

<div class="topic-metadata">

**Author:** [@joan2kus](https://www.ruby-forum.com/u/joan2kus)\
**Replies:** 6\
**Last updated:** [August 20, 2008, 8:18pm UTC](https://www.ruby-forum.com/t/cancel-upload-button/146265 "2008-08-20T20:18:35Z")

</div>

How can I add a cancel button next to the upload button which will stop the uploading of multiple files, and how would it be done? Your reply is appreciated.

---

## [Learning RoR How do I scaffold an existing dev MySQL Database](https://www.ruby-forum.com/t/learning-ror-how-do-i-scaffold-an-existing-dev-mysql-database/144779)

<div class="topic-metadata">

**Author:** [@binro01](https://www.ruby-forum.com/u/binro01)\
**Replies:** 1\
**Last updated:** [August 20, 2008, 6:51pm UTC](https://www.ruby-forum.com/t/learning-ror-how-do-i-scaffold-an-existing-dev-mysql-database/144779 "2008-08-20T18:51:27Z")

</div>

Hi All, I learned how to create databases via migrations with RoR, but now I want to start building an application based on an existing database that didnt follow rails standards (ie pluralization rules on tables) I …

---

## [Help with RoR partial views](https://www.ruby-forum.com/t/help-with-ror-partial-views/146311)

<div class="topic-metadata">

**Author:** [@CrazyMenConnected](https://www.ruby-forum.com/u/CrazyMenConnected)\
**Replies:** 5\
**Last updated:** [August 20, 2008, 6:29pm UTC](https://www.ruby-forum.com/t/help-with-ror-partial-views/146311 "2008-08-20T18:29:39Z")

</div>

Hi, and thank you for reading this. First of all let me explain that i am a developer learning Ruby and RubyOnRails for future projects, so i am basically a noob that is in need of some help. :slight\_smile: I created…

---

## [Activeresource: self.prefix = .../:id/... (need to set :id?)](https://www.ruby-forum.com/t/activeresource-self-prefix-id-need-to-set-id/146405)

<div class="topic-metadata">

**Author:** [@jeanluca](https://www.ruby-forum.com/u/jeanluca)\
**Replies:** 0\
**Last updated:** [August 20, 2008, 5:28pm UTC](https://www.ruby-forum.com/t/activeresource-self-prefix-id-need-to-set-id/146405 "2008-08-20T17:28:45Z")

</div>

Hi All As I mentioned in my title I’m using activeresource and the model I’m using has the following prefix self.prefix = ‘/institute/:institute\_id/services/:service\_id/’ All this is great, however I’m now in a situa…

---

## [Radio button with Observe field](https://www.ruby-forum.com/t/radio-button-with-observe-field/146403)

<div class="topic-metadata">

**Author:** [@srinathbtech](https://www.ruby-forum.com/u/srinathbtech)\
**Replies:** 0\
**Last updated:** [August 20, 2008, 5:23pm UTC](https://www.ruby-forum.com/t/radio-button-with-observe-field/146403 "2008-08-20T17:23:39Z")

</div>

hi, i want a observe field to get which radio button has selected , i was tried , but i was returning both ids when clicked on one among two My View code looks like this: \<% fm.food\_item.food\_options.each do |option|…

---

## [Difference in public class methods and instance methods?](https://www.ruby-forum.com/t/difference-in-public-class-methods-and-instance-methods/146378)

<div class="topic-metadata">

**Author:** [@sunfish](https://www.ruby-forum.com/u/sunfish)\
**Replies:** 2\
**Last updated:** [August 20, 2008, 5:23pm UTC](https://www.ruby-forum.com/t/difference-in-public-class-methods-and-instance-methods/146378 "2008-08-20T17:23:18Z")

</div>

What is difference between public class methods and public instance methods? I am interested in knowing in detail way.

---

## [Drop down](https://www.ruby-forum.com/t/drop-down/146398)

<div class="topic-metadata">

**Author:** [@gasthana](https://www.ruby-forum.com/u/gasthana)\
**Replies:** 1\
**Last updated:** [August 20, 2008, 5:20pm UTC](https://www.ruby-forum.com/t/drop-down/146398 "2008-08-20T17:20:22Z")

</div>

i am using following code for drop down. \<%= select\_tag(‘abc’,"" + options\_from\_collection\_for\_select(@priorarr,:Id,:Priority,:selected =\> params\[:cs\_priority\])) %\> it is giving me one drop down with the values popul…

---

## [Rendering another action instead of the specified action](https://www.ruby-forum.com/t/rendering-another-action-instead-of-the-specified-action/146404)

<div class="topic-metadata">

**Author:** [@hema\_mca](https://www.ruby-forum.com/u/hema_mca)\
**Replies:** 0\
**Last updated:** [August 20, 2008, 5:15pm UTC](https://www.ruby-forum.com/t/rendering-another-action-instead-of-the-specified-action/146404 "2008-08-20T17:15:18Z")

</div>

In my view i am using as that is in the new.rhtml \<%= link\_to “Show All Elections”,:controller =\> “elections”,:action =\> “display” %\> And in the controller i am using the definition as def display @elections = Elec…

---

## [What version of Rails/Ruby to use](https://www.ruby-forum.com/t/what-version-of-rails-ruby-to-use/146388)

<div class="topic-metadata">

**Author:** [@SnakeNuts](https://www.ruby-forum.com/u/SnakeNuts)\
**Replies:** 3\
**Last updated:** [August 20, 2008, 4:56pm UTC](https://www.ruby-forum.com/t/what-version-of-rails-ruby-to-use/146388 "2008-08-20T16:56:18Z")

</div>

Hello all, I’m running into a quagmire of RoR and Rails versions, and I’d like some advice on what to use. I’d like to set up a RoR environment where I can find ample examples and possibly a couple of good books to h…

---

## [How do you build a site using RoR on a Godaddy hosting server?](https://www.ruby-forum.com/t/how-do-you-build-a-site-using-ror-on-a-godaddy-hosting-server/146329)

<div class="topic-metadata">

**Author:** [@dep](https://www.ruby-forum.com/u/dep)\
**Replies:** 5\
**Last updated:** [August 20, 2008, 4:31pm UTC](https://www.ruby-forum.com/t/how-do-you-build-a-site-using-ror-on-a-godaddy-hosting-server/146329 "2008-08-20T16:31:34Z")

</div>

I am completely new to the world of Ruby on Rails. I come from a strong HTML/Javascript/CSS background and have development experience with DotNetNuke and Joomla and little in Drupal. I have been looking for a good bo…

---

## [Order](https://www.ruby-forum.com/t/order/146307)

<div class="topic-metadata">

**Author:** [@snantz](https://www.ruby-forum.com/u/snantz)\
**Replies:** 2\
**Last updated:** [August 20, 2008, 4:26pm UTC](https://www.ruby-forum.com/t/order/146307 "2008-08-20T16:26:51Z")

</div>

I have a list of user’s email addresses that I am alphabetically ordering. The issue is that the first 75 or so email addresses are in order and then the order starts over again. Is that normal and is there a way not …

---

## [Undefine "require\_gem"](https://www.ruby-forum.com/t/undefine-require-gem/146385)

<div class="topic-metadata">

**Author:** [@amin](https://www.ruby-forum.com/u/amin)\
**Replies:** 6\
**Last updated:** [August 20, 2008, 3:48pm UTC](https://www.ruby-forum.com/t/undefine-require-gem/146385 "2008-08-20T15:48:00Z")

</div>

Hello G.s I am beginner in ROR. I have an application built in rails v 1.2.4 or 1.2.6, whenever I’ll start the webrick server its give me an error “reqire\_gem”. As per my understanding there is an issue of version …

---

## [Sorting activerecord returned timestamps](https://www.ruby-forum.com/t/sorting-activerecord-returned-timestamps/146340)

<div class="topic-metadata">

**Author:** [@morgan](https://www.ruby-forum.com/u/morgan)\
**Replies:** 2\
**Last updated:** [August 20, 2008, 3:21pm UTC](https://www.ruby-forum.com/t/sorting-activerecord-returned-timestamps/146340 "2008-08-20T15:21:34Z")

</div>

So i have and object with an attribute that contains a bunch more attributes. i would like to sort the schedules by the sched\_timestart field which is a datetime stamp user- —name | —schedules |---- sched\_timesta…

---

## [Help from rubyonrails 2.1](https://www.ruby-forum.com/t/help-from-rubyonrails-2-1/146382)

<div class="topic-metadata">

**Author:** [@rustam](https://www.ruby-forum.com/u/rustam)\
**Replies:** 2\
**Last updated:** [August 20, 2008, 3:20pm UTC](https://www.ruby-forum.com/t/help-from-rubyonrails-2-1/146382 "2008-08-20T15:20:29Z")

</div>

hi every one ! receintly i am working on rails 2.1,i have start it from scaffold ,besides from the pages which is created by scaffold automatically ,i have created the page “ingrendient.html.erb” and i have added the …

---

## [New plugin 'jiff\_auth' - an alternative to restful\_authentication plugin](https://www.ruby-forum.com/t/new-plugin-jiff-auth-an-alternative-to-restful-authentication-plugin/146387)

<div class="topic-metadata">

**Author:** [@snitko](https://www.ruby-forum.com/u/snitko)\
**Replies:** 0\
**Last updated:** [August 20, 2008, 3:08pm UTC](https://www.ruby-forum.com/t/new-plugin-jiff-auth-an-alternative-to-restful-authentication-plugin/146387 "2008-08-20T15:08:59Z")

</div>

Hi everybody. I totally disliked ‘restful\_authentication’ plugin for its need to generate code, difficult integration into existing models/controllers and lack of documentation. So, I spent a couple of weeks writing m…

---

## [Deployment Options](https://www.ruby-forum.com/t/deployment-options/146241)

<div class="topic-metadata">

**Author:** [@kylemathews](https://www.ruby-forum.com/u/kylemathews)\
**Replies:** 5\
**Last updated:** [August 20, 2008, 2:26pm UTC](https://www.ruby-forum.com/t/deployment-options/146241 "2008-08-20T14:26:17Z")

</div>

I’m trying to deploy my first app, and I’m confused. As far as I know there are three different paths which I could choose: Heroku, mod\_rails, or follow the instructions in Deploying Rails Applications (whatever exac…

---

## [I have a problem in running following line](https://www.ruby-forum.com/t/i-have-a-problem-in-running-following-line/146357)

<div class="topic-metadata">

**Author:** [@muhammad-usman](https://www.ruby-forum.com/u/muhammad-usman)\
**Replies:** 1\
**Last updated:** [August 20, 2008, 1:11pm UTC](https://www.ruby-forum.com/t/i-have-a-problem-in-running-following-line/146357 "2008-08-20T13:11:10Z")

</div>

when i run the line: ruby script/generate scaffold Item Manage it displays a message wrong number of arguments(1 for 2) i am creating controller and model using book ‘Biggining Ruby on Rails’ pg 167 kindly give s…

---

## [How to deal with NULL value](https://www.ruby-forum.com/t/how-to-deal-with-null-value/146222)

<div class="topic-metadata">

**Author:** [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Replies:** 17\
**Last updated:** [August 20, 2008, 12:56pm UTC](https://www.ruby-forum.com/t/how-to-deal-with-null-value/146222 "2008-08-20T12:56:08Z")

</div>

I often run into a problem of getting error because on the NULL value in MySQL. One example is when asking for .length of a string or strftime for datetime. Would it be better not to use NULL as default value, for exa…

---

## [Ruby on rails help!](https://www.ruby-forum.com/t/ruby-on-rails-help/146372)

<div class="topic-metadata">

**Author:** [@sunfish](https://www.ruby-forum.com/u/sunfish)\
**Replies:** 1\
**Last updated:** [August 20, 2008, 12:23pm UTC](https://www.ruby-forum.com/t/ruby-on-rails-help/146372 "2008-08-20T12:23:42Z")

</div>

Can someone enlighten me about \* Public Instance Methods. \* Public Class Methods. \* What is the root class for all Ruby Classes if there is one.

---

## [Regular Expression Too Big](https://www.ruby-forum.com/t/regular-expression-too-big/146352)

<div class="topic-metadata">

**Author:** [@kineticac](https://www.ruby-forum.com/u/kineticac)\
**Replies:** 1\
**Last updated:** [August 20, 2008, 12:20pm UTC](https://www.ruby-forum.com/t/regular-expression-too-big/146352 "2008-08-20T12:20:10Z")

</div>

Hi Guys, Not sure exactly what happened or what caused the error, but when I try to start my server or do a ‘rails -v’, I’m getting these strange errors: $ rails -v /System/Library/Frameworks/Ruby.framework/Versions…

---

## [Help in executing the following command](https://www.ruby-forum.com/t/help-in-executing-the-following-command/146355)

<div class="topic-metadata">

**Author:** [@muhammad-usman](https://www.ruby-forum.com/u/muhammad-usman)\
**Replies:** 2\
**Last updated:** [August 20, 2008, 12:17pm UTC](https://www.ruby-forum.com/t/help-in-executing-the-following-command/146355 "2008-08-20T12:17:50Z")

</div>

when i run the line ruby script/generate scaffold Item Manage it displays: wrong number of arguments(1 for 2) i am consulting book “biggining Ruby on Rails” pg 167 where controler and model are created together. …

---

## [Ternary operator](https://www.ruby-forum.com/t/ternary-operator/146367)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 4\
**Last updated:** [August 20, 2008, 11:41am UTC](https://www.ruby-forum.com/t/ternary-operator/146367 "2008-08-20T11:41:28Z")

</div>

Hi In my rhtml file I have tried \<% @problem.reproducible ? "Yes" : "No" %\> reproducible is a boolean field.The above not working And i checked \<% @problem.reproducible ? puts("Yes") : puts("No") …

---

## [Is it possible to test controllers without calling views?](https://www.ruby-forum.com/t/is-it-possible-to-test-controllers-without-calling-views/146242)

<div class="topic-metadata">

**Author:** [@daniel304](https://www.ruby-forum.com/u/daniel304)\
**Replies:** 3\
**Last updated:** [August 20, 2008, 11:36am UTC](https://www.ruby-forum.com/t/is-it-possible-to-test-controllers-without-calling-views/146242 "2008-08-20T11:36:44Z")

</div>

Let’s imagine, that we test a controller method - isolated peace of code with a well-defined responsibility: treat request and produce response (and may be also authorize user). We set up our mocks and stubs, i.e. do…

---

## [Short story on testing](https://www.ruby-forum.com/t/short-story-on-testing/146365)

<div class="topic-metadata">

**Author:** [@Franz\_S](https://www.ruby-forum.com/u/Franz_S)\
**Replies:** 0\
**Last updated:** [August 20, 2008, 11:27am UTC](https://www.ruby-forum.com/t/short-story-on-testing/146365 "2008-08-20T11:27:21Z")

</div>

Hello folks, I thought I’d quickly share an experience I had this morning. I have a before\_save callback in one of my models that sets a boolean attribute depending on the value of another attribute. I’m heavily into…

---

## [Obtaining a result from radio\_button\_tag](https://www.ruby-forum.com/t/obtaining-a-result-from-radio-button-tag/146277)

<div class="topic-metadata">

**Author:** [@brads](https://www.ruby-forum.com/u/brads)\
**Replies:** 1\
**Last updated:** [August 20, 2008, 11:23am UTC](https://www.ruby-forum.com/t/obtaining-a-result-from-radio-button-tag/146277 "2008-08-20T11:23:16Z")

</div>

Im trying to figure out how to retrieve the selected radio button from a radio\_button\_tag. I cant seem to obtain the selected member, and feed that into the DB. I have 3 buttons which are defined in their own table RE…

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

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