# Rails

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

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

---

## [Building a Survey Form](https://www.ruby-forum.com/t/building-a-survey-form/121979)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [December 6, 2007, 3:50am UTC](https://www.ruby-forum.com/t/building-a-survey-form/121979 "2007-12-06T03:50:31Z")

</div>

I have a few forms i need to do. (IE: Sales Survey Form, Production Survey Form, Tech Support Survey Form Etc.) but i don’t know how to or where to get started or anything. Each form like the sales form is completely …

---

## [Datetime field / params hash / ClassName.new](https://www.ruby-forum.com/t/datetime-field-params-hash-classname-new/121982)

<div class="topic-metadata">

**Author:** [@Wolfgang\_Klinger](https://www.ruby-forum.com/u/Wolfgang_Klinger)\
**Replies:** 1\
**Last updated:** [December 6, 2007, 3:42am UTC](https://www.ruby-forum.com/t/datetime-field-params-hash-classname-new/121982 "2007-12-06T03:42:32Z")

</div>

hiya! I have a form field with: \<%= datetime\_select :ownership, :bought\_on, { :include\_blank =\> true } %\> and in the controller: ownership has owner\_id, house\_id, bought\_on (datetime) ownership = Ownership.new(:owner =\>…

---

## [\[ANN\] Rails/Informix 1.1.0 released](https://www.ruby-forum.com/t/ann-rails-informix-1-1-0-released/122275)

<div class="topic-metadata">

**Author:** [@Gerardo\_S](https://www.ruby-forum.com/u/Gerardo_S)\
**Replies:** 0\
**Last updated:** [December 6, 2007, 3:41am UTC](https://www.ruby-forum.com/t/ann-rails-informix-1-1-0-released/122275 "2007-12-06T03:41:16Z")

</div>

Rails/Informix is the ActiveRecord adapter for Informix. Web site: http://rails-informix.rubyforge.org Changelog: 1.1.0 12/5/2007 Features: \* DECIMAL support Bugs fixed: \* db/schema.rb was not being generated. \*…

---

## [Rails 2.0.0 RC1 and activerecord-oci-adapter not found](https://www.ruby-forum.com/t/rails-2-0-0-rc1-and-activerecord-oci-adapter-not-found/120315)

<div class="topic-metadata">

**Author:** [@ianzabel](https://www.ruby-forum.com/u/ianzabel)\
**Replies:** 5\
**Last updated:** [December 6, 2007, 3:29am UTC](https://www.ruby-forum.com/t/rails-2-0-0-rc1-and-activerecord-oci-adapter-not-found/120315 "2007-12-06T03:29:48Z")

</div>

I’m attempting to test my app on Rails 2.0 RC1. I used this command: rake rails:freeze:edge TAG=rel\_2-0-0\_RC1 My database adapter is OCI for Oracle 8i. However, when I try to start up mongrel in my dev environment, I …

---

## [Some nice articles about Ruby but this time for MAC](https://www.ruby-forum.com/t/some-nice-articles-about-ruby-but-this-time-for-mac/122266)

<div class="topic-metadata">

**Author:** [@jennweller](https://www.ruby-forum.com/u/jennweller)\
**Replies:** 0\
**Last updated:** [December 6, 2007, 1:36am UTC](https://www.ruby-forum.com/t/some-nice-articles-about-ruby-but-this-time-for-mac/122266 "2007-12-06T01:36:49Z")

</div>

Ok, so many of us have to do a lot of searching for ruby developing but for Mac OS. Specially now with the Leopard and all that good stuff. Here are some interesting articles on the topic, enjoy! http://developer.appl…

---

## [Add object with REST](https://www.ruby-forum.com/t/add-object-with-rest/122175)

<div class="topic-metadata">

**Author:** [@bernee](https://www.ruby-forum.com/u/bernee)\
**Replies:** 11\
**Last updated:** [December 6, 2007, 12:25am UTC](https://www.ruby-forum.com/t/add-object-with-rest/122175 "2007-12-06T00:25:58Z")

</div>

In a /school/1 of a restful application I would like to add a course how is this possible? \<% form\_for @course, :url =\> new\_school\_course\_path(@school), :method =\> :put do |f| %\> Title \<%= f.text\_field :title %\> …

---

## [Find Top Rated](https://www.ruby-forum.com/t/find-top-rated/122259)

<div class="topic-metadata">

**Author:** [@bernee](https://www.ruby-forum.com/u/bernee)\
**Replies:** 0\
**Last updated:** [December 5, 2007, 11:39pm UTC](https://www.ruby-forum.com/t/find-top-rated/122259 "2007-12-05T23:39:51Z")

</div>

Why is there no easy way to get the three top rated objects for the acts\_as\_rated plugin?!

---

## [Where is my "rails" folder?](https://www.ruby-forum.com/t/where-is-my-rails-folder/122246)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [December 5, 2007, 11:34pm UTC](https://www.ruby-forum.com/t/where-is-my-rails-folder/122246 "2007-12-05T23:34:27Z")

</div>

Hi, I’m working through the tutorial for the site and am on step five (Peak Obsession). At the beginning it says, “Go to your rails folder”. But no where in the tutorial do I remember creating one, and I can’t find…

---

## [REST bug with form\_for](https://www.ruby-forum.com/t/rest-bug-with-form-for/122036)

<div class="topic-metadata">

**Author:** [@dangermoose](https://www.ruby-forum.com/u/dangermoose)\
**Replies:** 7\
**Last updated:** [December 5, 2007, 11:29pm UTC](https://www.ruby-forum.com/t/rest-bug-with-form-for/122036 "2007-12-05T23:29:10Z")

</div>

Hi all, I am running on Windows XP sp2 with ruby 1.8.6, and rails 1.2.3 I am using REST, and have this in my view \<% form\_for(:project, :url =\> project\_path(:user\_id =\> @project.my\_user, :id =\> @project), :html =\> …

---

## [Some redcloth questions](https://www.ruby-forum.com/t/some-redcloth-questions/122197)

<div class="topic-metadata">

**Author:** [@rubynuby](https://www.ruby-forum.com/u/rubynuby)\
**Replies:** 2\
**Last updated:** [December 5, 2007, 10:51pm UTC](https://www.ruby-forum.com/t/some-redcloth-questions/122197 "2007-12-05T22:51:09Z")

</div>

Is there a way to strip a redcloth string of all redcloth tags? I need to display a snippet of the text in an index page and want all markings removed. I used RedCloth.new(‘a’).methods but didn’t find anything app…

---

## [Field\_observer :on](https://www.ruby-forum.com/t/field-observer-on/122251)

<div class="topic-metadata">

**Author:** [@linojon](https://www.ruby-forum.com/u/linojon)\
**Replies:** 0\
**Last updated:** [December 5, 2007, 10:37pm UTC](https://www.ruby-forum.com/t/field-observer-on/122251 "2007-12-05T22:37:39Z")

</div>

Hi, I need a prototype/javascript guru to take a peek at this. There’s been discussions about prototype.js missing full support for the :on parameter to field\_observer eg this is ignored, and always defaults to on “c…

---

## [Save encryption as XML](https://www.ruby-forum.com/t/save-encryption-as-xml/122248)

<div class="topic-metadata">

**Author:** [@snantz](https://www.ruby-forum.com/u/snantz)\
**Replies:** 0\
**Last updated:** [December 5, 2007, 10:18pm UTC](https://www.ruby-forum.com/t/save-encryption-as-xml/122248 "2007-12-05T22:18:43Z")

</div>

I have a strange problem, I have encrypted my cc # using Rails - works great, now I need to use that private key to decrypt the # using Visual Basic - not working so great. Apparently VB has little or no functionality…

---

## [Can't install sqlite3-ruby gem on Mac OS X 10.5 Leopard](https://www.ruby-forum.com/t/cant-install-sqlite3-ruby-gem-on-mac-os-x-10-5-leopard/120963)

<div class="topic-metadata">

**Author:** [@partydrone](https://www.ruby-forum.com/u/partydrone)\
**Replies:** 1\
**Last updated:** [December 5, 2007, 9:16pm UTC](https://www.ruby-forum.com/t/cant-install-sqlite3-ruby-gem-on-mac-os-x-10-5-leopard/120963 "2007-12-05T21:16:04Z")

</div>

I have a fresh installation of Leopard on my laptop. When I ran “sudo gem update --system” it seemed to wipe out all of my gems. Weird. I was able to reinstall with “sudo gem install rails --include- dependencies” but…

---

## [Render :update and local variables](https://www.ruby-forum.com/t/render-update-and-local-variables/122241)

<div class="topic-metadata">

**Author:** [@kevin\_cline](https://www.ruby-forum.com/u/kevin_cline)\
**Replies:** 1\
**Last updated:** [December 5, 2007, 9:14pm UTC](https://www.ruby-forum.com/t/render-update-and-local-variables/122241 "2007-12-05T21:14:16Z")

</div>

Probably asked and answered, but… Why are controller instance variables visible in the block passed to render :update, but controller private methods are not? This does not work: class MyController \< ApplicationContr…

---

## [Why are my unit tests passing?](https://www.ruby-forum.com/t/why-are-my-unit-tests-passing/122125)

<div class="topic-metadata">

**Author:** [@ian](https://www.ruby-forum.com/u/ian)\
**Replies:** 3\
**Last updated:** [December 5, 2007, 9:06pm UTC](https://www.ruby-forum.com/t/why-are-my-unit-tests-passing/122125 "2007-12-05T21:06:02Z")

</div>

Most people want to know why their tests are failing. I want to know why they are passing. They really shouldn’t be. The test environment database defined in database.yml does not exist. I have not altered the auto-g…

---

## [Two pagination questions (](https://www.ruby-forum.com/t/two-pagination-questions/122237)

<div class="topic-metadata">

**Author:** [@erikgj](https://www.ruby-forum.com/u/erikgj)\
**Replies:** 0\
**Last updated:** [December 5, 2007, 8:53pm UTC](https://www.ruby-forum.com/t/two-pagination-questions/122237 "2007-12-05T20:53:54Z")

</div>

Hello, I’m using the will\_paginate plugin for pagiantion and I would like to ask how is it possible to change its default pagination URL from: /action?page=2 to /action/page/2 ? I’ve tried something with routing, …

---

## [Xsendfile - Apache 2.2](https://www.ruby-forum.com/t/xsendfile-apache-2-2/122234)

<div class="topic-metadata">

**Author:** [@ddancer](https://www.ruby-forum.com/u/ddancer)\
**Replies:** 0\
**Last updated:** [December 5, 2007, 8:26pm UTC](https://www.ruby-forum.com/t/xsendfile-apache-2-2/122234 "2007-12-05T20:26:42Z")

</div>

Hi all, I’m trying to get xsendfile installed on a Debian etch running Apache 2.2 but I keep getting lists of errors. Is there any advice out there? I’m wondering if xsendfile is for Apache 2.0 only, the gcc command …

---

## [Trouble maintaining session data through render :action](https://www.ruby-forum.com/t/trouble-maintaining-session-data-through-render-action/122157)

<div class="topic-metadata">

**Author:** [@dracos](https://www.ruby-forum.com/u/dracos)\
**Replies:** 12\
**Last updated:** [December 5, 2007, 7:54pm UTC](https://www.ruby-forum.com/t/trouble-maintaining-session-data-through-render-action/122157 "2007-12-05T19:54:30Z")

</div>

I have a fairly basic form ‘new’ that assigns an @client instance variable based on information in the session’s user data. def new @client = User.find(:first, :conditions =\> \[“id = ?”, session\[:user\_id\]\]).client en…

---

## [Manually start mail processes](https://www.ruby-forum.com/t/manually-start-mail-processes/122230)

<div class="topic-metadata">

**Author:** [@d2kagw](https://www.ruby-forum.com/u/d2kagw)\
**Replies:** 1\
**Last updated:** [December 5, 2007, 7:47pm UTC](https://www.ruby-forum.com/t/manually-start-mail-processes/122230 "2007-12-05T19:47:26Z")

</div>

A few days ago my ruby mail processes died after the partition where the app lives filled up and the mysql connection was lost. I don’t want to reboot the server during business hours, so how can I manually invoke th…

---

## [Can i do an sql update in a rails migration?](https://www.ruby-forum.com/t/can-i-do-an-sql-update-in-a-rails-migration/122227)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 2\
**Last updated:** [December 5, 2007, 7:28pm UTC](https://www.ruby-forum.com/t/can-i-do-an-sql-update-in-a-rails-migration/122227 "2007-12-05T19:28:37Z")

</div>

In order to do a single table inheritance, i added a new field called ‘type’, and set the value of it to either “Course” or “Lesson”, based on another field called “is\_course”, which is boolean. I set up a callback to…

---

## [Can't activate activesupport (= 1.0.4), already activated](https://www.ruby-forum.com/t/cant-activate-activesupport-1-0-4-already-activated/107786)

<div class="topic-metadata">

**Author:** [@matt](https://www.ruby-forum.com/u/matt)\
**Replies:** 2\
**Last updated:** [December 5, 2007, 7:26pm UTC](https://www.ruby-forum.com/t/cant-activate-activesupport-1-0-4-already-activated/107786 "2007-12-05T19:26:52Z")

</div>

I’m encountering a problem when trying to go through the Rails4Days tutorial: http://www.rails4days.pwp.blueyonder.co.uk/Rails4Days.pdf. As the guide suggests I have downloaded the version of rails that is being used …

---

## [Test-db on SQLite: getting "index xx already exists" error](https://www.ruby-forum.com/t/test-db-on-sqlite-getting-index-xx-already-exists-error/122232)

<div class="topic-metadata">

**Author:** [@josh](https://www.ruby-forum.com/u/josh)\
**Replies:** 0\
**Last updated:** [December 5, 2007, 7:10pm UTC](https://www.ruby-forum.com/t/test-db-on-sqlite-getting-index-xx-already-exists-error/122232 "2007-12-05T19:10:10Z")

</div>

Hi all I wanted to speed up my tests, so I changed my test environment from MySQL to SQLite. I’m on OSX 10.4 so SQLite3 is already installed. I changed the test env to the following: SQLite3::SQLException: index name…

---

## [Easy Validation Question](https://www.ruby-forum.com/t/easy-validation-question/121980)

<div class="topic-metadata">

**Author:** [@joep](https://www.ruby-forum.com/u/joep)\
**Replies:** 6\
**Last updated:** [December 5, 2007, 7:06pm UTC](https://www.ruby-forum.com/t/easy-validation-question/121980 "2007-12-05T19:06:50Z")

</div>

Hey, I’m trying to update the validation of one of my models to not allow emails from “bad-domain.com” I already have this in my model: validates\_format\_of :email, :with =\> %r{.(edu|com|gov|tv|biz|net|org|info|us|n…

---

## [Module methods with access to controller variables](https://www.ruby-forum.com/t/module-methods-with-access-to-controller-variables/122224)

<div class="topic-metadata">

**Author:** [@Tristan\_Dunn](https://www.ruby-forum.com/u/Tristan_Dunn)\
**Replies:** 0\
**Last updated:** [December 5, 2007, 6:39pm UTC](https://www.ruby-forum.com/t/module-methods-with-access-to-controller-variables/122224 "2007-12-05T18:39:53Z")

</div>

My subject is probably not the best description, so here is an example of what I am trying to do. class ExampleController \< ApplicationController include EventManager def action @name = ‘John’ event(:event, :contex…

---

## [NoMethodError](https://www.ruby-forum.com/t/nomethoderror/122215)

<div class="topic-metadata">

**Author:** [@wmerydith](https://www.ruby-forum.com/u/wmerydith)\
**Replies:** 2\
**Last updated:** [December 5, 2007, 5:55pm UTC](https://www.ruby-forum.com/t/nomethoderror/122215 "2007-12-05T17:55:25Z")

</div>

Hi, i am trying to build a news feed. The way information is put into it, is from when the other db i have is updated, that is all working. I am just having trouble with showing the feed in the view. I keep getting th…

---

## [Encryption using blowfish](https://www.ruby-forum.com/t/encryption-using-blowfish/122219)

<div class="topic-metadata">

**Author:** [@rumz](https://www.ruby-forum.com/u/rumz)\
**Replies:** 0\
**Last updated:** [December 5, 2007, 5:54pm UTC](https://www.ruby-forum.com/t/encryption-using-blowfish/122219 "2007-12-05T17:54:41Z")

</div>

I’m working on encrypting some data using blowfish. The previous implementation was done using php as follows. $key = ‘some key’; $data = ‘data to be encrypted’ $iv = pack(‘H\*’, substr($key, 0, 16)); $literak\_key ="…

---

## [Apache error](https://www.ruby-forum.com/t/apache-error/122106)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 11\
**Last updated:** [December 5, 2007, 5:53pm UTC](https://www.ruby-forum.com/t/apache-error/122106 "2007-12-05T17:53:30Z")

</div>

Good afternoon, newbie question. I suppose that it must be a normal one when you are beginning with ror, but i don´t find information to solve the problem. The server in which i´m trying to run ror is a vps (virtual p…

---

## [Fix for web\_service\_scaffold templates not found under Edge Rails](https://www.ruby-forum.com/t/fix-for-web-service-scaffold-templates-not-found-under-edge-rails/122218)

<div class="topic-metadata">

**Author:** [@KevinB](https://www.ruby-forum.com/u/KevinB)\
**Replies:** 0\
**Last updated:** [December 5, 2007, 5:52pm UTC](https://www.ruby-forum.com/t/fix-for-web-service-scaffold-templates-not-found-under-edge-rails/122218 "2007-12-05T17:52:20Z")

</div>

For those of us daring to use ActionWebService with Edge: if you are having trouble with web\_service\_scaffold not correctly finding templates, this patch should fix the problem: http://kevinbombino.com/misc/scaffold.…

---

## [Getting a 'State can't be blank' validation error on submit](https://www.ruby-forum.com/t/getting-a-state-cant-be-blank-validation-error-on-submit/122216)

<div class="topic-metadata">

**Author:** [@Mark\_ASRichman](https://www.ruby-forum.com/u/Mark_ASRichman)\
**Replies:** 0\
**Last updated:** [December 5, 2007, 5:44pm UTC](https://www.ruby-forum.com/t/getting-a-state-cant-be-blank-validation-error-on-submit/122216 "2007-12-05T17:44:08Z")

</div>

See http://pastie.caboo.se/124961 I’m basically just trying to validate the Users.state\_id field. The Users table holds the FK to States as user.state\_id, where there is a one-to-many between States and Users. state…

---

## [Number To Currency help](https://www.ruby-forum.com/t/number-to-currency-help/122200)

<div class="topic-metadata">

**Author:** [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Replies:** 2\
**Last updated:** [December 5, 2007, 5:20pm UTC](https://www.ruby-forum.com/t/number-to-currency-help/122200 "2007-12-05T17:20:06Z")

</div>

Hello fellow railists, i have recently used the built in number\_to\_currency function for ruby on rails to convert my figures in to “Â£”. I have this function in my show.rhtml which is: Price: \<%= number\_to\_currency(@…

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

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