# Rails

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

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

---

## [Rails 3 and Controller Instance Variables Inside a Helper](https://www.ruby-forum.com/t/rails-3-and-controller-instance-variables-inside-a-helper/226076)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [September 7, 2010, 8:26pm UTC](https://www.ruby-forum.com/t/rails-3-and-controller-instance-variables-inside-a-helper/226076 "2010-09-07T20:26:11Z")

</div>

In my Rails 2.x applications i could access controller instance variables happily inside my application\_helper.rb but with 3.0 that is no longer the case. Specifically I’m attempting to access the special controller i…

---

## [Remove array within hash](https://www.ruby-forum.com/t/remove-array-within-hash/194321)

<div class="topic-metadata">

**Author:** [@jmanivannancse](https://www.ruby-forum.com/u/jmanivannancse)\
**Replies:** 2\
**Last updated:** [September 7, 2010, 7:31pm UTC](https://www.ruby-forum.com/t/remove-array-within-hash/194321 "2010-09-07T19:31:44Z")

</div>

My orginal hash is like as ==\> hash = {“sku\_id”=\>\[4\], “brand\_active”=\>\[“true”\], “salesman\_active”=\>\[“true”\]} How to remove the array within hash. that means to convert the hash like ==\> {“sku\_id”=\>4, “brand\_active”=\>“…

---

## [Deployment with nginx + mod\_rails ( a.k.a phusion passenger)](https://www.ruby-forum.com/t/deployment-with-nginx-mod-rails-a-k-a-phusion-passenger/194546)

<div class="topic-metadata">

**Author:** [@ShellScripter](https://www.ruby-forum.com/u/ShellScripter)\
**Replies:** 2\
**Last updated:** [September 7, 2010, 6:07pm UTC](https://www.ruby-forum.com/t/deployment-with-nginx-mod-rails-a-k-a-phusion-passenger/194546 "2010-09-07T18:07:26Z")

</div>

Hi , all there. My project now is under the deployment phase , and as the title mentioned i have decided to use the nginx + mod\_rails for my deployment. I set up the environment in CentOS 5 and using the Ruby Enterpr…

---

## [Objects with versions: how to avoid 1 + n queries?](https://www.ruby-forum.com/t/objects-with-versions-how-to-avoid-1-n-queries/194357)

<div class="topic-metadata">

**Author:** [@wickie](https://www.ruby-forum.com/u/wickie)\
**Replies:** 17\
**Last updated:** [September 7, 2010, 5:51pm UTC](https://www.ruby-forum.com/t/objects-with-versions-how-to-avoid-1-n-queries/194357 "2010-09-07T17:51:55Z")

</div>

Firstly, I’ve asked a similar question before\[\*\]. I didn’t get any answers back then, maybe now I have better luck Let’s say I have models like this class Article \< ActiveRecord::Base has\_many :versions end class V…

---

## [Yield, helpers with blocks, and double-output](https://www.ruby-forum.com/t/yield-helpers-with-blocks-and-double-output/194400)

<div class="topic-metadata">

**Author:** [@avramd](https://www.ruby-forum.com/u/avramd)\
**Replies:** 3\
**Last updated:** [September 7, 2010, 5:36pm UTC](https://www.ruby-forum.com/t/yield-helpers-with-blocks-and-double-output/194400 "2010-09-07T17:36:23Z")

</div>

Hello, I’m having a hard time understanding how you are supposed to write helpers that take blocks now in Rails 3. According to 7.4.2 here: Ruby on Rails 3.0 Release Notes — Ruby on Rails Guides you are supposed to …

---

## [Free Gold Passes for - OSI Days 2010 - Asia â€™s Leading Open Source Conference](https://www.ruby-forum.com/t/free-gold-passes-for-osi-days-2010-asia-a-s-leading-open-source-conference/194597)

<div class="topic-metadata">

**Author:** [@Raj\_Digari](https://www.ruby-forum.com/u/Raj_Digari)\
**Replies:** 0\
**Last updated:** [September 7, 2010, 5:33pm UTC](https://www.ruby-forum.com/t/free-gold-passes-for-osi-days-2010-asia-a-s-leading-open-source-conference/194597 "2010-09-07T17:33:27Z")

</div>

Dear Mr. Sir/ Madam, We would like to inform you about OSI Days 2010 - Asia’s leading Open Source Conference and Expo. OSI Days 2010, organised by FOSII (Forum for Open Source Initiatives in India) in association with…

---

## [Loads of users](https://www.ruby-forum.com/t/loads-of-users/194523)

<div class="topic-metadata">

**Author:** [@rubyginner](https://www.ruby-forum.com/u/rubyginner)\
**Replies:** 3\
**Last updated:** [September 7, 2010, 5:32pm UTC](https://www.ruby-forum.com/t/loads-of-users/194523 "2010-09-07T17:32:52Z")

</div>

Hi, I am looking for the right technologies to create a live score system for a cricket match. I like the look of RoR as I will be able to build up team/player statistics, use TDD and MVC. I’m learning Ruby/RoR. T…

---

## [Rails scaffolding issue](https://www.ruby-forum.com/t/rails-scaffolding-issue/194573)

<div class="topic-metadata">

**Author:** [@JuKuen](https://www.ruby-forum.com/u/JuKuen)\
**Replies:** 4\
**Last updated:** [September 7, 2010, 4:40pm UTC](https://www.ruby-forum.com/t/rails-scaffolding-issue/194573 "2010-09-07T16:40:10Z")

</div>

Greetings friends, im experiencing an issue with scaffolding, which im unable to resolve for the moment. system used: win7 x64: ruby -v 1.9.1, gem -v 1.3.7, rails -v 2.3.8. mysql 5.1.50, but downgraded to 5.0.37 wi…

---

## [Update code Net::HTTP::Put.new(url.path)](https://www.ruby-forum.com/t/update-code-net-put-new-url-path/194572)

<div class="topic-metadata">

**Author:** [@arunachandu](https://www.ruby-forum.com/u/arunachandu)\
**Replies:** 2\
**Last updated:** [September 7, 2010, 4:03pm UTC](https://www.ruby-forum.com/t/update-code-net-put-new-url-path/194572 "2010-09-07T16:03:16Z")

</div>

HI , i am new to ROR i am writing Ruby code for calling API blogs i have written ruby code for Creating the blog by require ‘net/http’ require ‘uri’ url = URI.parse(‘http://localhost:3000/api/blogs/create.xml’) r…

---

## [Phusion Passenger error](https://www.ruby-forum.com/t/phusion-passenger-error/194440)

<div class="topic-metadata">

**Author:** [@saurabhpurnaye](https://www.ruby-forum.com/u/saurabhpurnaye)\
**Replies:** 9\
**Last updated:** [September 7, 2010, 3:53pm UTC](https://www.ruby-forum.com/t/phusion-passenger-error/194440 "2010-09-07T15:53:19Z")

</div>

Hi All, I am having an ROR application deployed on server, it is throwing the following error on server when user uploads an image: ActionController::RoutingError (No route matches “/images/\<image\_name\>.png” with {:m…

---

## [Scott Hughes is out of the office](https://www.ruby-forum.com/t/scott-hughes-is-out-of-the-office/194586)

<div class="topic-metadata">

**Author:** [@Scott\_Hughes](https://www.ruby-forum.com/u/Scott_Hughes)\
**Replies:** 0\
**Last updated:** [September 7, 2010, 3:50pm UTC](https://www.ruby-forum.com/t/scott-hughes-is-out-of-the-office/194586 "2010-09-07T15:50:23Z")

</div>

I will be out of the office starting September 7, 2010 and will not return until September 13, 2010. Please direct any questions you have to Brian Esler or Andy Brymer in my absence. Thank You

---

## [Looking for VP of Engineering w/RoR coding capability](https://www.ruby-forum.com/t/looking-for-vp-of-engineering-w-ror-coding-capability/194548)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [September 7, 2010, 2:07pm UTC](https://www.ruby-forum.com/t/looking-for-vp-of-engineering-w-ror-coding-capability/194548 "2010-09-07T14:07:55Z")

</div>

My team is looking for an experienced VP of Engineering https://docs.google.com/document/edit?id=1waqnjDdxxJW0bZgDsJyphgQePjTpdsly6eI15gvR5fw&hl=en&authkey=COiRwI4B

---

## [Tutorials for Query Interface](https://www.ruby-forum.com/t/tutorials-for-query-interface/194576)

<div class="topic-metadata">

**Author:** [@PalaniKannan\_K](https://www.ruby-forum.com/u/PalaniKannan_K)\
**Replies:** 0\
**Last updated:** [September 7, 2010, 12:54pm UTC](https://www.ruby-forum.com/t/tutorials-for-query-interface/194576 "2010-09-07T12:54:09Z")

</div>

Hi, Anybody knows tutorials for search/query interface to access postgres database tables with step by step instructions and examples. – With Regards and Thanks, Palani Kannan. K Office: +49-531-2616-226 Mobile: +…

---

## [Printing stacktrace](https://www.ruby-forum.com/t/printing-stacktrace/194551)

<div class="topic-metadata">

**Author:** [@badnaam](https://www.ruby-forum.com/u/badnaam)\
**Replies:** 1\
**Last updated:** [September 7, 2010, 9:32am UTC](https://www.ruby-forum.com/t/printing-stacktrace/194551 "2010-09-07T09:32:07Z")

</div>

I am trying the following in the irb console begin a = 4 a.dfsdfadsf rescue =\> exp puts exp.backtrace.join("\\n") else puts “in else” ensure puts “ensure” end I am hoping to see a stacktrace of exception compl…

---

## [When to use self.class.function vs self.function](https://www.ruby-forum.com/t/when-to-use-self-class-function-vs-self-function/194461)

<div class="topic-metadata">

**Author:** [@pipplo](https://www.ruby-forum.com/u/pipplo)\
**Replies:** 4\
**Last updated:** [September 7, 2010, 9:19am UTC](https://www.ruby-forum.com/t/when-to-use-self-class-function-vs-self-function/194461 "2010-09-07T09:19:14Z")

</div>

Hi Guys, I’m experimenting with my first rails app currently. One thing I’m trying to implement is a login system. I created a model for user.rb I’ve added a couple of functions to the class for example: def self.…

---

## [Numeric key in yam file to be used by config file](https://www.ruby-forum.com/t/numeric-key-in-yam-file-to-be-used-by-config-file/194559)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 0\
**Last updated:** [September 7, 2010, 6:56am UTC](https://www.ruby-forum.com/t/numeric-key-in-yam-file-to-be-used-by-config-file/194559 "2010-09-07T06:56:58Z")

</div>

I am using a YAML file for my app config, loading it : raw\_config = File.read(RAILS\_ROOT + “/config/app\_config.yml”) APP\_CONFIG = YAML.load(raw\_config)\[RAILS\_ENV\].symbolize\_keys It’s running well as long as I use alpha …

---

## [Invalid byte sequence in UTF-8 , need to re-encode?](https://www.ruby-forum.com/t/invalid-byte-sequence-in-utf-8-need-to-re-encode/194452)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 1\
**Last updated:** [September 7, 2010, 2:46am UTC](https://www.ruby-forum.com/t/invalid-byte-sequence-in-utf-8-need-to-re-encode/194452 "2010-09-07T02:46:28Z")

</div>

I have a string coming from an email body : (rdb:1) body “\\r\\nLe 3 sept. 2010 \\340 19:06, Event Seve Test a \\351crit :\\r\\n\\r\\n\> Please answer the question by writing an X at the chosen places :\\r\\n\> \\r\\n\> are you com…

---

## [Rails 3 install on Ruby Enterprise](https://www.ruby-forum.com/t/rails-3-install-on-ruby-enterprise/193953)

<div class="topic-metadata">

**Author:** [@beachguy82](https://www.ruby-forum.com/u/beachguy82)\
**Replies:** 4\
**Last updated:** [September 7, 2010, 2:27am UTC](https://www.ruby-forum.com/t/rails-3-install-on-ruby-enterprise/193953 "2010-09-07T02:27:08Z")

</div>

hi there - attempting to sudo gem install rails --pre on a system running ruby enterprise-1.8.7-2010.02. however, I’m getting an error: active model requires i18n before you say anything, I already ran the dependent g…

---

## [Log4r](https://www.ruby-forum.com/t/log4r/194553)

<div class="topic-metadata">

**Author:** [@badnaam](https://www.ruby-forum.com/u/badnaam)\
**Replies:** 0\
**Last updated:** [September 7, 2010, 2:04am UTC](https://www.ruby-forum.com/t/log4r/194553 "2010-09-07T02:04:53Z")

</div>

Is log4r a good option for proper logging in rails app (date time, severity, notification etc?) or is there something else out there?

---

## [Nothing is being inserted into the database...help!](https://www.ruby-forum.com/t/nothing-is-being-inserted-into-the-database-help/194418)

<div class="topic-metadata">

**Author:** [@jakx12](https://www.ruby-forum.com/u/jakx12)\
**Replies:** 4\
**Last updated:** [September 7, 2010, 12:34am UTC](https://www.ruby-forum.com/t/nothing-is-being-inserted-into-the-database-help/194418 "2010-09-07T00:34:20Z")

</div>

Hello all, for some reason nothing is being inserted into the database. I have no idea why not! Here is my action: def create @information = CalorieKing.new @information = CalorieKing.get\_information(params\[:id\]) @…

---

## ["clone" at active\_record relation](https://www.ruby-forum.com/t/clone-at-active-record-relation/194538)

<div class="topic-metadata">

**Author:** [@andersonleite](https://www.ruby-forum.com/u/andersonleite)\
**Replies:** 0\
**Last updated:** [September 6, 2010, 8:42pm UTC](https://www.ruby-forum.com/t/clone-at-active-record-relation/194538 "2010-09-06T20:42:10Z")

</div>

inside Rails source, at I found a lot of calls to: relation = clone I can understand where id the “relation” call, but… how about “clone” ? Perhaps “clone” comes from Ruby1.9-Kernel, but I am not sure. And github …

---

## [Logging question](https://www.ruby-forum.com/t/logging-question/194536)

<div class="topic-metadata">

**Author:** [@badnaam](https://www.ruby-forum.com/u/badnaam)\
**Replies:** 0\
**Last updated:** [September 6, 2010, 8:34pm UTC](https://www.ruby-forum.com/t/logging-question/194536 "2010-09-06T20:34:54Z")

</div>

I notice that even though my app logs fine to the dev and prod logs, I am having issue logging from other places like rake and console. I have a rake task process\_post that calls #Post model def self.process\_post lo…

---

## [Logging question](https://www.ruby-forum.com/t/logging-question/197235)

<div class="topic-metadata">

**Author:** [@badnaam](https://www.ruby-forum.com/u/badnaam)\
**Replies:** 0\
**Last updated:** [September 6, 2010, 8:33pm UTC](https://www.ruby-forum.com/t/logging-question/197235 "2010-09-06T20:33:08Z")

</div>

I notice that even though my app logs fine to the dev and prod logs, I am having issue logging from other places like rake and console. I have a rake task process\_post that calls #Post model def self.process\_post lo…

---

## [\[JOBS\] NYC Consulting, Onsite at Client Location only, Financial Services Firm $800-$1000 per day](https://www.ruby-forum.com/t/jobs-nyc-consulting-onsite-at-client-location-only-financial-services-firm-800-1000-per-day/194533)

<div class="topic-metadata">

**Author:** [@Ruby\_Kate](https://www.ruby-forum.com/u/Ruby_Kate)\
**Replies:** 0\
**Last updated:** [September 6, 2010, 8:01pm UTC](https://www.ruby-forum.com/t/jobs-nyc-consulting-onsite-at-client-location-only-financial-services-firm-800-1000-per-day/194533 "2010-09-06T20:01:32Z")

</div>

The ideal Consultant will join a quickly growing agile team in the development of a new web product that is targeted for Beta launch within an aggressive time-frame. My client is looking for an experienced hands-on Ru…

---

## [Backup database from the application](https://www.ruby-forum.com/t/backup-database-from-the-application/194516)

<div class="topic-metadata">

**Author:** [@danmcb](https://www.ruby-forum.com/u/danmcb)\
**Replies:** 3\
**Last updated:** [September 6, 2010, 8:01pm UTC](https://www.ruby-forum.com/t/backup-database-from-the-application/194516 "2010-09-06T20:01:32Z")

</div>

Hi, I want to create an administration panel in the application that would allow to backup the database and some other stuff. How can I create a backup and send it to some place (s3, ftp) or download it as a file to t…

---

## [Cannot seem to display Comments on User Show Page](https://www.ruby-forum.com/t/cannot-seem-to-display-comments-on-user-show-page/194420)

<div class="topic-metadata">

**Author:** [@kelp](https://www.ruby-forum.com/u/kelp)\
**Replies:** 6\
**Last updated:** [September 6, 2010, 7:51pm UTC](https://www.ruby-forum.com/t/cannot-seem-to-display-comments-on-user-show-page/194420 "2010-09-06T19:51:04Z")

</div>

Hello, I have added a comment form to my article show page, but after I submit the comment, I get the following error: Couldn’t find Article without an ID. I think it is because the Comments controller does not know …

---

## [I18n interpolation problem](https://www.ruby-forum.com/t/i18n-interpolation-problem/194529)

<div class="topic-metadata">

**Author:** [@aldoitalo](https://www.ruby-forum.com/u/aldoitalo)\
**Replies:** 0\
**Last updated:** [September 6, 2010, 6:07pm UTC](https://www.ruby-forum.com/t/i18n-interpolation-problem/194529 "2010-09-06T18:07:05Z")

</div>

hi, i using rails 2.3.8, i have setting this on my view: \<%=h l(@banner.expire, :format =\> :long) %\> (when “@banner.expire” is a Date ) and this on the my localized yml locale: date: formats: long: "%d %B…

---

## [Link\_to\_remote and link\_to](https://www.ruby-forum.com/t/link-to-remote-and-link-to/194525)

<div class="topic-metadata">

**Author:** [@luis21\_futur](https://www.ruby-forum.com/u/luis21_futur)\
**Replies:** 0\
**Last updated:** [September 6, 2010, 5:11pm UTC](https://www.ruby-forum.com/t/link-to-remote-and-link-to/194525 "2010-09-06T17:11:20Z")

</div>

Hi, Estoy pasando una aplicaciÃ³n que trabaja con Google maps y Rails 2. Con Google maps recojo las coordenadas X y Y en dos campos de texto y los paso mediante el mÃ©todo :with al controlador para hacer algunas oper…

---

## [Triggering Javascript from a Ruby form](https://www.ruby-forum.com/t/triggering-javascript-from-a-ruby-form/194407)

<div class="topic-metadata">

**Author:** [@marsdragon](https://www.ruby-forum.com/u/marsdragon)\
**Replies:** 3\
**Last updated:** [September 6, 2010, 5:09pm UTC](https://www.ruby-forum.com/t/triggering-javascript-from-a-ruby-form/194407 "2010-09-06T17:09:11Z")

</div>

Hello again, I’ve managed to hack together an uploader, but I need a progress bar to go with it. I ended up using FTP to upload, and got a way to find the progress while it’s uploading. I split that off into another …

---

## [Rails 3, help controlling access to a record based on the user id](https://www.ruby-forum.com/t/rails-3-help-controlling-access-to-a-record-based-on-the-user-id/194456)

<div class="topic-metadata">

**Author:** [@nobosh](https://www.ruby-forum.com/u/nobosh)\
**Replies:** 8\
**Last updated:** [September 6, 2010, 5:08pm UTC](https://www.ruby-forum.com/t/rails-3-help-controlling-access-to-a-record-based-on-the-user-id/194456 "2010-09-06T17:08:48Z")

</div>

Hello, I’m a Rails newbie… Here’s what I’m trying to do… I created a scaffold for notes (t.text :content, t.integer :user\_id) What I want to do now is only allow user’s to view notes that they created. ie (== user\_id) …

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

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