# Rails

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

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

---

## [Lynda Training (1 error(s) on assignment of multiparameter a](https://www.ruby-forum.com/t/lynda-training-1-error-s-on-assignment-of-multiparameter-a/87360)

<div class="topic-metadata">

**Author:** [@jmjmjm](https://www.ruby-forum.com/u/jmjmjm)\
**Replies:** 3\
**Last updated:** [September 25, 2007, 11:12pm UTC](https://www.ruby-forum.com/t/lynda-training-1-error-s-on-assignment-of-multiparameter-a/87360 "2007-09-25T23:12:00Z")

</div>

I have been running through the essential training for Ruby on Rails from Lynda. It is very helpful and I am learning a lot from it. I am having a problem with Chapter 11 though, the CRUD and Relational Databases sec…

---

## [Pluralization for 'EventSeries' turns into table name 'event](https://www.ruby-forum.com/t/pluralization-for-eventseries-turns-into-table-name-event/82424)

<div class="topic-metadata">

**Author:** [@thomasmaas](https://www.ruby-forum.com/u/thomasmaas)\
**Replies:** 4\
**Last updated:** [September 25, 2007, 11:11pm UTC](https://www.ruby-forum.com/t/pluralization-for-eventseries-turns-into-table-name-event/82424 "2007-09-25T23:11:14Z")

</div>

hello everyone, while generating the model EventSeries, my migration was generated with the database table name ‘event\_sery’. i double checked the pluralization tool located at: http://nubyonrails.com/tools/pluralize. …

---

## [Distributing controllers across several Rails servers and ur](https://www.ruby-forum.com/t/distributing-controllers-across-several-rails-servers-and-ur/82545)

<div class="topic-metadata">

**Author:** [@Marcus\_R](https://www.ruby-forum.com/u/Marcus_R)\
**Replies:** 3\
**Last updated:** [September 25, 2007, 11:11pm UTC](https://www.ruby-forum.com/t/distributing-controllers-across-several-rails-servers-and-ur/82545 "2007-09-25T23:11:12Z")

</div>

Hi, I have an application which is split across two servers. Most of the application runs on one server, but one controller runs on another server. The second controller has no dependency on the first. I need to ge…

---

## [Offensive/rude word \<\<bleeping\>\> for posted text? is there](https://www.ruby-forum.com/t/offensive-rude-word-bleeping-for-posted-text-is-there/82559)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 2\
**Last updated:** [September 25, 2007, 11:11pm UTC](https://www.ruby-forum.com/t/offensive-rude-word-bleeping-for-posted-text-is-there/82559 "2007-09-25T23:11:12Z")

</div>

Hi all, Just wondering whether there exists in ruby, or rails plugin, an offensive/rude word \<\> feature? For example if accepting text for a blog if there was a rude word it would replace it with \<\> or XXXX. Cheers …

---

## [Which country did a user request come from? How can I determ](https://www.ruby-forum.com/t/which-country-did-a-user-request-come-from-how-can-i-determ/82371)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 5\
**Last updated:** [September 25, 2007, 11:11pm UTC](https://www.ruby-forum.com/t/which-country-did-a-user-request-come-from-how-can-i-determ/82371 "2007-09-25T23:11:11Z")

</div>

Hi, Can anybody recommend a means to determine the country that an incoming user request is originating from? I’m guessing that you would first get the IP from the HTTP header and then somehow translate this? Is t…

---

## [Error: Redirecting in a way that never completes](https://www.ruby-forum.com/t/error-redirecting-in-a-way-that-never-completes/114684)

<div class="topic-metadata">

**Author:** [@doug](https://www.ruby-forum.com/u/doug)\
**Replies:** 10\
**Last updated:** [September 25, 2007, 11:11pm UTC](https://www.ruby-forum.com/t/error-redirecting-in-a-way-that-never-completes/114684 "2007-09-25T23:11:10Z")

</div>

I am trying to use the session hash to restrict access to a portion of a web site. I have 2 controllers. The first is ‘main’ for general access and the second is ‘protected’ for restricted access. I have appended m…

---

## [Problem on installing rubyworks on centos5](https://www.ruby-forum.com/t/problem-on-installing-rubyworks-on-centos5/114612)

<div class="topic-metadata">

**Author:** [@crax](https://www.ruby-forum.com/u/crax)\
**Replies:** 3\
**Last updated:** [September 25, 2007, 11:11pm UTC](https://www.ruby-forum.com/t/problem-on-installing-rubyworks-on-centos5/114612 "2007-09-25T23:11:08Z")

</div>

hi all, I have met a problem on installing rubyworks on centos5. I have checked the install steps from here: http://rubyworks.rubyforge.org/installation/centos.html when running the command: sudo yum install rubywork…

---

## [Date format conversion problem](https://www.ruby-forum.com/t/date-format-conversion-problem/113456)

<div class="topic-metadata">

**Author:** [@gers32](https://www.ruby-forum.com/u/gers32)\
**Replies:** 6\
**Last updated:** [September 25, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/date-format-conversion-problem/113456 "2007-09-25T23:10:54Z")

</div>

Hi, I generate in RoR an XML file representing Oracle database data, which is then sent to an Adobe Flex UI as an HTTP Web Service. In order to format DATES in a way that Flex understands, I add the following code to…

---

## [Locate rails application root directory](https://www.ruby-forum.com/t/locate-rails-application-root-directory/88933)

<div class="topic-metadata">

**Author:** [@dmcclean](https://www.ruby-forum.com/u/dmcclean)\
**Replies:** 6\
**Last updated:** [September 25, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/locate-rails-application-root-directory/88933 "2007-09-25T23:10:53Z")

</div>

Is there a simple way to obtain the full path of the Rails application root directory from the Rails application? (The parent dir of the apps,public, etc. directories) Thanks in advance, Don McClean

---

## [Ruby-debug vs. breakpoint](https://www.ruby-forum.com/t/ruby-debug-vs-breakpoint/196438)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 4\
**Last updated:** [September 25, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/ruby-debug-vs-breakpoint/196438 "2007-09-25T23:10:53Z")

</div>

Okay, so it looks like getting the ole “breakpoint” working isn’t going to happen. Everyone seems to just push for making the switch over to “ruby-debug”. I’ve decided to go with the flow, but have to say that I fee…

---

## [Adding custom routes to a restful app](https://www.ruby-forum.com/t/adding-custom-routes-to-a-restful-app/114782)

<div class="topic-metadata">

**Author:** [@jjkiesch](https://www.ruby-forum.com/u/jjkiesch)\
**Replies:** 3\
**Last updated:** [September 25, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/adding-custom-routes-to-a-restful-app/114782 "2007-09-25T23:10:53Z")

</div>

i’ve done a few project using restful routing but now i need to add an action that isn’t part of one of the main crud methods. i added this to my routes.rb file: map.resources :works, :collection =\> { :featured =\> :ge…

---

## [Why does an RJS call within a form cause submit the form's s](https://www.ruby-forum.com/t/why-does-an-rjs-call-within-a-form-cause-submit-the-forms-s/114643)

<div class="topic-metadata">

**Author:** [@jeff](https://www.ruby-forum.com/u/jeff)\
**Replies:** 5\
**Last updated:** [September 25, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/why-does-an-rjs-call-within-a-form-cause-submit-the-forms-s/114643 "2007-09-25T23:10:50Z")

</div>

I have a page with a large form. The form is created using form\_for. Within the form, I have several button tags (not submit tags). Each button has a remote\_function call in the onclick event. When a button is clic…

---

## [Setting custom variables per environment](https://www.ruby-forum.com/t/setting-custom-variables-per-environment/114683)

<div class="topic-metadata">

**Author:** [@eggie5](https://www.ruby-forum.com/u/eggie5)\
**Replies:** 8\
**Last updated:** [September 25, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/setting-custom-variables-per-environment/114683 "2007-09-25T23:10:50Z")

</div>

Hi, I’d like to be able to set a variable for each environment I have. It’s a path to a folder that’s different on each system: development and production. I then, need to be able to read it from my controller. How c…

---

## [Calculations & joins](https://www.ruby-forum.com/t/calculations-joins/83912)

<div class="topic-metadata">

**Author:** [@Scara\_Maccai](https://www.ruby-forum.com/u/Scara_Maccai)\
**Replies:** 2\
**Last updated:** [September 25, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/calculations-joins/83912 "2007-09-25T23:10:50Z")

</div>

I want to have a sum of an order by doing something like: select sum(items.price) from order, items where order.item\_id = items.id Since Order and Item class are related (using “belongs\_to”), I thought I could use: O…

---

## [Attachment\_FU -- stops creating after first file creation](https://www.ruby-forum.com/t/attachment-fu-stops-creating-after-first-file-creation/107738)

<div class="topic-metadata">

**Author:** [@johnhutch](https://www.ruby-forum.com/u/johnhutch)\
**Replies:** 3\
**Last updated:** [September 25, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/attachment-fu-stops-creating-after-first-file-creation/107738 "2007-09-25T23:10:50Z")

</div>

I’m using attachment\_fu for award nomination site and I’m running into a very strange problem that I’ve found absolutely zero information on. When running on our remote server (redhat fedora), I can only upload one fi…

---

## [Can rake tasks take paramaters?](https://www.ruby-forum.com/t/can-rake-tasks-take-paramaters/89321)

<div class="topic-metadata">

**Author:** [@timperrett](https://www.ruby-forum.com/u/timperrett)\
**Replies:** 3\
**Last updated:** [September 25, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/can-rake-tasks-take-paramaters/89321 "2007-09-25T23:10:48Z")

</div>

Can rake tasks take paramaters? Thanks Tim

---

## [Problem with DATE type in Oracle](https://www.ruby-forum.com/t/problem-with-date-type-in-oracle/112673)

<div class="topic-metadata">

**Author:** [@gers32](https://www.ruby-forum.com/u/gers32)\
**Replies:** 1\
**Last updated:** [September 25, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/problem-with-date-type-in-oracle/112673 "2007-09-25T23:10:45Z")

</div>

I have several DATE fields in several Oracle tables. Some have time information, some don’t (but same data type). Rails doesn’t seem to handle the ones that don’t contain it, for editing. For example, on “show”, I’ll …

---

## [How to deal with user rights in the views?](https://www.ruby-forum.com/t/how-to-deal-with-user-rights-in-the-views/83891)

<div class="topic-metadata">

**Author:** [@budu](https://www.ruby-forum.com/u/budu)\
**Replies:** 3\
**Last updated:** [September 25, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/how-to-deal-with-user-rights-in-the-views/83891 "2007-09-25T23:10:44Z")

</div>

Hi, This is a question about the best way to develop an application with different user rights. According to the user rights, i want to display the same views but with small differences (like additional buttons if th…

---

## [Finding the position on an item in a collection](https://www.ruby-forum.com/t/finding-the-position-on-an-item-in-a-collection/113724)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 3\
**Last updated:** [September 25, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/finding-the-position-on-an-item-in-a-collection/113724 "2007-09-25T23:10:41Z")

</div>

This feels like it should be easy but i can’t work it out: if i have a collection of stories, ordered by (for example) date, then how do i find out the position of the story with id = (eg) 23 in the collection? I gues…

---

## [How can I specify the location of the fragment cache?](https://www.ruby-forum.com/t/how-can-i-specify-the-location-of-the-fragment-cache/114696)

<div class="topic-metadata">

**Author:** [@raghus](https://www.ruby-forum.com/u/raghus)\
**Replies:** 5\
**Last updated:** [September 25, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/how-can-i-specify-the-location-of-the-fragment-cache/114696 "2007-09-25T23:10:31Z")

</div>

I am using fragment caching - the cache gets stored under RAILS\_ROOT/ tmp/cache/www.mysite.com but if someone goes to http://mysite.com (no www) then, a second cache gets stored at RAILS\_ROOT/tmp/cache/ mysite.com - f…

---

## [What is up with wiki.rubyonrails.org?](https://www.ruby-forum.com/t/what-is-up-with-wiki-rubyonrails-org/114767)

<div class="topic-metadata">

**Author:** [@creativelogic](https://www.ruby-forum.com/u/creativelogic)\
**Replies:** 5\
**Last updated:** [September 25, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/what-is-up-with-wiki-rubyonrails-org/114767 "2007-09-25T23:10:30Z")

</div>

The service has been “temporarily” down every time I’ve ever tried to use it.

---

## [Setting up shared hosting on dedicated server](https://www.ruby-forum.com/t/setting-up-shared-hosting-on-dedicated-server/114735)

<div class="topic-metadata">

**Author:** [@bakki](https://www.ruby-forum.com/u/bakki)\
**Replies:** 8\
**Last updated:** [September 25, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/setting-up-shared-hosting-on-dedicated-server/114735 "2007-09-25T23:10:29Z")

</div>

I have read Ezra’s book and the O’Reilly shortcuts and various other resources on the Net and most assume you have one app which you deploy to shared host, VPS or dedicated host. Our situation is that we have an ASP a…

---

## [Extending nil methods](https://www.ruby-forum.com/t/extending-nil-methods/109802)

<div class="topic-metadata">

**Author:** [@Reynard](https://www.ruby-forum.com/u/Reynard)\
**Replies:** 1\
**Last updated:** [September 25, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/extending-nil-methods/109802 "2007-09-25T23:10:29Z")

</div>

it seems my previous post didn’t get through for some reason, so sorry if this is duplicated. has anyone done something like this? class NilClass def empty?; true; end def strip; nil; end def ; nil; end end so yo…

---

## [This forum don't help development solving problem!](https://www.ruby-forum.com/t/this-forum-dont-help-development-solving-problem/92867)

<div class="topic-metadata">

**Author:** [@modpriest](https://www.ruby-forum.com/u/modpriest)\
**Replies:** 4\
**Last updated:** [September 25, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/this-forum-dont-help-development-solving-problem/92867 "2007-09-25T23:10:26Z")

</div>

I have been post almost 10 thread in ruby on rails group with different user. All i get is zero “000000000000000” nothing I will never post thread on this forum again…

---

## [Empty? vs. blank? vs. length \> 0](https://www.ruby-forum.com/t/empty-vs-blank-vs-length-0/112542)

<div class="topic-metadata">

**Author:** [@mindtonic](https://www.ruby-forum.com/u/mindtonic)\
**Replies:** 10\
**Last updated:** [September 25, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/empty-vs-blank-vs-length-0/112542 "2007-09-25T23:10:24Z")

</div>

Hello, Which is the best method to use, I am at a quandary over the most basic of tests! I want something like \<%= @object.description unless @object.description.empty? -%\> So the unless could be any of these: unle…

---

## [Puts if exists?](https://www.ruby-forum.com/t/puts-if-exists/85819)

<div class="topic-metadata">

**Author:** [@spacechurro](https://www.ruby-forum.com/u/spacechurro)\
**Replies:** 4\
**Last updated:** [September 25, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/puts-if-exists/85819 "2007-09-25T23:10:23Z")

</div>

i have a real simple one today… here’s how it works. i have a field called address2 that is in most cases, blank… the rhtml that does this looks like: \<%= place\[:address1\] %\> \<%= place\[:address2\] %\> \<%= place\[:city\] …

---

## [ActiveRecord Store of sessions in a separate database](https://www.ruby-forum.com/t/activerecord-store-of-sessions-in-a-separate-database/112593)

<div class="topic-metadata">

**Author:** [@AlAlAl](https://www.ruby-forum.com/u/AlAlAl)\
**Replies:** 8\
**Last updated:** [September 25, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/activerecord-store-of-sessions-in-a-separate-database/112593 "2007-09-25T23:10:22Z")

</div>

I’d like to be able to save sessions in a separate database. I created the following model below in session.rb: class Session \< ActiveRecord::Base self.abstract\_class = true establish\_connection :userdb end I seem …

---

## [\[RoR\],\[C.L.R\] How I convert an AR-Class-name to a symbol?](https://www.ruby-forum.com/t/ror-c-l-r-how-i-convert-an-ar-class-name-to-a-symbol/86240)

<div class="topic-metadata">

**Author:** [@splattael](https://www.ruby-forum.com/u/splattael)\
**Replies:** 5\
**Last updated:** [September 25, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/ror-c-l-r-how-i-convert-an-ar-class-name-to-a-symbol/86240 "2007-09-25T23:10:22Z")

</div>

People, I’m looking for a method to convert an AR-Class-name to a symbol. Something like this: AppServerType.class\_name\_to\_symbol =\> :app\_server\_type Also I’m looking for this: :app\_server\_type.symbol\_to\_class\_name …

---

## [Debug Rails (send to logger msg)](https://www.ruby-forum.com/t/debug-rails-send-to-logger-msg/87912)

<div class="topic-metadata">

**Author:** [@jamal](https://www.ruby-forum.com/u/jamal)\
**Replies:** 10\
**Last updated:** [September 25, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/debug-rails-send-to-logger-msg/87912 "2007-09-25T23:10:22Z")

</div>

Hello, I was wondering if I could sent any messages to the logger (console command) in RoR, I saw someone do it, I just cannot remember what he wrote. “Console command” =\> when you type ruby script/server and the ser…

---

## [Deploy osx apache2 (plus php)](https://www.ruby-forum.com/t/deploy-osx-apache2-plus-php/85150)

<div class="topic-metadata">

**Author:** [@dankelley](https://www.ruby-forum.com/u/dankelley)\
**Replies:** 7\
**Last updated:** [September 25, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/deploy-osx-apache2-plus-php/85150 "2007-09-25T23:10:20Z")

</div>

I’m under the understanding that it is a good practice to have apache2 installed for RoR, and so I’ve used macports on OSX to install that, and then I stopped the existing server and restarted the apache2 instance usi…

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

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