# Rails

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

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

---

## [Call helper function in test file](https://www.ruby-forum.com/t/call-helper-function-in-test-file/185407)

<div class="topic-metadata">

**Author:** [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Replies:** 0\
**Last updated:** [March 19, 2010, 11:27am UTC](https://www.ruby-forum.com/t/call-helper-function-in-test-file/185407 "2010-03-19T11:27:42Z")

</div>

Do anybody know how to call helper function in test files? I mean i have written a function in application\_helper.rb and i want to call it in one of my test files… test/integration/abc.rb … Have any idea ?

---

## [Passing parameters to a view and render in inline iframe on the same page](https://www.ruby-forum.com/t/passing-parameters-to-a-view-and-render-in-inline-iframe-on-the-same-page/185406)

<div class="topic-metadata">

**Author:** [@shiran](https://www.ruby-forum.com/u/shiran)\
**Replies:** 0\
**Last updated:** [March 19, 2010, 11:15am UTC](https://www.ruby-forum.com/t/passing-parameters-to-a-view-and-render-in-inline-iframe-on-the-same-page/185406 "2010-03-19T11:15:17Z")

</div>

Hi, I’m developing a rails app and need to do the following. My main page (main.html.erb) has a small form and a submit button. Also it has an inline iframe. When click the submit button I need to pass some parameter…

---

## [How to preserve the value from the other action controller](https://www.ruby-forum.com/t/how-to-preserve-the-value-from-the-other-action-controller/185399)

<div class="topic-metadata">

**Author:** [@soesan01](https://www.ruby-forum.com/u/soesan01)\
**Replies:** 2\
**Last updated:** [March 19, 2010, 11:11am UTC](https://www.ruby-forum.com/t/how-to-preserve-the-value-from-the-other-action-controller/185399 "2010-03-19T11:11:46Z")

</div>

Hi, Anyone knows how to preserve the value from the previous action controller? For example, I have 2 controllers: foo\_one and foo\_two. on action foo\_one, I have variable @my\_value How I can keep the value of @my\_v…

---

## [Speed up loading rails and running specs on MacBook Pro](https://www.ruby-forum.com/t/speed-up-loading-rails-and-running-specs-on-macbook-pro/185402)

<div class="topic-metadata">

**Author:** [@schacke](https://www.ruby-forum.com/u/schacke)\
**Replies:** 0\
**Last updated:** [March 19, 2010, 10:42am UTC](https://www.ruby-forum.com/t/speed-up-loading-rails-and-running-specs-on-macbook-pro/185402 "2010-03-19T10:42:30Z")

</div>

Hi all, some time ago I found out that loading the rails environment and running my specs was much much faster on my iMac than on my MacBook Pro (of course the hardware does explain a bit of that difference). I had c…

---

## [TEKsystems - Ruby on Rails Job Opportunities](https://www.ruby-forum.com/t/teksystems-ruby-on-rails-job-opportunities/185373)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [March 19, 2010, 10:23am UTC](https://www.ruby-forum.com/t/teksystems-ruby-on-rails-job-opportunities/185373 "2010-03-19T10:23:11Z")

</div>

Hi Everyone, I am an IT recruiter with TEKsystems, and I am working with a local client here in New Orleans. This client has a need for multiple Ruby on Rails developers. The position allows for a lot of flexibility. …

---

## [Some logic problem](https://www.ruby-forum.com/t/some-logic-problem/185397)

<div class="topic-metadata">

**Author:** [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Replies:** 4\
**Last updated:** [March 19, 2010, 10:06am UTC](https://www.ruby-forum.com/t/some-logic-problem/185397 "2010-03-19T10:06:30Z")

</div>

Hello champs, I am in dilemma here. I have structure like this:- EmployeeA | EmployeeB EmployeeC EmployeeD …

---

## [Send Java script variable to a controller](https://www.ruby-forum.com/t/send-java-script-variable-to-a-controller/185366)

<div class="topic-metadata">

**Author:** [@mohammed\_a](https://www.ruby-forum.com/u/mohammed_a)\
**Replies:** 1\
**Last updated:** [March 19, 2010, 9:35am UTC](https://www.ruby-forum.com/t/send-java-script-variable-to-a-controller/185366 "2010-03-19T09:35:47Z")

</div>

I am trying to build an application that has google maps. Inside the script there are two java script variables. I want to send those two variables using a java function. What is the best why to do that. Could someone…

---

## [Facebook style photo uploader](https://www.ruby-forum.com/t/facebook-style-photo-uploader/185367)

<div class="topic-metadata">

**Author:** [@Ruby\_on\_RailsS\_Talk](https://www.ruby-forum.com/u/Ruby_on_RailsS_Talk)\
**Replies:** 3\
**Last updated:** [March 19, 2010, 9:23am UTC](https://www.ruby-forum.com/t/facebook-style-photo-uploader/185367 "2010-03-19T09:23:29Z")

</div>

Hi Does anyone know of a plugin or something similar which would add the Facebook style photo uploader (or something which will provide the same function)? Thanks in advance. Darren

---

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

<div class="topic-metadata">

**Author:** [@mailtorajuit](https://www.ruby-forum.com/u/mailtorajuit)\
**Replies:** 2\
**Last updated:** [March 19, 2010, 8:47am UTC](https://www.ruby-forum.com/t/migration/197030 "2010-03-19T08:47:47Z")

</div>

Hi all, I have migrated with some tables in my application. After some days i need to add few more tables to database. The initial tables in database have some data. when i try to migrate the database for second time …

---

## [RJS error: TypeError: element is null](https://www.ruby-forum.com/t/rjs-error-typeerror-element-is-null/185354)

<div class="topic-metadata">

**Author:** [@salil](https://www.ruby-forum.com/u/salil)\
**Replies:** 4\
**Last updated:** [March 19, 2010, 8:04am UTC](https://www.ruby-forum.com/t/rjs-error-typeerror-element-is-null/185354 "2010-03-19T08:04:59Z")

</div>

Hi All, I got RJS error: TypeError: element is null while using ajax. I used in view \<%= periodically\_call\_remote(:url=\>{:action=\>‘get\_user\_list’, :id=\>‘1’}, :frequency =\> ‘5’) %\> in controller render :update do…

---

## [Free sms gateway in india](https://www.ruby-forum.com/t/free-sms-gateway-in-india/167901)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [March 19, 2010, 7:20am UTC](https://www.ruby-forum.com/t/free-sms-gateway-in-india/167901 "2010-03-19T07:20:46Z")

</div>

Hi, I am Ramu from India, My rails application needs to have sms feature I searched for couple of rails plugins like sms-fu and all. But it seems that none of them has a support to india mobiles. Please help me in fi…

---

## [Production Mode.. One liner question](https://www.ruby-forum.com/t/production-mode-one-liner-question/185339)

<div class="topic-metadata">

**Author:** [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Replies:** 2\
**Last updated:** [March 19, 2010, 6:57am UTC](https://www.ruby-forum.com/t/production-mode-one-liner-question/185339 "2010-03-19T06:57:07Z")

</div>

Hello Champs, Just a one liner question. I have written a script to put data into production database. Where to execute that script ?

---

## [How to disable a drop down list after selecting one value](https://www.ruby-forum.com/t/how-to-disable-a-drop-down-list-after-selecting-one-value/185320)

<div class="topic-metadata">

**Author:** [@murfhy](https://www.ruby-forum.com/u/murfhy)\
**Replies:** 5\
**Last updated:** [March 19, 2010, 6:27am UTC](https://www.ruby-forum.com/t/how-to-disable-a-drop-down-list-after-selecting-one-value/185320 "2010-03-19T06:27:35Z")

</div>

my question is i have a drop down list to choose some vales from an xml file.after selecting one vaale and saving it will b saved. but when i tried to edit that it should be disabled. can any one prov…

---

## [Will paginate display](https://www.ruby-forum.com/t/will-paginate-display/185390)

<div class="topic-metadata">

**Author:** [@mahesh\_s](https://www.ruby-forum.com/u/mahesh_s)\
**Replies:** 0\
**Last updated:** [March 19, 2010, 5:42am UTC](https://www.ruby-forum.com/t/will-paginate-display/185390 "2010-03-19T05:42:49Z")

</div>

Hi friends i am using will\_paginate plugin for pagination Im having more records in my database im listing 10 records per page know my pagination link was look like this \<\< Previous 1 2 3 4 5 6 7 8 9 â€¦ 266 Nex…

---

## [Rails, 1.9 & Encoding - does it work?](https://www.ruby-forum.com/t/rails-1-9-encoding-does-it-work/185391)

<div class="topic-metadata">

**Author:** [@donncha](https://www.ruby-forum.com/u/donncha)\
**Replies:** 0\
**Last updated:** [March 19, 2010, 5:38am UTC](https://www.ruby-forum.com/t/rails-1-9-encoding-does-it-work/185391 "2010-03-19T05:38:41Z")

</div>

Hey all, I’ve been looking into moving our Rails app to 1.9 and am having lots of trouble with string encodings, especially when it comes to file uploads. We allow users to upload text files, which may, or may not, ha…

---

## [Current CentOS-Nginx-Passenger script?](https://www.ruby-forum.com/t/current-centos-nginx-passenger-script/185387)

<div class="topic-metadata">

**Author:** [@InventoryTrackers](https://www.ruby-forum.com/u/InventoryTrackers)\
**Replies:** 0\
**Last updated:** [March 19, 2010, 4:23am UTC](https://www.ruby-forum.com/t/current-centos-nginx-passenger-script/185387 "2010-03-19T04:23:14Z")

</div>

I’ve got bits and pieces of old install scripts but the versions are far out of wack! Anyone recently view or use an install script for all these goodies? Many thanks, David

---

## [Symbol as array index error?](https://www.ruby-forum.com/t/symbol-as-array-index-error/185370)

<div class="topic-metadata">

**Author:** [@Dudebot](https://www.ruby-forum.com/u/Dudebot)\
**Replies:** 4\
**Last updated:** [March 19, 2010, 2:20am UTC](https://www.ruby-forum.com/t/symbol-as-array-index-error/185370 "2010-03-19T02:20:19Z")

</div>

Anybody have any idea why this is throwing an error: @monkey = params\[ :lab \]\[ :existing\_lab\_data\_attributes \] raise @monkey.to\_yaml — !map:HashWithIndifferentAccess “133”: !map:HashWithIndifferentAccess unit\_id: “2…

---

## [Can't get gems to work](https://www.ruby-forum.com/t/cant-get-gems-to-work/185379)

<div class="topic-metadata">

**Author:** [@jackster](https://www.ruby-forum.com/u/jackster)\
**Replies:** 0\
**Last updated:** [March 19, 2010, 1:20am UTC](https://www.ruby-forum.com/t/cant-get-gems-to-work/185379 "2010-03-19T01:20:03Z")

</div>

I tried deleting the gem cache and updating gems but I get the following error: \[computer1\]\[/\]$ gem update --system Upgrading RubyGems… Attempting remote upgrade of rubygems-update Attempting remote installation of …

---

## [Rake db:migrate -\> uninitialized constant](https://www.ruby-forum.com/t/rake-db-migrate-uninitialized-constant/185371)

<div class="topic-metadata">

**Author:** [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Replies:** 3\
**Last updated:** [March 18, 2010, 11:27pm UTC](https://www.ruby-forum.com/t/rake-db-migrate-uninitialized-constant/185371 "2010-03-18T23:27:06Z")

</div>

Hi– I’m trying to do a first migration (2.3.5). I generated a model “Video”, but when I try to migrate I get “uninitialized constant Videos”. Why is it trying to find a plural class name? Here’s more complete output: …

---

## [Memcached using Unix Domain Sockets?](https://www.ruby-forum.com/t/memcached-using-unix-domain-sockets/185359)

<div class="topic-metadata">

**Author:** [@Jeffrey\_LSTaylor](https://www.ruby-forum.com/u/Jeffrey_LSTaylor)\
**Replies:** 1\
**Last updated:** [March 18, 2010, 10:44pm UTC](https://www.ruby-forum.com/t/memcached-using-unix-domain-sockets/185359 "2010-03-18T22:44:58Z")

</div>

Anyone tried using memcached w/ Unix sockets? Is it faster (for a one host site) than using the network interface? TIA, Jeffrey

---

## [Not null error from PG on build\_other call](https://www.ruby-forum.com/t/not-null-error-from-pg-on-build-other-call/185368)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 0\
**Last updated:** [March 18, 2010, 9:25pm UTC](https://www.ruby-forum.com/t/not-null-error-from-pg-on-build-other-call/185368 "2010-03-18T21:25:45Z")

</div>

I have this code in a stand alone script that uses nokogiri with activerecord to parse an xml file and initialise a database. begin this\_client = correspondent\_f.build\_client rescue =\> e puts("Rescued error i…

---

## [Ruby array inside hash is nil](https://www.ruby-forum.com/t/ruby-array-inside-hash-is-nil/185322)

<div class="topic-metadata">

**Author:** [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Replies:** 4\
**Last updated:** [March 18, 2010, 8:59pm UTC](https://www.ruby-forum.com/t/ruby-array-inside-hash-is-nil/185322 "2010-03-18T20:59:33Z")

</div>

I assign an array to a hash value. When I inspect it shows the array but when I try to access the array by the hash index it is nil. Ideas? Here is the log output of the inspect hash: {:has\_key=\>0, :ext\_array=\>\[“Tex…

---

## [Modifying a form field and submitting the form using java script](https://www.ruby-forum.com/t/modifying-a-form-field-and-submitting-the-form-using-java-script/185365)

<div class="topic-metadata">

**Author:** [@mohammed\_a](https://www.ruby-forum.com/u/mohammed_a)\
**Replies:** 0\
**Last updated:** [March 18, 2010, 8:46pm UTC](https://www.ruby-forum.com/t/modifying-a-form-field-and-submitting-the-form-using-java-script/185365 "2010-03-18T20:46:06Z")

</div>

Hi I want to modifying a form field and submitting the form using java script. I know I can do this use basic HTML form code but I want to do it using the rails way.

---

## [Differences between relative\_url using Rails with Prototype or JQuery](https://www.ruby-forum.com/t/differences-between-relative-url-using-rails-with-prototype-or-jquery/185363)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 0\
**Last updated:** [March 18, 2010, 7:19pm UTC](https://www.ruby-forum.com/t/differences-between-relative-url-using-rails-with-prototype-or-jquery/185363 "2010-03-18T19:19:27Z")

</div>

My web app is deployed with Passenger in a sub-uri, http://www.mydomain.com/vacademy/ and I am displaying a player in a page the swf is located in …/public/dist/flowplayer-3.1.5.swf Using Prototype library I wrote …

---

## [Routing Error on rails3](https://www.ruby-forum.com/t/routing-error-on-rails3/184223)

<div class="topic-metadata">

**Author:** [@princenamor](https://www.ruby-forum.com/u/princenamor)\
**Replies:** 6\
**Last updated:** [March 18, 2010, 7:05pm UTC](https://www.ruby-forum.com/t/routing-error-on-rails3/184223 "2010-03-18T19:05:59Z")

</div>

Hi All, I am new to Ruby on Rails and have rails3 installed. After I type this on the command line $rails g controller Pages home contact then, I go to http://localhost:3000/pages/home I got Routing Error No route…

---

## [Records created while tests are running are not being saved](https://www.ruby-forum.com/t/records-created-while-tests-are-running-are-not-being-saved/185327)

<div class="topic-metadata">

**Author:** [@Vikrant\_C](https://www.ruby-forum.com/u/Vikrant_C)\
**Replies:** 4\
**Last updated:** [March 18, 2010, 7:01pm UTC](https://www.ruby-forum.com/t/records-created-while-tests-are-running-are-not-being-saved/185327 "2010-03-18T19:01:16Z")

</div>

In following code - require “test\_helper” Class SomeControllerTest \< ActionController::TestCase def test\_something record = SomeModel.create :name =\> ‘test’ record.save! gets end end Above record is not being sa…

---

## [HABTM Associations In View](https://www.ruby-forum.com/t/habtm-associations-in-view/185353)

<div class="topic-metadata">

**Author:** [@andy](https://www.ruby-forum.com/u/andy)\
**Replies:** 1\
**Last updated:** [March 18, 2010, 6:57pm UTC](https://www.ruby-forum.com/t/habtm-associations-in-view/185353 "2010-03-18T18:57:10Z")

</div>

Hello, I wish I had the time to figure this out but I’m on a limited timeline to convince people to look at RoR instead of Drupal, so I need to get something relatively simple working fast. Any help or pointers would …

---

## [When -exactly- does the Rails3 application get initialized?](https://www.ruby-forum.com/t/when-exactly-does-the-rails3-application-get-initialized/185053)

<div class="topic-metadata">

**Author:** [@christ](https://www.ruby-forum.com/u/christ)\
**Replies:** 1\
**Last updated:** [March 18, 2010, 3:38pm UTC](https://www.ruby-forum.com/t/when-exactly-does-the-rails3-application-get-initialized/185053 "2010-03-18T15:38:41Z")

</div>

I’ve been fighting left and right with rails 3 and bundler. There are a few gems out there that don’t work properly if the rails application hasn’t been loaded yet. factory\_girl and shoulda are both examples, even on …

---

## [Problem with db:test:prepare](https://www.ruby-forum.com/t/problem-with-dbprepare/185352)

<div class="topic-metadata">

**Author:** [@thiel](https://www.ruby-forum.com/u/thiel)\
**Replies:** 0\
**Last updated:** [March 18, 2010, 3:34pm UTC](https://www.ruby-forum.com/t/problem-with-dbprepare/185352 "2010-03-18T15:34:35Z")

</div>

Hi, I am learning Rails from “Agile Web D. with Rails” (third edition) by implementing the Depot example. This is an excellent book to learn Rails. However, I have a problem in the chapter 14, Testing, in which I had…

---

## [Hash in controller is nil after submitting form](https://www.ruby-forum.com/t/hash-in-controller-is-nil-after-submitting-form/185346)

<div class="topic-metadata">

**Author:** [@ESESES](https://www.ruby-forum.com/u/ESESES)\
**Replies:** 8\
**Last updated:** [March 18, 2010, 3:28pm UTC](https://www.ruby-forum.com/t/hash-in-controller-is-nil-after-submitting-form/185346 "2010-03-18T15:28:44Z")

</div>

I’m trying to create a data entry form but getting an error when it sumbmits. I am using an hash to get the names of the fields definied in the controller’s “new” function: def new @thing = thing.new @columns = Has…

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

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