# Rails

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

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

---

## [Template is missing, latest edge](https://www.ruby-forum.com/t/template-is-missing-latest-edge/167711)

<div class="topic-metadata">

**Author:** [@crossblaim](https://www.ruby-forum.com/u/crossblaim)\
**Replies:** 0\
**Last updated:** [May 11, 2009, 8:39pm UTC](https://www.ruby-forum.com/t/template-is-missing-latest-edge/167711 "2009-05-11T20:39:16Z")

</div>

hi everyone, I have a project that is using a good snapshot of edge, however I tried some latest rails builds and I got some weird errors. when using a respond\_to block in a controller, rails isn’t able to find the r…

---

## [Encrypting large amounts of text](https://www.ruby-forum.com/t/encrypting-large-amounts-of-text/167307)

<div class="topic-metadata">

**Author:** [@simon1](https://www.ruby-forum.com/u/simon1)\
**Replies:** 4\
**Last updated:** [May 11, 2009, 8:12pm UTC](https://www.ruby-forum.com/t/encrypting-large-amounts-of-text/167307 "2009-05-11T20:12:13Z")

</div>

Hi, I have an application where I want to be able to encrypt large amounts of text before storing them to my DB (MySQL Text field - might be switched to a Blob). I have an idea of how to do this, but was wondering w…

---

## [Can't find YAML file via code (though it exists in /app)](https://www.ruby-forum.com/t/cant-find-yaml-file-via-code-though-it-exists-in-app/167662)

<div class="topic-metadata">

**Author:** [@ahad](https://www.ruby-forum.com/u/ahad)\
**Replies:** 3\
**Last updated:** [May 11, 2009, 7:32pm UTC](https://www.ruby-forum.com/t/cant-find-yaml-file-via-code-though-it-exists-in-app/167662 "2009-05-11T19:32:26Z")

</div>

Hey guys, I’m trying to access a YAML file to set up some options in a select drop-down that was previously hard-coded. I have the following in my controller: require “yaml” require “pp” require “util” require “da…

---

## [Updating join table (HMT) with checkbox and extra fields](https://www.ruby-forum.com/t/updating-join-table-hmt-with-checkbox-and-extra-fields/167701)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [May 11, 2009, 6:44pm UTC](https://www.ruby-forum.com/t/updating-join-table-hmt-with-checkbox-and-extra-fields/167701 "2009-05-11T18:44:08Z")

</div>

Hi, I’ve been breaking my head over this thing with no success. Here is my table layout - class User \< AR has\_many :memberships has\_many :groups, :through =\> :memberships … class Group \< AR has\_many :memberships …

---

## [Page refreshed as a whole instead of a specific element](https://www.ruby-forum.com/t/page-refreshed-as-a-whole-instead-of-a-specific-element/167683)

<div class="topic-metadata">

**Author:** [@najam](https://www.ruby-forum.com/u/najam)\
**Replies:** 3\
**Last updated:** [May 11, 2009, 6:13pm UTC](https://www.ruby-forum.com/t/page-refreshed-as-a-whole-instead-of-a-specific-element/167683 "2009-05-11T18:13:58Z")

</div>

I am a new one to rails. I have a problem with link\_to\_remote. I have a calenedar on my web page, user selects a date and controllers returns a report related to that specific date. The whole process is working except…

---

## [HABTM: AND on associated table records](https://www.ruby-forum.com/t/habtm-and-on-associated-table-records/167656)

<div class="topic-metadata">

**Author:** [@serpico](https://www.ruby-forum.com/u/serpico)\
**Replies:** 3\
**Last updated:** [May 11, 2009, 5:52pm UTC](https://www.ruby-forum.com/t/habtm-and-on-associated-table-records/167656 "2009-05-11T17:52:03Z")

</div>

In my application i have the following models: Item - has\_and\_belongs\_to\_many :orders Order - has\_and\_belongs\_to\_many :items This is a basic setup for a small shopping app, I can successfully add/remove/edit a list o…

---

## [Open Positions - Ruby / Software Developers - Washington, DC (no telecommuting)](https://www.ruby-forum.com/t/open-positions-ruby-software-developers-washington-dc-no-telecommuting/167696)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [May 11, 2009, 5:48pm UTC](https://www.ruby-forum.com/t/open-positions-ruby-software-developers-washington-dc-no-telecommuting/167696 "2009-05-11T17:48:32Z")

</div>

Hello all - Wanted to share this excellent position (multiple openings) for a strong software developer - Ruby experience points to the type of folks we’re looking for. You also must have excellent communications sk…

---

## [Using OpenSSL blowfish algorithm](https://www.ruby-forum.com/t/using-openssl-blowfish-algorithm/167695)

<div class="topic-metadata">

**Author:** [@simon1](https://www.ruby-forum.com/u/simon1)\
**Replies:** 0\
**Last updated:** [May 11, 2009, 5:46pm UTC](https://www.ruby-forum.com/t/using-openssl-blowfish-algorithm/167695 "2009-05-11T17:46:11Z")

</div>

Hi, Just wondering if anybody is familiar with how this is implemented? In particular, if there is a way to set the key size to something larger than the default (ie, set it for 256-bit). If I generate a key of this…

---

## [Problem with find with :joins and :include in same call](https://www.ruby-forum.com/t/problem-with-find-with-joins-and-include-in-same-call/167642)

<div class="topic-metadata">

**Author:** [@starmaerker](https://www.ruby-forum.com/u/starmaerker)\
**Replies:** 5\
**Last updated:** [May 11, 2009, 4:54pm UTC](https://www.ruby-forum.com/t/problem-with-find-with-joins-and-include-in-same-call/167642 "2009-05-11T16:54:28Z")

</div>

Hi all, I am investigating moving our app from Rails 2.2.2 to Rails 2.3.2. So far doesn’t look too bad, but I am running in to one problem. In a model I have the following named scope: named\_scope :valid, {:include =\>…

---

## [How to validate a patch submitted to rails core using .git](https://www.ruby-forum.com/t/how-to-validate-a-patch-submitted-to-rails-core-using-git/167686)

<div class="topic-metadata">

**Author:** [@dorelal](https://www.ruby-forum.com/u/dorelal)\
**Replies:** 2\
**Last updated:** [May 11, 2009, 4:10pm UTC](https://www.ruby-forum.com/t/how-to-validate-a-patch-submitted-to-rails-core-using-git/167686 "2009-05-11T16:10:01Z")

</div>

This is what I did. I have Rails 2.3.2 installed. rails demo ruby script/generate scaffold User name:string rake db:create rake db:migrate ruby script/console Loading development environment (Rails 2.3.2) User.…

---

## [Multi level asociations](https://www.ruby-forum.com/t/multi-level-asociations/167601)

<div class="topic-metadata">

**Author:** [@tandrei](https://www.ruby-forum.com/u/tandrei)\
**Replies:** 3\
**Last updated:** [May 11, 2009, 3:56pm UTC](https://www.ruby-forum.com/t/multi-level-asociations/167601 "2009-05-11T15:56:17Z")

</div>

Hi guys, I have this issue on RoR associations: have a ‘has many’ relationship cascade, on many levels. I need to display data across multiple tables, sort like a ‘sql table view’. I could accomplish this only up to a …

---

## [Function to check a value exists or not in array in RoR](https://www.ruby-forum.com/t/function-to-check-a-value-exists-or-not-in-array-in-ror/167684)

<div class="topic-metadata">

**Author:** [@venkat\_ruby](https://www.ruby-forum.com/u/venkat_ruby)\
**Replies:** 2\
**Last updated:** [May 11, 2009, 3:28pm UTC](https://www.ruby-forum.com/t/function-to-check-a-value-exists-or-not-in-array-in-ror/167684 "2009-05-11T15:28:11Z")

</div>

Hello, I need a function “to check a value exists or not in array” in RoR Please help…

---

## [Status: 500 Internal Server Error when running mongrel](https://www.ruby-forum.com/t/status-500-internal-server-error-when-running-mongrel/167685)

<div class="topic-metadata">

**Author:** [@9tailsfox](https://www.ruby-forum.com/u/9tailsfox)\
**Replies:** 2\
**Last updated:** [May 11, 2009, 3:08pm UTC](https://www.ruby-forum.com/t/status-500-internal-server-error-when-running-mongrel/167685 "2009-05-11T15:08:25Z")

</div>

Hello everyone! I try run simple RoR application, I go to RoR default “hello page”,but I got error, when trying to open new views. Status: 500 Internal Server Error could not open database: unable to open database fi…

---

## [Caches\_page caching a javascript response](https://www.ruby-forum.com/t/caches-page-caching-a-javascript-response/167679)

<div class="topic-metadata">

**Author:** [@diarmuid](https://www.ruby-forum.com/u/diarmuid)\
**Replies:** 3\
**Last updated:** [May 11, 2009, 2:49pm UTC](https://www.ruby-forum.com/t/caches-page-caching-a-javascript-response/167679 "2009-05-11T14:49:47Z")

</div>

I am using caches\_page to cache a controller action which returns javascript caches\_page :show\_county def show\_county @county = County.find(params\[:id\]) respond\_to do |format| format.js end However when I hit the…

---

## [Find :all in subclass within STI finds parents instead](https://www.ruby-forum.com/t/find-all-in-subclass-within-sti-finds-parents-instead/167670)

<div class="topic-metadata">

**Author:** [@patrick](https://www.ruby-forum.com/u/patrick)\
**Replies:** 1\
**Last updated:** [May 11, 2009, 2:48pm UTC](https://www.ruby-forum.com/t/find-all-in-subclass-within-sti-finds-parents-instead/167670 "2009-05-11T14:48:36Z")

</div>

All, I am relative new to Rails and struggle with following STI issue: A parent class “Reading” has many subclasses “ElectricityReading”, “GasReading”, … I wrote a method in the Reading class to update calculated col…

---

## [Daemons load activesupport 2.2.2 instead of 2.1.0, causing failure](https://www.ruby-forum.com/t/daemons-load-activesupport-2-2-2-instead-of-2-1-0-causing-failure/167665)

<div class="topic-metadata">

**Author:** [@ram](https://www.ruby-forum.com/u/ram)\
**Replies:** 3\
**Last updated:** [May 11, 2009, 2:45pm UTC](https://www.ruby-forum.com/t/daemons-load-activesupport-2-2-2-instead-of-2-1-0-causing-failure/167665 "2009-05-11T14:45:40Z")

</div>

Hi, I have a couple of daemons that im trying to setup to be run for my app. The environment load is as follows… ENV\[“RAILS\_ENV”\] ||= “development” require File.join(File.dirname(FILE), “/…/…/config/environment”) An…

---

## [Looping the worksheets opened with parseexcel](https://www.ruby-forum.com/t/looping-the-worksheets-opened-with-parseexcel/167676)

<div class="topic-metadata">

**Author:** [@MrSBless](https://www.ruby-forum.com/u/MrSBless)\
**Replies:** 0\
**Last updated:** [May 11, 2009, 12:19pm UTC](https://www.ruby-forum.com/t/looping-the-worksheets-opened-with-parseexcel/167676 "2009-05-11T12:19:19Z")

</div>

Hi everybody. Can anyone suggest me how to loop through the worksheets opened via parseexcel.

---

## [STI and subclassing twice](https://www.ruby-forum.com/t/sti-and-subclassing-twice/167488)

<div class="topic-metadata">

**Author:** [@ji123](https://www.ruby-forum.com/u/ji123)\
**Replies:** 3\
**Last updated:** [May 11, 2009, 12:08pm UTC](https://www.ruby-forum.com/t/sti-and-subclassing-twice/167488 "2009-05-11T12:08:26Z")

</div>

I’m trying using STI to implement a hiearchy similar to this: script/generate scaffold name:string type:string class Person \< ActiveRecord::Base; end class Customer \< Person; end class Employee \< Person; end class D…

---

## [Periodically autosave form](https://www.ruby-forum.com/t/periodically-autosave-form/167542)

<div class="topic-metadata">

**Author:** [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Replies:** 3\
**Last updated:** [May 11, 2009, 11:54am UTC](https://www.ruby-forum.com/t/periodically-autosave-form/167542 "2009-05-11T11:54:06Z")

</div>

Would someone show how to implement a periodical save of a form in the background? Same kinda thing that gmail does. I would like to autosave a form ajax wise so a technician in the field would have it saved off in …

---

## [Prevent HTML input](https://www.ruby-forum.com/t/prevent-html-input/167552)

<div class="topic-metadata">

**Author:** [@pankaj](https://www.ruby-forum.com/u/pankaj)\
**Replies:** 9\
**Last updated:** [May 11, 2009, 11:27am UTC](https://www.ruby-forum.com/t/prevent-html-input/167552 "2009-05-11T11:27:40Z")

</div>

Hi all, Is there any plugin to prevent html form accepting HTML in the input, throughout the application. Regards, Pankaj

---

## [Filter\_parameter\_logging for multi model forms](https://www.ruby-forum.com/t/filter-parameter-logging-for-multi-model-forms/167478)

<div class="topic-metadata">

**Author:** [@ram](https://www.ruby-forum.com/u/ram)\
**Replies:** 1\
**Last updated:** [May 11, 2009, 11:18am UTC](https://www.ruby-forum.com/t/filter-parameter-logging-for-multi-model-forms/167478 "2009-05-11T11:18:18Z")

</div>

Hi all, I have a multi model form setup in the classic Ryan B. Complex forms style (#73 Complex Forms Part 1 - RailsCasts) for my signup page. The two models in this are the Account model and the User model and this …

---

## [Replace a form\_for and f.submit with a link\_to](https://www.ruby-forum.com/t/replace-a-form-for-and-f-submit-with-a-link-to/142724)

<div class="topic-metadata">

**Author:** [@chunkyslink](https://www.ruby-forum.com/u/chunkyslink)\
**Replies:** 1\
**Last updated:** [May 11, 2009, 11:06am UTC](https://www.ruby-forum.com/t/replace-a-form-for-and-f-submit-with-a-link-to/142724 "2009-05-11T11:06:30Z")

</div>

I have a helper which puts a form\_for in the view (from holding it in an ERB tag). It looks like this; ERB.new(%{ \<% form\_for(following, :url =\> user\_follower\_path(followee, follower)) do |f| %\> \<%= f.hidden\_field :…

---

## [Do we usually use Iconv to do translate to various encodings](https://www.ruby-forum.com/t/do-we-usually-use-iconv-to-do-translate-to-various-encodings/167674)

<div class="topic-metadata">

**Author:** [@jianlin](https://www.ruby-forum.com/u/jianlin)\
**Replies:** 0\
**Last updated:** [May 11, 2009, 11:04am UTC](https://www.ruby-forum.com/t/do-we-usually-use-iconv-to-do-translate-to-various-encodings/167674 "2009-05-11T11:04:13Z")

</div>

I wonder if we usually use Iconv to translate to various encoding? For example: Iconv.conv(“UTF-8”, “BIG-5”, content) or Iconv.conv(“UTF-8”, “CP950”, content) or do we usually use other packages? One reason is tha…

---

## [InvalidAuthenticityToken on login (sometimes)](https://www.ruby-forum.com/t/invalidauthenticitytoken-on-login-sometimes/167664)

<div class="topic-metadata">

**Author:** [@stefankroes](https://www.ruby-forum.com/u/stefankroes)\
**Replies:** 0\
**Last updated:** [May 11, 2009, 9:48am UTC](https://www.ruby-forum.com/t/invalidauthenticitytoken-on-login-sometimes/167664 "2009-05-11T09:48:11Z")

</div>

Hi! I have a Rails site in production and every once in a while a user can’t login because of an invalid authenticity token, most of the time it works fine though. Could this be something to do with character encodin…

---

## [I need help](https://www.ruby-forum.com/t/i-need-help/167653)

<div class="topic-metadata">

**Author:** [@komeng](https://www.ruby-forum.com/u/komeng)\
**Replies:** 4\
**Last updated:** [May 11, 2009, 9:40am UTC](https://www.ruby-forum.com/t/i-need-help/167653 "2009-05-11T09:40:34Z")

</div>

Hye… Im new here and very interested in Ruby… But I have problem installing it, or configuration with WEbrick… i used this website as example to follow… The problem is, when I run the “ruby script\\server” command, t…

---

## [Ruby or Rails bug?](https://www.ruby-forum.com/t/ruby-or-rails-bug/167083)

<div class="topic-metadata">

**Author:** [@giga](https://www.ruby-forum.com/u/giga)\
**Replies:** 13\
**Last updated:** [May 11, 2009, 9:33am UTC](https://www.ruby-forum.com/t/ruby-or-rails-bug/167083 "2009-05-11T09:33:14Z")

</div>

In irb all works fine: irb irb(main):001:0\> require ‘rubygems’ =\> true irb(main):002:0\> require ‘raspell’ =\> true irb(main):003:0\> speller = Aspell.new(“ru\_RU”) =\> #Aspell:0x7f8692c9d158 irb(main):004:0\> speller.s…

---

## [Not to expose the code in production](https://www.ruby-forum.com/t/not-to-expose-the-code-in-production/167661)

<div class="topic-metadata">

**Author:** [@syedarif](https://www.ruby-forum.com/u/syedarif)\
**Replies:** 0\
**Last updated:** [May 11, 2009, 9:15am UTC](https://www.ruby-forum.com/t/not-to-expose-the-code-in-production/167661 "2009-05-11T09:15:09Z")

</div>

Rails is rocking!! Any idea on how to hide the rails code in the form of some executable in the production environment, as it is highly vulnerable and the code is getting exposed to the outer world. Any alternative w…

---

## [Has\_and\_belongs\_to\_many INSERT duplicate entry](https://www.ruby-forum.com/t/has-and-belongs-to-many-insert-duplicate-entry/103733)

<div class="topic-metadata">

**Author:** [@fero](https://www.ruby-forum.com/u/fero)\
**Replies:** 6\
**Last updated:** [May 11, 2009, 9:12am UTC](https://www.ruby-forum.com/t/has-and-belongs-to-many-insert-duplicate-entry/103733 "2009-05-11T09:12:25Z")

</div>

hello folks. please help with the issue: i got something like this: class Product \< ActiveRecord::Base has\_and\_belongs\_to\_many :groups def nice\_method(x) self.groups \<\< Group.find(x) \<--------------- HERE! …

---

## [Getting the friends contacts mail Id of gmail,hotmail,yahoo,myspace in RoR](https://www.ruby-forum.com/t/getting-the-friends-contacts-mail-id-of-gmail-hotmail-yahoo-myspace-in-ror/137790)

<div class="topic-metadata">

**Author:** [@Raj\_4\_PHP\_and\_RoR](https://www.ruby-forum.com/u/Raj_4_PHP_and_RoR)\
**Replies:** 5\
**Last updated:** [May 11, 2009, 9:02am UTC](https://www.ruby-forum.com/t/getting-the-friends-contacts-mail-id-of-gmail-hotmail-yahoo-myspace-in-ror/137790 "2009-05-11T09:02:08Z")

</div>

Hello friends, I am developing an application in RoR. After registration in this application I follow the following steps: Enter the hotmail,gmail,aol email id. Enter password according to that mail id. After submit…

---

## [Hash#merge in a controller](https://www.ruby-forum.com/t/hash-merge-in-a-controller/167561)

<div class="topic-metadata">

**Author:** [@albertosesena](https://www.ruby-forum.com/u/albertosesena)\
**Replies:** 2\
**Last updated:** [May 11, 2009, 3:30am UTC](https://www.ruby-forum.com/t/hash-merge-in-a-controller/167561 "2009-05-11T03:30:39Z")

</div>

Hi all! I have a Place model with a description attribute and a Service model with an itinerary attribute. An itinerary is simply a string with dash-seprated place descriptions. In my services\_controller.rb#create i …

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

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