# Rails

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

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

---

## [I18n question](https://www.ruby-forum.com/t/i18n-question/188815)

<div class="topic-metadata">

**Author:** [@badnaam](https://www.ruby-forum.com/u/badnaam)\
**Replies:** 0\
**Last updated:** [May 18, 2010, 8:53pm UTC](https://www.ruby-forum.com/t/i18n-question/188815 "2010-05-18T20:53:51Z")

</div>

how do i configure custom model messages in i18n. I have a custom validation that calls a method snd upon failure, add an error to an attribute. I understand how to do this for standard built in validations. thanks

---

## [Design question](https://www.ruby-forum.com/t/design-question/188788)

<div class="topic-metadata">

**Author:** [@pepe](https://www.ruby-forum.com/u/pepe)\
**Replies:** 9\
**Last updated:** [May 18, 2010, 8:49pm UTC](https://www.ruby-forum.com/t/design-question/188788 "2010-05-18T20:49:09Z")

</div>

I’m working on application where several tables (users,customers,other…) will have the same name structure (prefix, first, middle, last, suffix). I have thought about factoring out the name to a separate model: \*\*\* M…

---

## [Integrate new fields in a table with CRUD functionality: simple question](https://www.ruby-forum.com/t/integrate-new-fields-in-a-table-with-crud-functionality-simple-question/188657)

<div class="topic-metadata">

**Author:** [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Replies:** 24\
**Last updated:** [May 18, 2010, 8:19pm UTC](https://www.ruby-forum.com/t/integrate-new-fields-in-a-table-with-crud-functionality-simple-question/188657 "2010-05-18T20:19:45Z")

</div>

Hi, I’ve got an “expenses” table which I modified as follows: added column “account\_number” renamed column “type” to “transaction\_type” Can I add CRUD for the columns with: first: ruby script/generate model expense …

---

## [CSV parsing/Faster CSV](https://www.ruby-forum.com/t/csv-parsing-faster-csv/188809)

<div class="topic-metadata">

**Author:** [@spex2004](https://www.ruby-forum.com/u/spex2004)\
**Replies:** 1\
**Last updated:** [May 18, 2010, 8:17pm UTC](https://www.ruby-forum.com/t/csv-parsing-faster-csv/188809 "2010-05-18T20:17:31Z")

</div>

Hello, I’m currently using FasterCSV to parse CSV files. Problem I have is that currently, I have to go through a two step process. I receive the CSV file, I have to open it, and then Save it as CSV (MSDOS) format for …

---

## [Controller/Action Problem](https://www.ruby-forum.com/t/controller-action-problem/188801)

<div class="topic-metadata">

**Author:** [@machinetobe](https://www.ruby-forum.com/u/machinetobe)\
**Replies:** 2\
**Last updated:** [May 18, 2010, 8:17pm UTC](https://www.ruby-forum.com/t/controller-action-problem/188801 "2010-05-18T20:17:31Z")

</div>

hey guys, i’ve got the following problem: i call an action called “execute\_algorithms”. one codeline of this action tries to execute the following command: parser = LibXML::XML::Parser.file(“http://localhost:3000/XM…

---

## [Rails3 pre and protect\_from\_forgery](https://www.ruby-forum.com/t/rails3-pre-and-protect-from-forgery/183164)

<div class="topic-metadata">

**Author:** [@bshelton229](https://www.ruby-forum.com/u/bshelton229)\
**Replies:** 4\
**Last updated:** [May 18, 2010, 7:54pm UTC](https://www.ruby-forum.com/t/rails3-pre-and-protect-from-forgery/183164 "2010-05-18T19:54:41Z")

</div>

I’ve almost entirely converted a rails 2.3.5 app to 3pre. I’m having some trouble with protect\_from\_forgery. I had protect\_from\_forgery set in application\_controller.rb, but run some uploadify ajax stuff in one of my …

---

## [Total number of views - ROR](https://www.ruby-forum.com/t/total-number-of-views-ror/188800)

<div class="topic-metadata">

**Author:** [@ash](https://www.ruby-forum.com/u/ash)\
**Replies:** 3\
**Last updated:** [May 18, 2010, 6:25pm UTC](https://www.ruby-forum.com/t/total-number-of-views-ror/188800 "2010-05-18T18:25:25Z")

</div>

Hey I want to implement functionality which would let me display total number of views for chosen pages. I can create a table to have user\_id and page\_id for example to keep track of total views. but issue is if the…

---

## [Ruby-recaptcha seems be broken or has significant limitation](https://www.ruby-forum.com/t/ruby-recaptcha-seems-be-broken-or-has-significant-limitation/188803)

<div class="topic-metadata">

**Author:** [@eblatt](https://www.ruby-forum.com/u/eblatt)\
**Replies:** 0\
**Last updated:** [May 18, 2010, 5:52pm UTC](https://www.ruby-forum.com/t/ruby-recaptcha-seems-be-broken-or-has-significant-limitation/188803 "2010-05-18T17:52:11Z")

</div>

I’ve installed the ruby-recaptcha gem as instructed here: http://bitbucket.org/mml/ruby-recaptcha/wiki/Home Here are the steps that I’ve comleted: installed the gem added config.gem ‘ruby-recaptcha’ environment.rb: m…

---

## [RForum, the link is broken](https://www.ruby-forum.com/t/rforum-the-link-is-broken/188799)

<div class="topic-metadata">

**Author:** [@distriker](https://www.ruby-forum.com/u/distriker)\
**Replies:** 0\
**Last updated:** [May 18, 2010, 5:39pm UTC](https://www.ruby-forum.com/t/rforum-the-link-is-broken/188799 "2010-05-18T17:39:23Z")

</div>

Hello, I am very interesting in the RForum of the Ruby Forum, and I see in the footer a link for the official website, but the link is broken. Why? Isn’t it possible download more the RForum? Greetings.

---

## [Rails forum maintenance](https://www.ruby-forum.com/t/rails-forum-maintenance/188798)

<div class="topic-metadata">

**Author:** [@mark](https://www.ruby-forum.com/u/mark)\
**Replies:** 0\
**Last updated:** [May 18, 2010, 5:37pm UTC](https://www.ruby-forum.com/t/rails-forum-maintenance/188798 "2010-05-18T17:37:37Z")

</div>

Hi Unfortunately Rails forum is currently riddled with spam. This seems a great shame as the forum is a first port of call for those new to rails, seeking help, and this gives a poor impression of the rails community…

---

## [Route conflict - help resolving](https://www.ruby-forum.com/t/route-conflict-help-resolving/188763)

<div class="topic-metadata">

**Author:** [@sso](https://www.ruby-forum.com/u/sso)\
**Replies:** 4\
**Last updated:** [May 18, 2010, 4:53pm UTC](https://www.ruby-forum.com/t/route-conflict-help-resolving/188763 "2010-05-18T16:53:42Z")

</div>

These are the routes I would like: map.forums\_new\_topic ‘forums/:forum\_id/:subsection\_id/topics/ new’, :controller =\> “topics”, :action =\> “new” map.forums\_show\_topic ‘forums/:forum\_id/:subsection\_id/:topic\_id’, :con…

---

## [! Help With ActiveLdap!](https://www.ruby-forum.com/t/help-with-activeldap/188795)

<div class="topic-metadata">

**Author:** [@leorente](https://www.ruby-forum.com/u/leorente)\
**Replies:** 0\
**Last updated:** [May 18, 2010, 4:41pm UTC](https://www.ruby-forum.com/t/help-with-activeldap/188795 "2010-05-18T16:41:30Z")

</div>

Hello G.s! I install the ActiveLdap with “gem install activeldap” and config the ldap.yml, but when I start the app, the console show me this error msg: C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active\_su…

---

## [Split the en.yml into multiple files?](https://www.ruby-forum.com/t/split-the-en-yml-into-multiple-files/188779)

<div class="topic-metadata">

**Author:** [@lukas](https://www.ruby-forum.com/u/lukas)\
**Replies:** 4\
**Last updated:** [May 18, 2010, 1:38pm UTC](https://www.ruby-forum.com/t/split-the-en-yml-into-multiple-files/188779 "2010-05-18T13:38:42Z")

</div>

Hello, I have a problem with my en.yml file in my Rails project: It’s getting waaaaay too big. Is it possible to split the file up into multiple files, like en\_labels.yml, en\_hints.yml and so forth? I couldn’t find …

---

## [Net::ssh authenticationfailed every time!](https://www.ruby-forum.com/t/net-ssh-authenticationfailed-every-time/121203)

<div class="topic-metadata">

**Author:** [@softf5ajivanet](https://www.ruby-forum.com/u/softf5ajivanet)\
**Replies:** 3\
**Last updated:** [May 18, 2010, 1:28pm UTC](https://www.ruby-forum.com/t/net-ssh-authenticationfailed-every-time/121203 "2010-05-18T13:28:23Z")

</div>

hi, got a real serious issue with net::ssh again, I’ve bought a new slice from slicehost running Ubuntu Gutsy 7.10, and i’ve setup ssh to work fine via… scp ~/.ssh/id\_rsa.pub root@myipaddress:~/ once copied to the se…

---

## [Transaction Failures](https://www.ruby-forum.com/t/transaction-failures/188772)

<div class="topic-metadata">

**Author:** [@brianp](https://www.ruby-forum.com/u/brianp)\
**Replies:** 1\
**Last updated:** [May 18, 2010, 12:15pm UTC](https://www.ruby-forum.com/t/transaction-failures/188772 "2010-05-18T12:15:35Z")

</div>

Hey, I’ve got a multiple model (4) form on my site. I have the controller handling the creation with a transaction. I do this because if one object can’t save I don’t want any of them saved and need to be able to qui…

---

## [Add all metods in ssl\_required](https://www.ruby-forum.com/t/add-all-metods-in-ssl-required/147809)

<div class="topic-metadata">

**Author:** [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Replies:** 6\
**Last updated:** [May 18, 2010, 12:04pm UTC](https://www.ruby-forum.com/t/add-all-metods-in-ssl-required/147809 "2010-05-18T12:04:03Z")

</div>

Can you easily add all methods behind the ssl\_required instead of having to add them one by one? Like ssl\_required :all

---

## [\[JOBS\] Santa Barbara RoR entrepreneur job opening](https://www.ruby-forum.com/t/jobs-santa-barbara-ror-entrepreneur-job-opening/188776)

<div class="topic-metadata">

**Author:** [@sbclick](https://www.ruby-forum.com/u/sbclick)\
**Replies:** 0\
**Last updated:** [May 18, 2010, 12:03pm UTC](https://www.ruby-forum.com/t/jobs-santa-barbara-ror-entrepreneur-job-opening/188776 "2010-05-18T12:03:52Z")

</div>

Good Afternoon! There is an entrepreneurial job opening in Santa Barbara, CA for individuals who are strong with Ruby on Rails that I wanted to share with you. If the right person for this job is not in Santa Barbara,…

---

## [ActiveResource Mock Objects](https://www.ruby-forum.com/t/activeresource-mock-objects/188666)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [May 18, 2010, 11:34am UTC](https://www.ruby-forum.com/t/activeresource-mock-objects/188666 "2010-05-18T11:34:36Z")

</div>

Some of my tests use ActiveResource HttpMock requests and some of them do not. Does anyone know if there is a way to disable the HttpMocks after they have already been loaded? The method ActiveResource::HttpMock.res…

---

## [Pat Shaughnessy's Paperclit problem](https://www.ruby-forum.com/t/pat-shaughnessys-paperclit-problem/188774)

<div class="topic-metadata">

**Author:** [@tom](https://www.ruby-forum.com/u/tom)\
**Replies:** 0\
**Last updated:** [May 18, 2010, 10:53am UTC](https://www.ruby-forum.com/t/pat-shaughnessys-paperclit-problem/188774 "2010-05-18T10:53:03Z")

</div>

I’m using Pat Shaughnessy’s paperclip cause I need to store pictures in database. When I set :storage =\> :database in the avatar I get an error when starting server: C:/Ruby/lib/ruby/gems/1.8/gems/paperclip-2.2.6/lib…

---

## [NameError in CompetitorsController#index](https://www.ruby-forum.com/t/nameerror-in-competitorscontroller-index/188640)

<div class="topic-metadata">

**Author:** [@manish](https://www.ruby-forum.com/u/manish)\
**Replies:** 5\
**Last updated:** [May 18, 2010, 10:27am UTC](https://www.ruby-forum.com/t/nameerror-in-competitorscontroller-index/188640 "2010-05-18T10:27:53Z")

</div>

Hi all I am getting this problem when I run this code in server. In my localhost everything is running fine. But when I deploy my code in the server it shows me the error. I am using FERRET SERARCH IN MODEL. NameErro…

---

## ["end of file" error for "net/https"](https://www.ruby-forum.com/t/end-of-file-error-for-net-https/188735)

<div class="topic-metadata">

**Author:** [@miked](https://www.ruby-forum.com/u/miked)\
**Replies:** 2\
**Last updated:** [May 18, 2010, 9:49am UTC](https://www.ruby-forum.com/t/end-of-file-error-for-net-https/188735 "2010-05-18T09:49:14Z")

</div>

Hi, I have written following code:- It is working fine for http protocol. But whenever I am doing for https I getting an error “end of file reached”. Can anyone tell me what is wrong with the code? def email\_to\_frie…

---

## [Newby Ruby question, how to I test to know if a method that returns true or false has done so?](https://www.ruby-forum.com/t/newby-ruby-question-how-to-i-test-to-know-if-a-method-that-returns-true-or-false-has-done-so/188765)

<div class="topic-metadata">

**Author:** [@ptremblett](https://www.ruby-forum.com/u/ptremblett)\
**Replies:** 4\
**Last updated:** [May 18, 2010, 9:46am UTC](https://www.ruby-forum.com/t/newby-ruby-question-how-to-i-test-to-know-if-a-method-that-returns-true-or-false-has-done-so/188765 "2010-05-18T09:46:19Z")

</div>

I am testing for the existence of records on a database. If I use: Mapper.exists?(product.id) How do I test if the condition returned was true or false? Thanks in advance. Paul Thompson

---

## [No such file to load -- thread (LoadError)](https://www.ruby-forum.com/t/no-such-file-to-load-thread-loaderror/188769)

<div class="topic-metadata">

**Author:** [@Rahul\_Chaudhari](https://www.ruby-forum.com/u/Rahul_Chaudhari)\
**Replies:** 0\
**Last updated:** [May 18, 2010, 9:11am UTC](https://www.ruby-forum.com/t/no-such-file-to-load-thread-loaderror/188769 "2010-05-18T09:11:11Z")

</div>

Hi All, I removed all my rails and then ruby installation using sudo apt-get remove and by deleting all gem and ruby folder manually. Then I installed ruby. And tried to install gem(1.3.5 and1.3.6 also) using ruby s…

---

## [Gem are missing](https://www.ruby-forum.com/t/gem-are-missing/188752)

<div class="topic-metadata">

**Author:** [@Rahul\_Chaudhari](https://www.ruby-forum.com/u/Rahul_Chaudhari)\
**Replies:** 3\
**Last updated:** [May 18, 2010, 9:07am UTC](https://www.ruby-forum.com/t/gem-are-missing/188752 "2010-05-18T09:07:05Z")

</div>

Hi All, I am facing problem in installing gem for my application. I installed all application dependent gem using rake gems:install but still it showing some gem are missing ever if I installed gem manually(sudo gem …

---

## [Active record is not releaed used memory](https://www.ruby-forum.com/t/active-record-is-not-releaed-used-memory/188768)

<div class="topic-metadata">

**Author:** [@jmanivannancse](https://www.ruby-forum.com/u/jmanivannancse)\
**Replies:** 0\
**Last updated:** [May 18, 2010, 8:53am UTC](https://www.ruby-forum.com/t/active-record-is-not-releaed-used-memory/188768 "2010-05-18T08:53:35Z")

</div>

I have tried small ruby program like require ‘rubygems’ require ‘postgres’ db = PGconn.connect(‘localhost’, 5432, ‘’, ‘’, ‘prdjnj’,‘postgres’, ‘postgres’) res=db.exec(“select \* from users limit 300000”) res.clear …

---

## [How to change one attribute (or a group of attributes) when another changes?](https://www.ruby-forum.com/t/how-to-change-one-attribute-or-a-group-of-attributes-when-another-changes/188719)

<div class="topic-metadata">

**Author:** [@chewmanfoo](https://www.ruby-forum.com/u/chewmanfoo)\
**Replies:** 4\
**Last updated:** [May 18, 2010, 1:31am UTC](https://www.ruby-forum.com/t/how-to-change-one-attribute-or-a-group-of-attributes-when-another-changes/188719 "2010-05-18T01:31:31Z")

</div>

I have a hosts class with an ip\_addresses class which has a host\_id attribute. All hosts are associated with a data\_center, and all ip\_addresses are associated with a network. Networks have a standard IP network def…

---

## [\[JOBS\] Ruby on Rails Developer @ SideReel.com](https://www.ruby-forum.com/t/jobs-ruby-on-rails-developer-sidereel-com/188756)

<div class="topic-metadata">

**Author:** [@Rob\_Morgan](https://www.ruby-forum.com/u/Rob_Morgan)\
**Replies:** 0\
**Last updated:** [May 18, 2010, 1:14am UTC](https://www.ruby-forum.com/t/jobs-ruby-on-rails-developer-sidereel-com/188756 "2010-05-18T01:14:45Z")

</div>

Hi all, SideReel is looking for a talented Ruby on Rails developer to join our engineering team in San Francisco. If you haven’t used SideReel before, our mission is to give users the power to track and watch any sho…

---

## [1000 inserts efficiently?](https://www.ruby-forum.com/t/1000-inserts-efficiently/188747)

<div class="topic-metadata">

**Author:** [@saptah](https://www.ruby-forum.com/u/saptah)\
**Replies:** 2\
**Last updated:** [May 18, 2010, 12:11am UTC](https://www.ruby-forum.com/t/1000-inserts-efficiently/188747 "2010-05-18T00:11:32Z")

</div>

Hi guys, I’m new with RoR, and so far I’m loving it. I got a question: ¿How is the most efficient way to insert 1000 records on the same table? I’m trying to insert allot of “items” on the same table, but, right now…

---

## [Undefined method 'define\_a\_column' for class 'OCI8::Cursor'](https://www.ruby-forum.com/t/undefined-method-define-a-column-for-class-oci8-cursor/163567)

<div class="topic-metadata">

**Author:** [@pepe](https://www.ruby-forum.com/u/pepe)\
**Replies:** 4\
**Last updated:** [May 17, 2010, 8:41pm UTC](https://www.ruby-forum.com/t/undefined-method-define-a-column-for-class-oci8-cursor/163567 "2010-05-17T20:41:58Z")

</div>

Hello. Tired of searching and finding nothing useful. Moving application to laptop for trip. Installed: Ruby (1.8.6, patchlevel 111) Rails (2.2.2) Oracle adapter (1.0.0.9250) ruby-oci8 (2.0.1) Oracle 10g Express Edit…

---

## [Rails 3 and html\_safe](https://www.ruby-forum.com/t/rails-3-and-html-safe/188664)

<div class="topic-metadata">

**Author:** [@rob](https://www.ruby-forum.com/u/rob)\
**Replies:** 4\
**Last updated:** [May 17, 2010, 8:11pm UTC](https://www.ruby-forum.com/t/rails-3-and-html-safe/188664 "2010-05-17T20:11:33Z")

</div>

Is it just me or is html\_safe a massive pain in the arse? Just trying to do a simple helper. def messages messages = ‘’ \[:error, :notice\].each do |t| if flash\[t\] messages \<\< content\_tag(:p, flash\[t\], :class =\> t) …

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

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