# Rails

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

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

---

## [Iso-8859-1 no effect in browser](https://www.ruby-forum.com/t/iso-8859-1-no-effect-in-browser/168798)

<div class="topic-metadata">

**Author:** [@tivrfoa](https://www.ruby-forum.com/u/tivrfoa)\
**Replies:** 7\
**Last updated:** [May 28, 2009, 5:10pm UTC](https://www.ruby-forum.com/t/iso-8859-1-no-effect-in-browser/168798 "2009-05-28T17:10:24Z")

</div>

hi folks! I want to use characters with accent, like: é, ç, ã, ô. Then I changed from UTF-8 to iso-8859-1, so I can use é direct, instead of é The strange is that when I go in View -\> Codification, it is marked …

---

## [Extending Rails Classes - Where?](https://www.ruby-forum.com/t/extending-rails-classes-where/168987)

<div class="topic-metadata">

**Author:** [@brian](https://www.ruby-forum.com/u/brian)\
**Replies:** 6\
**Last updated:** [May 28, 2009, 5:00pm UTC](https://www.ruby-forum.com/t/extending-rails-classes-where/168987 "2009-05-28T17:00:25Z")

</div>

Where is the best place to stash Ruby files that add functionality to Rails classes (in my case, ActiveRecord::Base)? I think my module is being loaded too late, and causing a class method to be undefined. Here’s wha…

---

## [Use constants from module in view](https://www.ruby-forum.com/t/use-constants-from-module-in-view/168993)

<div class="topic-metadata">

**Author:** [@shenry](https://www.ruby-forum.com/u/shenry)\
**Replies:** 2\
**Last updated:** [May 28, 2009, 4:56pm UTC](https://www.ruby-forum.com/t/use-constants-from-module-in-view/168993 "2009-05-28T16:56:53Z")

</div>

I have a constant.rb file in lib/ with: module Constants FOO = %w( tastes great) BAR = %w( less filling) end I’m able to access the constants fine in my Model, but I’m also using them to populate select boxes in a …

---

## [Turn off model pre-loading in production environment?](https://www.ruby-forum.com/t/turn-off-model-pre-loading-in-production-environment/169023)

<div class="topic-metadata">

**Author:** [@simonsaid](https://www.ruby-forum.com/u/simonsaid)\
**Replies:** 4\
**Last updated:** [May 28, 2009, 4:26pm UTC](https://www.ruby-forum.com/t/turn-off-model-pre-loading-in-production-environment/169023 "2009-05-28T16:26:54Z")

</div>

Hello, How can i turn off model pre-loading in production environment so that the app loads the code the exact same way as in the development environment? Thanks!

---

## [Hostgator 404 errors](https://www.ruby-forum.com/t/hostgator-404-errors/169032)

<div class="topic-metadata">

**Author:** [@milandobrota](https://www.ruby-forum.com/u/milandobrota)\
**Replies:** 0\
**Last updated:** [May 28, 2009, 4:20pm UTC](https://www.ruby-forum.com/t/hostgator-404-errors/169032 "2009-05-28T16:20:32Z")

</div>

Has anybody deployed on Hostgator? I keep getting 404 errors. My sample application works OK, but when I tried to deploy the real app, it wouldn’t work.

---

## [Change number of pages in paging](https://www.ruby-forum.com/t/change-number-of-pages-in-paging/169009)

<div class="topic-metadata">

**Author:** [@fRAnKEnSTEin](https://www.ruby-forum.com/u/fRAnKEnSTEin)\
**Replies:** 1\
**Last updated:** [May 28, 2009, 4:16pm UTC](https://www.ruby-forum.com/t/change-number-of-pages-in-paging/169009 "2009-05-28T16:16:15Z")

</div>

Hi there, At this moment will\_paginate is showing so many page numbers , for example: \<\< Previous 1 2 3 4 5 6 7 8 9 10 … 113 114 next \>\> I want to configure this, so it will look like: \<\< Previous 1 2 3 4 5 … 113 11…

---

## [Has\_one :through saving](https://www.ruby-forum.com/t/has-one-through-saving/169007)

<div class="topic-metadata">

**Author:** [@xinit](https://www.ruby-forum.com/u/xinit)\
**Replies:** 1\
**Last updated:** [May 28, 2009, 4:10pm UTC](https://www.ruby-forum.com/t/has-one-through-saving/169007 "2009-05-28T16:10:55Z")

</div>

Hi all, I’m having issues with a has\_one :through relationship. I have a setup where “Ticket has\_one :show, :though =\> :pool”. The thing worked, but what I noticed is that as soon as my ticket is saved, the show is al…

---

## [Transaction to DB in session](https://www.ruby-forum.com/t/transaction-to-db-in-session/169028)

<div class="topic-metadata">

**Author:** [@chandramit](https://www.ruby-forum.com/u/chandramit)\
**Replies:** 0\
**Last updated:** [May 28, 2009, 3:56pm UTC](https://www.ruby-forum.com/t/transaction-to-db-in-session/169028 "2009-05-28T15:56:04Z")

</div>

HI I have few forms with respect to their database table,as it is working fine in normal flow but what if user enters few forms and clicks back button in the browser,is there a way to handle it 2)what if i need to e…

---

## [How to use Net::SSH](https://www.ruby-forum.com/t/how-to-use-net-ssh/165009)

<div class="topic-metadata">

**Author:** [@Shripad](https://www.ruby-forum.com/u/Shripad)\
**Replies:** 7\
**Last updated:** [May 28, 2009, 3:55pm UTC](https://www.ruby-forum.com/t/how-to-use-net-ssh/165009 "2009-05-28T15:55:34Z")

</div>

Hi all, I am having following code in ruby require ‘net/ssh’ require ‘net/sftp’ begin Net::SSH.start (‘132.147.161.159’,:password=\>‘k’,:port=\>1234,:username=\>‘k’) do |ssh| ssh.sftp.connect do |sftp| Dir.foreach(’…

---

## [Developing with GNU Screen](https://www.ruby-forum.com/t/developing-with-gnu-screen/168889)

<div class="topic-metadata">

**Author:** [@Hunt\_J](https://www.ruby-forum.com/u/Hunt_J)\
**Replies:** 3\
**Last updated:** [May 28, 2009, 3:55pm UTC](https://www.ruby-forum.com/t/developing-with-gnu-screen/168889 "2009-05-28T15:55:34Z")

</div>

I hear a lot say GNU Screen is better than Terminal’s tabs. But I cannot find a real use case. I can understand that ability to copy and paste is useful. But in terms of session attaching/detaching, all the sessions …

---

## [Watir without -jssh extension](https://www.ruby-forum.com/t/watir-without-jssh-extension/169024)

<div class="topic-metadata">

**Author:** [@saurabhpurnaye](https://www.ruby-forum.com/u/saurabhpurnaye)\
**Replies:** 0\
**Last updated:** [May 28, 2009, 3:30pm UTC](https://www.ruby-forum.com/t/watir-without-jssh-extension/169024 "2009-05-28T15:30:56Z")

</div>

Hi All, Is there any way to run watir/firewatir without having -jssh extension for firefox??? If so plz suggest me. Thanks in advance, Saurabh

---

## [Intercepting form submission](https://www.ruby-forum.com/t/intercepting-form-submission/169020)

<div class="topic-metadata">

**Author:** [@JannaB](https://www.ruby-forum.com/u/JannaB)\
**Replies:** 1\
**Last updated:** [May 28, 2009, 2:55pm UTC](https://www.ruby-forum.com/t/intercepting-form-submission/169020 "2009-05-28T14:55:46Z")

</div>

Where (what function name must I insert in my controller, I assume) can I obtain the selected value from a field in a form, to process and change it before it gets written to the model’s table in the db? Thanks, Janna…

---

## [Pretty Code](https://www.ruby-forum.com/t/pretty-code/169021)

<div class="topic-metadata">

**Author:** [@JannaB](https://www.ruby-forum.com/u/JannaB)\
**Replies:** 0\
**Last updated:** [May 28, 2009, 2:26pm UTC](https://www.ruby-forum.com/t/pretty-code/169021 "2009-05-28T14:26:45Z")

</div>

Is there something to “prettyify” .rb files?

---

## [ROR based web application over existing Java application](https://www.ruby-forum.com/t/ror-based-web-application-over-existing-java-application/168985)

<div class="topic-metadata">

**Author:** [@Ritvvij](https://www.ruby-forum.com/u/Ritvvij)\
**Replies:** 2\
**Last updated:** [May 28, 2009, 1:47pm UTC](https://www.ruby-forum.com/t/ror-based-web-application-over-existing-java-application/168985 "2009-05-28T13:47:58Z")

</div>

Hello everyone, We have an existing application in core java. We want to know extend the application to be accessible over the Internet. We were thinking of using Ruby on Rails to develop the front end for the applica…

---

## [How to use fusion charts in ror](https://www.ruby-forum.com/t/how-to-use-fusion-charts-in-ror/168809)

<div class="topic-metadata">

**Author:** [@kiranshadow](https://www.ruby-forum.com/u/kiranshadow)\
**Replies:** 9\
**Last updated:** [May 28, 2009, 1:32pm UTC](https://www.ruby-forum.com/t/how-to-use-fusion-charts-in-ror/168809 "2009-05-28T13:32:24Z")

</div>

hi this is kiran can anyone help how to use angular fusion charts in ror iam using rails 1.2.6 version do i need to use any plugin for angular fusion charts

---

## [Turn Massive Array into new Objects](https://www.ruby-forum.com/t/turn-massive-array-into-new-objects/169015)

<div class="topic-metadata">

**Author:** [@nik](https://www.ruby-forum.com/u/nik)\
**Replies:** 1\
**Last updated:** [May 28, 2009, 12:55pm UTC](https://www.ruby-forum.com/t/turn-massive-array-into-new-objects/169015 "2009-05-28T12:55:04Z")

</div>

Hello, So I have this massive array 10k+ items in it b =\>\[“aaa”,“aab”,…,“aba”,“abb”,…“zza”,“zzb”,“zzc”,…,“zzz”\] I need to save them in the Bakery model I tried to do Bakery.find(1) =\>{:id=\>1, :name =\> “afe”} b.ea…

---

## [Db import from some external xml data](https://www.ruby-forum.com/t/db-import-from-some-external-xml-data/169014)

<div class="topic-metadata">

**Author:** [@lecielbleu](https://www.ruby-forum.com/u/lecielbleu)\
**Replies:** 0\
**Last updated:** [May 28, 2009, 12:42pm UTC](https://www.ruby-forum.com/t/db-import-from-some-external-xml-data/169014 "2009-05-28T12:42:42Z")

</div>

Hi , i’m looking for db import from external xml file , which method is usual for this process , should i create new xml file (using rexml) for arrange them or import directly to my db . i’ll work about 4 or 5 externa…

---

## [:has\_many and :after\_save](https://www.ruby-forum.com/t/has-many-and-after-save/169005)

<div class="topic-metadata">

**Author:** [@milandobrota](https://www.ruby-forum.com/u/milandobrota)\
**Replies:** 1\
**Last updated:** [May 28, 2009, 12:26pm UTC](https://www.ruby-forum.com/t/has-many-and-after-save/169005 "2009-05-28T12:26:13Z")

</div>

Having one to many connection (for example post has many comments), what is the most efficient way of saving all comments when post is saved. Using after\_save on Post would introduce the n+1 problem. Is there any way …

---

## [Feedback for plugin: acts\_as\_readonly](https://www.ruby-forum.com/t/feedback-for-plugin-acts-as-readonly/168980)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [May 28, 2009, 12:20pm UTC](https://www.ruby-forum.com/t/feedback-for-plugin-acts-as-readonly/168980 "2009-05-28T12:20:21Z")

</div>

All, I’m just announcing and looking for feedback for a quick little plugin I wrote: acts\_as\_readonly (kevincolyar (Kevin Colyar) · GitHub acts\_as\_readonly/tree/master) Some info: ActsAsReadonly acts\_as\_readonly is…

---

## [Filtering-sorting form](https://www.ruby-forum.com/t/filtering-sorting-form/168920)

<div class="topic-metadata">

**Author:** [@fRAnKEnSTEin](https://www.ruby-forum.com/u/fRAnKEnSTEin)\
**Replies:** 3\
**Last updated:** [May 28, 2009, 11:24am UTC](https://www.ruby-forum.com/t/filtering-sorting-form/168920 "2009-05-28T11:24:28Z")

</div>

Hi there, i have a catalog of products, i am using will paginator for paging the results. now The user can sor the products by: name, price or category, and can filter the products by category and ocation. For doing …

---

## [Code in layout files, and minimizing database usage](https://www.ruby-forum.com/t/code-in-layout-files-and-minimizing-database-usage/168977)

<div class="topic-metadata">

**Author:** [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Replies:** 5\
**Last updated:** [May 28, 2009, 10:24am UTC](https://www.ruby-forum.com/t/code-in-layout-files-and-minimizing-database-usage/168977 "2009-05-28T10:24:33Z")

</div>

So, I’m putting together a blog, and I want the posts on it to be easily browsable by date. So far I’ve given each post attributes for the month and year it was created. That way, when someone visits example.com/blog/…

---

## [Samples on invoking perl scripts from ruby](https://www.ruby-forum.com/t/samples-on-invoking-perl-scripts-from-ruby/168996)

<div class="topic-metadata">

**Author:** [@babu](https://www.ruby-forum.com/u/babu)\
**Replies:** 1\
**Last updated:** [May 28, 2009, 10:18am UTC](https://www.ruby-forum.com/t/samples-on-invoking-perl-scripts-from-ruby/168996 "2009-05-28T10:18:41Z")

</div>

Hi, Can some one point me to sample scripts that will invoke perl scripts from ruby script? Thanks, babu

---

## [Auto\_complete\_result field rather than method?](https://www.ruby-forum.com/t/auto-complete-result-field-rather-than-method/139914)

<div class="topic-metadata">

**Author:** [@tekwiz](https://www.ruby-forum.com/u/tekwiz)\
**Replies:** 1\
**Last updated:** [May 28, 2009, 10:16am UTC](https://www.ruby-forum.com/t/auto-complete-result-field-rather-than-method/139914 "2009-05-28T10:16:37Z")

</div>

I just noticed that the auto\_complete\_result method in the auto\_complete plugin calls the field (as opposed to the method) to generate the result list. Here’s what it is: def auto\_complete\_result(entries, field, phra…

---

## [Two ROR project with one application server , is it possible](https://www.ruby-forum.com/t/two-ror-project-with-one-application-server-is-it-possible/168989)

<div class="topic-metadata">

**Author:** [@mokkai](https://www.ruby-forum.com/u/mokkai)\
**Replies:** 2\
**Last updated:** [May 28, 2009, 9:47am UTC](https://www.ruby-forum.com/t/two-ror-project-with-one-application-server-is-it-possible/168989 "2009-05-28T09:47:37Z")

</div>

two rails project with one application server(only one mongrel) , is it possible ? if yes , then how ?

---

## [City and state from zip code](https://www.ruby-forum.com/t/city-and-state-from-zip-code/168979)

<div class="topic-metadata">

**Author:** [@JannaB](https://www.ruby-forum.com/u/JannaB)\
**Replies:** 3\
**Last updated:** [May 28, 2009, 6:28am UTC](https://www.ruby-forum.com/t/city-and-state-from-zip-code/168979 "2009-05-28T06:28:28Z")

</div>

Anyone aware of a plugin that will return the city and state from a zip code in the US? THanks, Janna B

---

## [Migration issue](https://www.ruby-forum.com/t/migration-issue/168943)

<div class="topic-metadata">

**Author:** [@mk27](https://www.ruby-forum.com/u/mk27)\
**Replies:** 10\
**Last updated:** [May 28, 2009, 6:04am UTC](https://www.ruby-forum.com/t/migration-issue/168943 "2009-05-28T06:04:08Z")

</div>

I was following this set of instructions from the “Cookie overflow?” thread: Your sessions (by default in cookie) needs to be moved to Active record store or memcache store to fix this issue. For Databased sessions: …

---

## [Why does this comment create a compile error](https://www.ruby-forum.com/t/why-does-this-comment-create-a-compile-error/168714)

<div class="topic-metadata">

**Author:** [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Replies:** 3\
**Last updated:** [May 28, 2009, 5:54am UTC](https://www.ruby-forum.com/t/why-does-this-comment-create-a-compile-error/168714 "2009-05-28T05:54:20Z")

</div>

there is a line displayed within \<%= h @stories.inspect %\> and the output was too long, so i changed it to \<%= #h @stories.inspect %\> \<% @stories.each do |s| %\> \<%= h s.inspect %\> \<% end %\> (commenting out the fi…

---

## [A way that helper functions not produce XHTML but HTML?](https://www.ruby-forum.com/t/a-way-that-helper-functions-not-produce-xhtml-but-html/168728)

<div class="topic-metadata">

**Author:** [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Replies:** 32\
**Last updated:** [May 28, 2009, 5:45am UTC](https://www.ruby-forum.com/t/a-way-that-helper-functions-not-produce-xhtml-but-html/168728 "2009-05-28T05:45:42Z")

</div>

I would like to use HTML 4.01 Strict, and used a DOCTYPE of it in my application template. But look like when a style sheet is included by a helper function \<%= stylesheet\_link\_tag ‘style’ %\> the code produced is XHT…

---

## [DB connection problem in production](https://www.ruby-forum.com/t/db-connection-problem-in-production/168507)

<div class="topic-metadata">

**Author:** [@arfon](https://www.ruby-forum.com/u/arfon)\
**Replies:** 1\
**Last updated:** [May 28, 2009, 5:37am UTC](https://www.ruby-forum.com/t/db-connection-problem-in-production/168507 "2009-05-28T05:37:34Z")

</div>

I have a separate DB for one model in my application and in development mode the connection is working properly, in production however it isn’t. production: adapter: mysql host: myhost username: root password: dat…

---

## [Which memcached gem?](https://www.ruby-forum.com/t/which-memcached-gem/143171)

<div class="topic-metadata">

**Author:** [@jdonnell](https://www.ruby-forum.com/u/jdonnell)\
**Replies:** 1\
**Last updated:** [May 28, 2009, 3:17am UTC](https://www.ruby-forum.com/t/which-memcached-gem/143171 "2009-05-28T03:17:50Z")

</div>

What are the relative merits of the various memcached gems? memcached (Evan Weaver files/README.html) memcache\_client (http://seattlerb.rubyforge.org/memcache-client/) ruby-memcache (dev(E)iate)

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

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