# Rails

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

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

---

## [How to install acts\_as\_threaded](https://www.ruby-forum.com/t/how-to-install-acts-as-threaded/175324)

<div class="topic-metadata">

**Author:** [@fireflyman](https://www.ruby-forum.com/u/fireflyman)\
**Replies:** 2\
**Last updated:** [September 14, 2009, 8:35am UTC](https://www.ruby-forum.com/t/how-to-install-acts-as-threaded/175324 "2009-09-14T08:35:04Z")

</div>

Hi,everyone I’m a freshman for study ROR,I was try to deal the book. When I was in chap 6,it need to install a plugin that call acts\_as\_threaded.But I can’t deal with it. I had used gem install and ruby script/plugin…

---

## [Belongs\_to + create\_\* = rails vs. console behavior difference = confused Pepe](https://www.ruby-forum.com/t/belongs-to-create-rails-vs-console-behavior-difference-confused-pepe/175439)

<div class="topic-metadata">

**Author:** [@pepe](https://www.ruby-forum.com/u/pepe)\
**Replies:** 1\
**Last updated:** [September 14, 2009, 3:21am UTC](https://www.ruby-forum.com/t/belongs-to-create-rails-vs-console-behavior-difference-confused-pepe/175439 "2009-09-14T03:21:21Z")

</div>

Hi, I have been battling something for a good hour and a half and finally realized how to ‘solve’ the issue but I am very confused as of why I should do what I just did. I have 2 classes: class User has\_many :audit…

---

## [Authenticaton and authorisation tutorial](https://www.ruby-forum.com/t/authenticaton-and-authorisation-tutorial/175442)

<div class="topic-metadata">

**Author:** [@chrismalek](https://www.ruby-forum.com/u/chrismalek)\
**Replies:** 0\
**Last updated:** [September 14, 2009, 2:30am UTC](https://www.ruby-forum.com/t/authenticaton-and-authorisation-tutorial/175442 "2009-09-14T02:30:07Z")

</div>

Hi All, I’m new to Ruby and Rails. Everything I’ve done before has been in Java. Some time ago I created a website (http://www.thebirthnews.com) in RoR which needed authentication, authorisation, file uploads and a …

---

## [Proper syntax for text\_field](https://www.ruby-forum.com/t/proper-syntax-for-text-field/175433)

<div class="topic-metadata">

**Author:** [@Dudebot](https://www.ruby-forum.com/u/Dudebot)\
**Replies:** 6\
**Last updated:** [September 14, 2009, 12:30am UTC](https://www.ruby-forum.com/t/proper-syntax-for-text-field/175433 "2009-09-14T00:30:26Z")

</div>

Sorry for this basic noob question: I have an “Item” class in my models which corresponds to a SQL table, and a “Cart” class and a “CartItem” class which do not. The Item class does not have an amount object, which i…

---

## [Proper syntax for text field (less garbled)](https://www.ruby-forum.com/t/proper-syntax-for-text-field-less-garbled/175435)

<div class="topic-metadata">

**Author:** [@Dudebot](https://www.ruby-forum.com/u/Dudebot)\
**Replies:** 1\
**Last updated:** [September 13, 2009, 11:48pm UTC](https://www.ruby-forum.com/t/proper-syntax-for-text-field-less-garbled/175435 "2009-09-13T23:48:54Z")

</div>

I’m almost there… if someone could please help me :slight\_smile: OK, if I have this in my .html.erb: \<%= button\_to “Add to Cart” , :action =\> ‘add\_to\_cart’, :id =\> item, :amount =\> 3 %\> I get proper behavior. But I’…

---

## [Cucumber | Then I should see "view.common.status.logged\_in\_as"](https://www.ruby-forum.com/t/cucumber-then-i-should-see-view-common-status-logged-in-as/175286)

<div class="topic-metadata">

**Author:** [@rafael](https://www.ruby-forum.com/u/rafael)\
**Replies:** 2\
**Last updated:** [September 13, 2009, 7:23pm UTC](https://www.ruby-forum.com/t/cucumber-then-i-should-see-view-common-status-logged-in-as/175286 "2009-09-13T19:23:44Z")

</div>

Hi guys, how could I run this scenarion for each language? Is it suitable anyway? I slightly modified the webrat steps: Then /^I should see “(\[^”\]\*)"$/ do |text| response.should contain(I18n.t(text.to\_sym)) end Do…

---

## [Rails demo not showing up](https://www.ruby-forum.com/t/rails-demo-not-showing-up/174006)

<div class="topic-metadata">

**Author:** [@deostroll](https://www.ruby-forum.com/u/deostroll)\
**Replies:** 11\
**Last updated:** [September 13, 2009, 7:20pm UTC](https://www.ruby-forum.com/t/rails-demo-not-showing-up/174006 "2009-09-13T19:20:13Z")

</div>

Hi, Can’t get the rails demo to run. I’ve started the webrick server. Here is what the output looks like: \[root@chat demo\]# ruby script/server =\> Booting WEBrick =\> Rails 2.3.3 application starting on http://0.0.0.…

---

## [Maintaining multiple API versions](https://www.ruby-forum.com/t/maintaining-multiple-api-versions/175394)

<div class="topic-metadata">

**Author:** [@arvias](https://www.ruby-forum.com/u/arvias)\
**Replies:** 3\
**Last updated:** [September 13, 2009, 5:58pm UTC](https://www.ruby-forum.com/t/maintaining-multiple-api-versions/175394 "2009-09-13T17:58:15Z")

</div>

Hi. What’s beautiful about Rails is that it provides the incredibly easy system for API building. At the same time once you grow and production test the application you start finding that you can make the API interfa…

---

## [How to add multiple weekdays into one field](https://www.ruby-forum.com/t/how-to-add-multiple-weekdays-into-one-field/175417)

<div class="topic-metadata">

**Author:** [@arwed](https://www.ruby-forum.com/u/arwed)\
**Replies:** 1\
**Last updated:** [September 13, 2009, 5:13pm UTC](https://www.ruby-forum.com/t/how-to-add-multiple-weekdays-into-one-field/175417 "2009-09-13T17:13:11Z")

</div>

newbee question: I have a form, where I want to add a choice of weekdays a movie is playing into one field: \<%= select\_tag ‘days\[\]’, options\_for\_select(\[\[“monday”, “2”\], \[“tuesday”, “3”\], \[“wednesday”, “4”\], \[“thursd…

---

## [Button\_to](https://www.ruby-forum.com/t/button-to/175420)

<div class="topic-metadata">

**Author:** [@pakothawade](https://www.ruby-forum.com/u/pakothawade)\
**Replies:** 1\
**Last updated:** [September 13, 2009, 5:02pm UTC](https://www.ruby-forum.com/t/button-to/175420 "2009-09-13T17:02:03Z")

</div>

How can i specify the full url of the page i want to access using a button? ex: http://localhost:3000/users/1 I can use link\_to as: link\_to ‘Home’, “http://localhost:3000/ users/1” But i want to use a but…

---

## [User hierarchy](https://www.ruby-forum.com/t/user-hierarchy/175415)

<div class="topic-metadata">

**Author:** [@rpflo](https://www.ruby-forum.com/u/rpflo)\
**Replies:** 1\
**Last updated:** [September 13, 2009, 4:05pm UTC](https://www.ruby-forum.com/t/user-hierarchy/175415 "2009-09-13T16:05:53Z")

</div>

I’m trying to figure out how to have a two level user relationship. Photographers have clients. Clients have one photographer. Both are Users. So I’ve got a User model that looks like this: class User \< ActiveRecord…

---

## [Unknown column 'id' in 'where clause': DELETE FROM \`roles\` WHERE \`id\` = NULL](https://www.ruby-forum.com/t/unknown-column-id-in-where-clause-delete-from-roles-where-id-null/175401)

<div class="topic-metadata">

**Author:** [@pakothawade](https://www.ruby-forum.com/u/pakothawade)\
**Replies:** 5\
**Last updated:** [September 13, 2009, 3:53pm UTC](https://www.ruby-forum.com/t/unknown-column-id-in-where-clause-delete-from-roles-where-id-null/175401 "2009-09-13T15:53:35Z")

</div>

Hi, I have a Modul model and a Role model. Each modul can have many roles. So when the modul is deleted, it should delete the roles also. I have the following in my Modul model: has\_many :roles, :dependent =\> :destro…

---

## [Regrex\_crawler -- a crawler which uses regular expression to catch data from website](https://www.ruby-forum.com/t/regrex-crawler-a-crawler-which-uses-regular-expression-to-catch-data-from-website/175419)

<div class="topic-metadata">

**Author:** [@flyerhzm](https://www.ruby-forum.com/u/flyerhzm)\
**Replies:** 0\
**Last updated:** [September 13, 2009, 2:59pm UTC](https://www.ruby-forum.com/t/regrex-crawler-a-crawler-which-uses-regular-expression-to-catch-data-from-website/175419 "2009-09-13T14:59:09Z")

</div>

RegexpCrawler is a crawler which uses regular expression to catch data from website. It is easy to use and less code if you are familiar with regular expression. The project site is: http://github.com/flyerhzm/regexp\_…

---

## [Opening a new page](https://www.ruby-forum.com/t/opening-a-new-page/175408)

<div class="topic-metadata">

**Author:** [@MS999](https://www.ruby-forum.com/u/MS999)\
**Replies:** 3\
**Last updated:** [September 13, 2009, 12:10pm UTC](https://www.ruby-forum.com/t/opening-a-new-page/175408 "2009-09-13T12:10:36Z")

</div>

Hi, How do you add a new line using RoR? What do I need to add to link\_to to make it open a new page? Thank you

---

## [How to get rake task to delete dependents](https://www.ruby-forum.com/t/how-to-get-rake-task-to-delete-dependents/175412)

<div class="topic-metadata">

**Author:** [@skirkpatrick](https://www.ruby-forum.com/u/skirkpatrick)\
**Replies:** 1\
**Last updated:** [September 13, 2009, 6:09am UTC](https://www.ruby-forum.com/t/how-to-get-rake-task-to-delete-dependents/175412 "2009-09-13T06:09:08Z")

</div>

is there a way i can get a rake task to destroy the dependents declared in the model when an item is destroyed? here is my rake task code: task(:deleteFakes =\> :environment) do @items = Item.find(:all, :conditions =\> …

---

## [US State and their Respectives City](https://www.ruby-forum.com/t/us-state-and-their-respectives-city/175379)

<div class="topic-metadata">

**Author:** [@salil](https://www.ruby-forum.com/u/salil)\
**Replies:** 5\
**Last updated:** [September 13, 2009, 6:01am UTC](https://www.ruby-forum.com/t/us-state-and-their-respectives-city/175379 "2009-09-13T06:01:16Z")

</div>

Hello all! I need to a implement a sign-up form with US states and city selector. Is there already a helper os something that implements or makes it easier to implement this for Rails.Also when i select the state al…

---

## [Compute\_public\_path should be public instead of private](https://www.ruby-forum.com/t/compute-public-path-should-be-public-instead-of-private/175376)

<div class="topic-metadata">

**Author:** [@liberte](https://www.ruby-forum.com/u/liberte)\
**Replies:** 3\
**Last updated:** [September 13, 2009, 3:02am UTC](https://www.ruby-forum.com/t/compute-public-path-should-be-public-instead-of-private/175376 "2009-09-13T03:02:12Z")

</div>

Hello, I’m in the middle of a situation where the method compute\_public\_path must be public instead of private. Some times we need to add .mov, .flv or even another kind of asset like swf and I want use my correct pub…

---

## [WEIRD: hpricot causes Error 500](https://www.ruby-forum.com/t/weird-hpricot-causes-error-500/175406)

<div class="topic-metadata">

**Author:** [@jason](https://www.ruby-forum.com/u/jason)\
**Replies:** 1\
**Last updated:** [September 13, 2009, 1:31am UTC](https://www.ruby-forum.com/t/weird-hpricot-causes-error-500/175406 "2009-09-13T01:31:29Z")

</div>

So this is weird. I have this in one of my controllers: f = open("http://www.google.com") @s = f.read And that’s fine. I can echo @s back out in the view, and it works like a charm. But the second I do this (in the c…

---

## [Character Counter (javascript required?)](https://www.ruby-forum.com/t/character-counter-javascript-required/175341)

<div class="topic-metadata">

**Author:** [@bingobob](https://www.ruby-forum.com/u/bingobob)\
**Replies:** 3\
**Last updated:** [September 13, 2009, 12:21am UTC](https://www.ruby-forum.com/t/character-counter-javascript-required/175341 "2009-09-13T00:21:47Z")

</div>

Can anyone help me out with a javascript walk through. I assume this is something that lots of other’s have done. I have an Advert form and on it I have a text\_field “Advert.description”, it’s validated on characters,…

---

## [Rails 2.3.4 errors.... is it a stable version ? or shoudl I revert to 2.3.2?](https://www.ruby-forum.com/t/rails-2-3-4-errors-is-it-a-stable-version-or-shoudl-i-revert-to-2-3-2/175326)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 2\
**Last updated:** [September 13, 2009, 12:19am UTC](https://www.ruby-forum.com/t/rails-2-3-4-errors-is-it-a-stable-version-or-shoudl-i-revert-to-2-3-2/175326 "2009-09-13T00:19:27Z")

</div>

just installed 2.3.4, and launched a simple script/console … got errors, both in 2.3.4 libs… $ script/console Loading development environment (Rails 2.3.4) /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib…

---

## [After creating an instance of an object, Rails redirects to the index of the object that it :belong](https://www.ruby-forum.com/t/after-creating-an-instance-of-an-object-rails-redirects-to-the-index-of-the-object-that-it-belong/175390)

<div class="topic-metadata">

**Author:** [@steven\_noble](https://www.ruby-forum.com/u/steven_noble)\
**Replies:** 5\
**Last updated:** [September 13, 2009, 12:15am UTC](https://www.ruby-forum.com/t/after-creating-an-instance-of-an-object-rails-redirects-to-the-index-of-the-object-that-it-belong/175390 "2009-09-13T00:15:21Z")

</div>

When I click the Save in /views/parts/new.html, I expect to end up on / views/parts/show.html, but instead I end up in /views/projects/ index.html, with the wrong \[flash\] message. I have: ++++++++++++++++ /models/pr…

---

## [Listing things in groups (adverts by advert\_type)](https://www.ruby-forum.com/t/listing-things-in-groups-adverts-by-advert-type/175386)

<div class="topic-metadata">

**Author:** [@bingobob](https://www.ruby-forum.com/u/bingobob)\
**Replies:** 17\
**Last updated:** [September 12, 2009, 11:02pm UTC](https://www.ruby-forum.com/t/listing-things-in-groups-adverts-by-advert-type/175386 "2009-09-12T23:02:47Z")

</div>

I have this code sample which doesnt work properly. \<% @advert\_types.each do |at| %\> \<div id="advert\_type\_name"\> \<b\>\<%= at.name %\>\</b\> \</div\> \<% @resort.adverts.cleared\_for\_release.each do |advert| %\> \<d…

---

## [ModPorter - problems accessing the hash](https://www.ruby-forum.com/t/modporter-problems-accessing-the-hash/175350)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [September 12, 2009, 9:53pm UTC](https://www.ruby-forum.com/t/modporter-problems-accessing-the-hash/175350 "2009-09-12T21:53:07Z")

</div>

I’m trying to set up an upload interface to use mod\_porter, however I can’t seem to read the hash that it hands off to the rails method. It seems like I should be able to access the hash content using params \[:file\]\[:…

---

## [Cannot get my password to validate](https://www.ruby-forum.com/t/cannot-get-my-password-to-validate/175381)

<div class="topic-metadata">

**Author:** [@RubyonRails\_newbie](https://www.ruby-forum.com/u/RubyonRails_newbie)\
**Replies:** 3\
**Last updated:** [September 12, 2009, 8:46pm UTC](https://www.ruby-forum.com/t/cannot-get-my-password-to-validate/175381 "2009-09-12T20:46:25Z")

</div>

Hello, I am working through the railsspace tutorrial, and i’ve noticed that the password validation is no longer working. I can get screen\_name and email to validate, but for some reason, the password field is ignore…

---

## [timeZone issue](https://www.ruby-forum.com/t/timezone-issue/175399)

<div class="topic-metadata">

**Author:** [@Fabien\_P](https://www.ruby-forum.com/u/Fabien_P)\
**Replies:** 1\
**Last updated:** [September 12, 2009, 6:37pm UTC](https://www.ruby-forum.com/t/timezone-issue/175399 "2009-09-12T18:37:40Z")

</div>

hi, I’m trying to understand why I can not make time\_zone working. It always return the same date whatever time\_zone I configured : Time.zone =\> #\<ActiveSupport::TimeZone:0x7fca81c99318 @utc\_offset=3600, @name=“Pa…

---

## [Removing the inner elements](https://www.ruby-forum.com/t/removing-the-inner-elements/175387)

<div class="topic-metadata">

**Author:** [@prashanth\_hiremath](https://www.ruby-forum.com/u/prashanth_hiremath)\
**Replies:** 1\
**Last updated:** [September 12, 2009, 5:54pm UTC](https://www.ruby-forum.com/t/removing-the-inner-elements/175387 "2009-09-12T17:54:56Z")

</div>

Hi M getting some problems in remove the span tags i have First Second Third i wanna remove first and second span tags how can i achieve it help me OUTPUT: Third I have an hpricot syntax so that i can …

---

## [Signing out of remote sessions](https://www.ruby-forum.com/t/signing-out-of-remote-sessions/175389)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [September 12, 2009, 4:40pm UTC](https://www.ruby-forum.com/t/signing-out-of-remote-sessions/175389 "2009-09-12T16:40:02Z")

</div>

Hi everyone, My goal is to allow users of a Rails web app to see all their open sessions on other computers and close/sign out of them remotely. Similar to gmail’s “Account activity” page (link found at the bottom of…

---

## [Anyone know why \_\_END\_\_ and DATA don't work in Rails?](https://www.ruby-forum.com/t/anyone-know-why-end-and-data-dont-work-in-rails/175353)

<div class="topic-metadata">

**Author:** [@dr\_gavin](https://www.ruby-forum.com/u/dr_gavin)\
**Replies:** 2\
**Last updated:** [September 12, 2009, 4:37pm UTC](https://www.ruby-forum.com/t/anyone-know-why-end-and-data-dont-work-in-rails/175353 "2009-09-12T16:37:42Z")

</div>

When writing Ruby you have the option to end the file early with END. Anything after the END is assigned to a constant called DATA which is available within the file. I recently tried using this in Rails and it didn’t…

---

## [Undefined method \`get\_client\_info' for Mysql:Class](https://www.ruby-forum.com/t/undefined-method-get-client-info-for-mysql-class/175313)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 2\
**Last updated:** [September 12, 2009, 4:15pm UTC](https://www.ruby-forum.com/t/undefined-method-get-client-info-for-mysql-class/175313 "2009-09-12T16:15:27Z")

</div>

after upgraded to Snow Leopard… (32bits arch) I re-installed the mysql gem (i386 architecture) , all gems and rails 2.3.4 testing in the console $ irb irb(main):001:0\> require ‘rubygems’ =\> true irb(main):002:0\> …

---

## [\[URGENT\] cannot continue my devs, big mess with Apple Snow Leopard!](https://www.ruby-forum.com/t/urgent-cannot-continue-my-devs-big-mess-with-apple-snow-leopard/175212)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 12\
**Last updated:** [September 12, 2009, 3:52pm UTC](https://www.ruby-forum.com/t/urgent-cannot-continue-my-devs-big-mess-with-apple-snow-leopard/175212 "2009-09-12T15:52:02Z")

</div>

I don’t understand anymore what to do with SL … … I have an Apple Macbook 2.16GHz Intel Core 2 Duo upgraded to SL 10.6 it should be a 64 architecture but cannot start kernel in 64 … because of EFI32 :-(( $ ioreg…

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

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