# Rails

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

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

---

## [Several audioclips stringed together](https://www.ruby-forum.com/t/several-audioclips-stringed-together/127686)

<div class="topic-metadata">

**Author:** [@Vorik](https://www.ruby-forum.com/u/Vorik)\
**Replies:** 2\
**Last updated:** [February 1, 2008, 10:18pm UTC](https://www.ruby-forum.com/t/several-audioclips-stringed-together/127686 "2008-02-01T22:18:57Z")

</div>

Hi, I’m making a web-app that requires the use of several audiofiles played after one after another. Example: File 1: “Welcome to another” File 2: “five” File 3: “minutes of your life!” This must sound more-or-…

---

## [How do I allow an empty value in my model?](https://www.ruby-forum.com/t/how-do-i-allow-an-empty-value-in-my-model/127851)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [February 1, 2008, 10:05pm UTC](https://www.ruby-forum.com/t/how-do-i-allow-an-empty-value-in-my-model/127851 "2008-02-01T22:05:56Z")

</div>

Hi, If a user enters a value for the field “work\_phone”, I want to validate it against a reg-exp. However, if the field is completely blank, I’d like to allow that too. This doesn’t work, though validates\_format\_of…

---

## [Validating hard-coded vs user data](https://www.ruby-forum.com/t/validating-hard-coded-vs-user-data/127847)

<div class="topic-metadata">

**Author:** [@eclubb](https://www.ruby-forum.com/u/eclubb)\
**Replies:** 1\
**Last updated:** [February 1, 2008, 10:03pm UTC](https://www.ruby-forum.com/t/validating-hard-coded-vs-user-data/127847 "2008-02-01T22:03:34Z")

</div>

I’m building validations in a model which contains user input as well as hard-coded and program-generated values. Is the purpose of validation to protect the db from bad user data, or possible programmer errors (typo…

---

## [Javascript\_include\_tag and controller actions](https://www.ruby-forum.com/t/javascript-include-tag-and-controller-actions/127862)

<div class="topic-metadata">

**Author:** [@Mike\_Pelley](https://www.ruby-forum.com/u/Mike_Pelley)\
**Replies:** 0\
**Last updated:** [February 1, 2008, 10:00pm UTC](https://www.ruby-forum.com/t/javascript-include-tag-and-controller-actions/127862 "2008-02-01T22:00:00Z")

</div>

Hello folks, I’d like to include the javascript generated by an RJS file in an RHTML file using the tags. I was going to use javascript\_include\_tag to do this, mostly in order to ensure that the contents are not ca…

---

## [No method error for "acts\_as\_tree"?](https://www.ruby-forum.com/t/no-method-error-for-acts-as-tree/127849)

<div class="topic-metadata">

**Author:** [@rubylicious](https://www.ruby-forum.com/u/rubylicious)\
**Replies:** 2\
**Last updated:** [February 1, 2008, 9:49pm UTC](https://www.ruby-forum.com/t/no-method-error-for-acts-as-tree/127849 "2008-02-01T21:49:59Z")

</div>

I’m running Rails 2.0 and I’m getting this error (undefined method \`acts\_as\_tree’) when trying to use the ‘acts\_as\_tree’ functionality in one of my models: class Topic \< ActiveRecord::Base has\_many :pages has\_many :…

---

## [Stumped on silly nil object but debug shows it is not nil](https://www.ruby-forum.com/t/stumped-on-silly-nil-object-but-debug-shows-it-is-not-nil/127840)

<div class="topic-metadata">

**Author:** [@railsirrigation](https://www.ruby-forum.com/u/railsirrigation)\
**Replies:** 1\
**Last updated:** [February 1, 2008, 9:27pm UTC](https://www.ruby-forum.com/t/stumped-on-silly-nil-object-but-debug-shows-it-is-not-nil/127840 "2008-02-01T21:27:01Z")

</div>

\<%= faq.faqcats\[:title\] -%\> in view kills it with this error: “You have a nil object when you didn’t expect it! You might have expected an instance of ActiveRecord::Base. The error occurred while evaluating nil.\[\]” …

---

## [Newbie question about routing with forms & db items](https://www.ruby-forum.com/t/newbie-question-about-routing-with-forms-db-items/127854)

<div class="topic-metadata">

**Author:** [@KTU](https://www.ruby-forum.com/u/KTU)\
**Replies:** 0\
**Last updated:** [February 1, 2008, 9:19pm UTC](https://www.ruby-forum.com/t/newbie-question-about-routing-with-forms-db-items/127854 "2008-02-01T21:19:23Z")

</div>

Hi I am trying to do my 1st ror application. I would like to make web form routing on this manner: 1st page: http://myurl/start this page will read information from mysql database and show items as web form on ht…

---

## [Popup not scrolling](https://www.ruby-forum.com/t/popup-not-scrolling/127643)

<div class="topic-metadata">

**Author:** [@bpm125](https://www.ruby-forum.com/u/bpm125)\
**Replies:** 1\
**Last updated:** [February 1, 2008, 8:54pm UTC](https://www.ruby-forum.com/t/popup-not-scrolling/127643 "2008-02-01T20:54:37Z")

</div>

I made a popup with this code: \<%=link\_to ‘Rules’, {:action =\> ‘rules’, :id =\> @promotion.id}, :popup =\> \[‘ruling\_box’, ‘height=300,width=600’\] if @promotion.is\_contest? %\> But it’s not scrolling to the content. What…

---

## [Why after updating Rails 2.0.2, My website access speed is very slowly](https://www.ruby-forum.com/t/why-after-updating-rails-2-0-2-my-website-access-speed-is-very-slowly/127637)

<div class="topic-metadata">

**Author:** [@OnRails](https://www.ruby-forum.com/u/OnRails)\
**Replies:** 1\
**Last updated:** [February 1, 2008, 8:49pm UTC](https://www.ruby-forum.com/t/why-after-updating-rails-2-0-2-my-website-access-speed-is-very-slowly/127637 "2008-02-01T20:49:56Z")

</div>

when I updated rails to 2.0.2, my website access speed is slower than rails 1.2.6 under the same environment. I don’t know why? Help and Thanks.

---

## [JS error when adding/removing items on a form](https://www.ruby-forum.com/t/js-error-when-adding-removing-items-on-a-form/127825)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [February 1, 2008, 8:44pm UTC](https://www.ruby-forum.com/t/js-error-when-adding-removing-items-on-a-form/127825 "2008-02-01T20:44:40Z")

</div>

Hi, I’m getting a Javascript error using tried and true RailsCast code! I’m submitting a single form for one object (ec\_order), which has many of another object (ec\_line\_item) within it. I have links to add and remo…

---

## [Turning off InvalidAuthenticityToken for a RESTful Service](https://www.ruby-forum.com/t/turning-off-invalidauthenticitytoken-for-a-restful-service/127836)

<div class="topic-metadata">

**Author:** [@eric99](https://www.ruby-forum.com/u/eric99)\
**Replies:** 2\
**Last updated:** [February 1, 2008, 8:25pm UTC](https://www.ruby-forum.com/t/turning-off-invalidauthenticitytoken-for-a-restful-service/127836 "2008-02-01T20:25:49Z")

</div>

Hi, I was trying to write a RESTful service and was planning on testing via tools such as cURL and the basic http libs. With the InvalidAuthenticityToken piece that is turned by default in Rails 2.0.2, I have to prov…

---

## [Assert{ 2.0 } available with assert\_xpath](https://www.ruby-forum.com/t/assert-2-0-available-with-assert-xpath/127826)

<div class="topic-metadata">

**Author:** [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Replies:** 1\
**Last updated:** [February 1, 2008, 8:13pm UTC](https://www.ruby-forum.com/t/assert-2-0-available-with-assert-xpath/127826 "2008-02-01T20:13:56Z")

</div>

Railsers: My assert{ 2.0 } project will soon have its own package. It’s available now as a “technology preview”, bundled with assert\_xpath. It’s better than the classic test assertions because when it fails it print…

---

## [Which version of Ruby for Rails 2.0.2?](https://www.ruby-forum.com/t/which-version-of-ruby-for-rails-2-0-2/127814)

<div class="topic-metadata">

**Author:** [@namealreadytaken](https://www.ruby-forum.com/u/namealreadytaken)\
**Replies:** 3\
**Last updated:** [February 1, 2008, 7:26pm UTC](https://www.ruby-forum.com/t/which-version-of-ruby-for-rails-2-0-2/127814 "2008-02-01T19:26:41Z")

</div>

I’m using ruby 1.8.6 p111. But some people seem to think that version 1.8.5 is better. Should I give it a whirl?

---

## [Rake db:create --trace --\>\> rake aborted! uninitialized constant ActiveRecord](https://www.ruby-forum.com/t/rake-db-create-trace-rake-aborted-uninitialized-constant-activerecord/127833)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [February 1, 2008, 7:25pm UTC](https://www.ruby-forum.com/t/rake-db-create-trace-rake-aborted-uninitialized-constant-activerecord/127833 "2008-02-01T19:25:31Z")

</div>

Hello G.s, I’m a noob programer, althought I’m an experienced webdesigner… I’m trying to learn RoR, following one of the tutorilas on RoR site. Got some trouble installing lastest MySQL version (Mac OS X 10.4), and d…

---

## [Cannot find Controller View Files](https://www.ruby-forum.com/t/cannot-find-controller-view-files/127837)

<div class="topic-metadata">

**Author:** [@bluetrust](https://www.ruby-forum.com/u/bluetrust)\
**Replies:** 1\
**Last updated:** [February 1, 2008, 7:19pm UTC](https://www.ruby-forum.com/t/cannot-find-controller-view-files/127837 "2008-02-01T19:19:27Z")

</div>

The controller works and I am able to list, create, edit, and destroy data, but I can not find its view files. Since the scaffold plugin has been changed the examples in my reference books no longer work : ruby scrip…

---

## [From\_xml nested associations?](https://www.ruby-forum.com/t/from-xml-nested-associations/127770)

<div class="topic-metadata">

**Author:** [@Corbin](https://www.ruby-forum.com/u/Corbin)\
**Replies:** 1\
**Last updated:** [February 1, 2008, 6:57pm UTC](https://www.ruby-forum.com/t/from-xml-nested-associations/127770 "2008-02-01T18:57:05Z")

</div>

Does from\_xml work with nested associations? Meaning can I pass in a person object with associated addresses and have it correctly rehydrate the ActiveRecord model for person?

---

## [Appending a record in many to many relationship](https://www.ruby-forum.com/t/appending-a-record-in-many-to-many-relationship/127819)

<div class="topic-metadata">

**Author:** [@ankit2584](https://www.ruby-forum.com/u/ankit2584)\
**Replies:** 4\
**Last updated:** [February 1, 2008, 6:09pm UTC](https://www.ruby-forum.com/t/appending-a-record-in-many-to-many-relationship/127819 "2008-02-01T18:09:42Z")

</div>

Hello, I have the following mailinglist and people model class Mailinglist \< ActiveRecord::Base has\_and\_belongs\_to\_many :people end class Person \< ActiveRecord::Base has\_and\_belongs\_to\_many :mailinglists end Now…

---

## [Questions concerning Rails MCV architecture](https://www.ruby-forum.com/t/questions-concerning-rails-mcv-architecture/127749)

<div class="topic-metadata">

**Author:** [@vtphysguy](https://www.ruby-forum.com/u/vtphysguy)\
**Replies:** 3\
**Last updated:** [February 1, 2008, 5:42pm UTC](https://www.ruby-forum.com/t/questions-concerning-rails-mcv-architecture/127749 "2008-02-01T17:42:01Z")

</div>

Hello Rails community! I’m currently designing a rails based website for my school’s magazine and since I have the ability to start from scratch I decided to start learning rails. Which may or may not have been a sill…

---

## [Popup](https://www.ruby-forum.com/t/popup/84513)

<div class="topic-metadata">

**Author:** [@Chika](https://www.ruby-forum.com/u/Chika)\
**Replies:** 2\
**Last updated:** [February 1, 2008, 5:38pm UTC](https://www.ruby-forum.com/t/popup/84513 "2008-02-01T17:38:38Z")

</div>

Hi everyona, I need you all… Im having some trouble with popup. I have a form that has a link that opens a popup so that the user can make a search, then the result should be loaded in the form; to do so I need to pass …

---

## [Why is this action being called when I'm not calling it?](https://www.ruby-forum.com/t/why-is-this-action-being-called-when-im-not-calling-it/127611)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 14\
**Last updated:** [February 1, 2008, 5:20pm UTC](https://www.ruby-forum.com/t/why-is-this-action-being-called-when-im-not-calling-it/127611 "2008-02-01T17:20:06Z")

</div>

Hi, I’m submitting a form to the “userconfirm” action of my register\_controller.rb file: def userconfirm @user = User.new(params\[:user\]) if @user.save # Create session …

---

## [Thank You!](https://www.ruby-forum.com/t/thank-you/127824)

<div class="topic-metadata">

**Author:** [@pete](https://www.ruby-forum.com/u/pete)\
**Replies:** 0\
**Last updated:** [February 1, 2008, 5:15pm UTC](https://www.ruby-forum.com/t/thank-you/127824 "2008-02-01T17:15:16Z")

</div>

Hi- I just wanted to say thanks for all the people that contribute to this site! There’s a lot of newbie’s (myself included) out there and this is a great place to come and ask questions, share advice, and learn int…

---

## [Strange parameters with check box](https://www.ruby-forum.com/t/strange-parameters-with-check-box/127823)

<div class="topic-metadata">

**Author:** [@Tarscher](https://www.ruby-forum.com/u/Tarscher)\
**Replies:** 0\
**Last updated:** [February 1, 2008, 4:46pm UTC](https://www.ruby-forum.com/t/strange-parameters-with-check-box/127823 "2008-02-01T16:46:08Z")

</div>

Hi all, I have a form that contains a list of patricipants of an event and their corresponding presence on that event. My form looks like (simplified) \<% form\_for @user do |f| %\> \<% @users.each do |user| %\> \<% fie…

---

## [RubyGems](https://www.ruby-forum.com/t/rubygems/127822)

<div class="topic-metadata">

**Author:** [@jsierra](https://www.ruby-forum.com/u/jsierra)\
**Replies:** 1\
**Last updated:** [February 1, 2008, 4:31pm UTC](https://www.ruby-forum.com/t/rubygems/127822 "2008-02-01T16:31:59Z")

</div>

Gems is proving to be the bane of my existence. How do I use gems through a proxy? Is there a config file where I can specify this? This particular machine I’m using is a Windows box (XP)… any help/advice would be m…

---

## [Silent redirect to index action when uploading images](https://www.ruby-forum.com/t/silent-redirect-to-index-action-when-uploading-images/125012)

<div class="topic-metadata">

**Author:** [@mknw](https://www.ruby-forum.com/u/mknw)\
**Replies:** 1\
**Last updated:** [February 1, 2008, 4:16pm UTC](https://www.ruby-forum.com/t/silent-redirect-to-index-action-when-uploading-images/125012 "2008-02-01T16:16:58Z")

</div>

All, I’m creating a simple image gallery in my rails app and have a problem uploading images on production environment (it works perfectly on my local machine). I’m hosting it on dreamhost on Apache+FastCGI, with my …

---

## [Silent redirect to index action when uploading images](https://www.ruby-forum.com/t/silent-redirect-to-index-action-when-uploading-images/127805)

<div class="topic-metadata">

**Author:** [@mknw](https://www.ruby-forum.com/u/mknw)\
**Replies:** 1\
**Last updated:** [February 1, 2008, 4:16pm UTC](https://www.ruby-forum.com/t/silent-redirect-to-index-action-when-uploading-images/127805 "2008-02-01T16:16:02Z")

</div>

All, I’m creating a simple image gallery in my rails app and have a problem uploading images on production environment (it works perfectly on my local machine). I’m hosting it on dreamhost on Apache+FastCGI, with my …

---

## [ActiveRecord - find](https://www.ruby-forum.com/t/activerecord-find/127764)

<div class="topic-metadata">

**Author:** [@pete](https://www.ruby-forum.com/u/pete)\
**Replies:** 5\
**Last updated:** [February 1, 2008, 4:11pm UTC](https://www.ruby-forum.com/t/activerecord-find/127764 "2008-02-01T16:11:37Z")

</div>

Hi- What I would like to do is select a single column out of my model, say the column is called my\_column, and store the result in an array, which it should be, right? For example, if I do: @my\_arr = Model.find(:all…

---

## [Engines as Mephisto Plugins](https://www.ruby-forum.com/t/engines-as-mephisto-plugins/127725)

<div class="topic-metadata">

**Author:** [@Sven\_F](https://www.ruby-forum.com/u/Sven_F)\
**Replies:** 7\
**Last updated:** [February 1, 2008, 3:18pm UTC](https://www.ruby-forum.com/t/engines-as-mephisto-plugins/127725 "2008-02-01T15:18:57Z")

</div>

Hi James, like I mentioned a while back Rick asked me regarding Engines as a basis for Mephisto plugins. Mephisto comes with its own implementation of plugins that share controllers, views, routes, schemas (migration…

---

## [Check box loop](https://www.ruby-forum.com/t/check-box-loop/127628)

<div class="topic-metadata">

**Author:** [@dezer85](https://www.ruby-forum.com/u/dezer85)\
**Replies:** 2\
**Last updated:** [February 1, 2008, 3:03pm UTC](https://www.ruby-forum.com/t/check-box-loop/127628 "2008-02-01T15:03:50Z")

</div>

I have some trouble solving a problem. I’m trying to make a musician community, where you’ll be able to find other musicians. The users will have to choose which kind of music style they prefer, and which instruments …

---

## [Subclasses\_of core method](https://www.ruby-forum.com/t/subclasses-of-core-method/127813)

<div class="topic-metadata">

**Author:** [@crossblaim](https://www.ruby-forum.com/u/crossblaim)\
**Replies:** 0\
**Last updated:** [February 1, 2008, 2:35pm UTC](https://www.ruby-forum.com/t/subclasses-of-core-method/127813 "2008-02-01T14:35:12Z")

</div>

class Account \< ActiveRecord::Base Catch-all for methods like is\_admin\_or\_operator. def method\_missing(method\_name, \*arguments) return super unless method\_name.to\_s =~ /\\Ais\_/ subclasses\_for\_scan = Regexp.union(\*Obje…

---

## [Best way to implement friendship thing?](https://www.ruby-forum.com/t/best-way-to-implement-friendship-thing/127729)

<div class="topic-metadata">

**Author:** [@vapor](https://www.ruby-forum.com/u/vapor)\
**Replies:** 6\
**Last updated:** [February 1, 2008, 2:12pm UTC](https://www.ruby-forum.com/t/best-way-to-implement-friendship-thing/127729 "2008-02-01T14:12:45Z")

</div>

I am new to rails and have to develop a small app which will do regular social networking. So, whats the best and efficient way to implement friends/friendship thing so that I could get complete list of every user’s f…

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

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