# Rails

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

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

---

## [Pass a value from controller to model](https://www.ruby-forum.com/t/pass-a-value-from-controller-to-model/194419)

<div class="topic-metadata">

**Author:** [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Replies:** 8\
**Last updated:** [September 6, 2010, 4:57pm UTC](https://www.ruby-forum.com/t/pass-a-value-from-controller-to-model/194419 "2010-09-06T16:57:48Z")

</div>

I’m trying to pass a value from a cookie from the controller into model by using attr\_accessor. But it doesn’t work and I suspect I do something wrong. Is this on the right path? class Test \< ActiveRecord::Base attr…

---

## [RoR with Existing tables in database using Postgresql](https://www.ruby-forum.com/t/ror-with-existing-tables-in-database-using-postgresql/194389)

<div class="topic-metadata">

**Author:** [@PalaniKannan\_K](https://www.ruby-forum.com/u/PalaniKannan_K)\
**Replies:** 9\
**Last updated:** [September 6, 2010, 4:52pm UTC](https://www.ruby-forum.com/t/ror-with-existing-tables-in-database-using-postgresql/194389 "2010-09-06T16:52:23Z")

</div>

Hi, I am new bee to Rais. I need to create a Rails application with existing database with several number of tables. When i came across web, I didn’t find any fruitful ideas for developing application using existing …

---

## [Whats a good way to avoid nil lookup errors](https://www.ruby-forum.com/t/whats-a-good-way-to-avoid-nil-lookup-errors/194482)

<div class="topic-metadata">

**Author:** [@zurich\_by\_night](https://www.ruby-forum.com/u/zurich_by_night)\
**Replies:** 11\
**Last updated:** [September 6, 2010, 4:52pm UTC](https://www.ruby-forum.com/t/whats-a-good-way-to-avoid-nil-lookup-errors/194482 "2010-09-06T16:52:23Z")

</div>

When navigating to: http://localhost:3000/users/12 Whats a good way of avoiding the error: “Couldn’t find User with ID=12”, which happens when i try to display a page of user\_id 12 that doesnt exist in the database. I…

---

## [Reload! not working](https://www.ruby-forum.com/t/reload-not-working/194464)

<div class="topic-metadata">

**Author:** [@badnaam](https://www.ruby-forum.com/u/badnaam)\
**Replies:** 3\
**Last updated:** [September 6, 2010, 4:52pm UTC](https://www.ruby-forum.com/t/reload-not-working/194464 "2010-09-06T16:52:23Z")

</div>

Not sure what happened but all of a sudden reload! stopped loading updated model classes in irb. Anyone seen this?

---

## [How about the heroku](https://www.ruby-forum.com/t/how-about-the-heroku/194489)

<div class="topic-metadata">

**Author:** [@Ekin\_Han](https://www.ruby-forum.com/u/Ekin_Han)\
**Replies:** 2\
**Last updated:** [September 6, 2010, 4:52pm UTC](https://www.ruby-forum.com/t/how-about-the-heroku/194489 "2010-09-06T16:52:22Z")

</div>

Hi all, I am new to rails and I do not want to install rails on my own machine. Finally I found that there is cloudy rails server that called heroku. Could you kindly tell me does that application is good enough for …

---

## [Problema con parÃ¡metros en collection\_select (No novato)](https://www.ruby-forum.com/t/problema-con-para-metros-en-collection-select-no-novato/194394)

<div class="topic-metadata">

**Author:** [@evaldo](https://www.ruby-forum.com/u/evaldo)\
**Replies:** 2\
**Last updated:** [September 6, 2010, 4:50pm UTC](https://www.ruby-forum.com/t/problema-con-para-metros-en-collection-select-no-novato/194394 "2010-09-06T16:50:26Z")

</div>

Hola a tod@s, Les cuento… Tengo lo siguiente en aplicaciÃ³n: Una pÃ¡gina donde esta mi modelo docencia que a su vez le voy agregando todos los dictados de carreras: \<% f.fields\_for :dictados do |dictado\_form| %\>…

---

## [Rake background task can not run](https://www.ruby-forum.com/t/rake-background-task-can-not-run/194474)

<div class="topic-metadata">

**Author:** [@boblu](https://www.ruby-forum.com/u/boblu)\
**Replies:** 2\
**Last updated:** [September 6, 2010, 4:44pm UTC](https://www.ruby-forum.com/t/rake-background-task-can-not-run/194474 "2010-09-06T16:44:09Z")

</div>

I want to use rake background task in rails like this system(“cd #{Rails.root} && RAILS\_ENV=#{Rails.env} rake abc:def – trace 2\>&1 \>\> #{Rails.root}/log/rake.log &”) This is ok in development environment, but will not …

---

## [Script/server](https://www.ruby-forum.com/t/script-server/194447)

<div class="topic-metadata">

**Author:** [@daniel](https://www.ruby-forum.com/u/daniel)\
**Replies:** 3\
**Last updated:** [September 6, 2010, 4:44pm UTC](https://www.ruby-forum.com/t/script-server/194447 "2010-09-06T16:44:08Z")

</div>

I am running into an odd problem and would love some assistance. I had Ruby/Rails up and running perfectly fine on a Win 7 machine but recently had to perform a fresh install of everything. The previous install as w…

---

## [Its easy but i forgot all](https://www.ruby-forum.com/t/its-easy-but-i-forgot-all/194473)

<div class="topic-metadata">

**Author:** [@ashu](https://www.ruby-forum.com/u/ashu)\
**Replies:** 3\
**Last updated:** [September 6, 2010, 4:44pm UTC](https://www.ruby-forum.com/t/its-easy-but-i-forgot-all/194473 "2010-09-06T16:44:07Z")

</div>

my models borrower ----- has\_many :loans loan ----- belongs\_to :borrower my loans \_controller def new @borrower = Borrower.find(params\[:borrower\_id\]) logger.debug ’ @borrower.id’ logger.debug @bo…

---

## [Moving ROR Dev from one windows PC to another](https://www.ruby-forum.com/t/moving-ror-dev-from-one-windows-pc-to-another/194470)

<div class="topic-metadata">

**Author:** [@DMaster](https://www.ruby-forum.com/u/DMaster)\
**Replies:** 1\
**Last updated:** [September 6, 2010, 4:44pm UTC](https://www.ruby-forum.com/t/moving-ror-dev-from-one-windows-pc-to-another/194470 "2010-09-06T16:44:07Z")

</div>

Is it possible to move the complete ROR install/development directory or directories to new PC and continue to work/dev as the original one? Are there any registry entries that would preclude this working on the new P…

---

## [Installing rails on lucid lynx](https://www.ruby-forum.com/t/installing-rails-on-lucid-lynx/194428)

<div class="topic-metadata">

**Author:** [@markh](https://www.ruby-forum.com/u/markh)\
**Replies:** 2\
**Last updated:** [September 6, 2010, 4:44pm UTC](https://www.ruby-forum.com/t/installing-rails-on-lucid-lynx/194428 "2010-09-06T16:44:07Z")

</div>

I am getting the following error when I try to install rails on lucid lynx :- mark@mark-laptop:~/code/ruby$ sudo gem install rails ERROR: Error installing rails: i18n requires RubyGems version \>= 1.3.6 I have insta…

---

## [Default value depending on the controller action](https://www.ruby-forum.com/t/default-value-depending-on-the-controller-action/194443)

<div class="topic-metadata">

**Author:** [@vitaly](https://www.ruby-forum.com/u/vitaly)\
**Replies:** 2\
**Last updated:** [September 6, 2010, 4:44pm UTC](https://www.ruby-forum.com/t/default-value-depending-on-the-controller-action/194443 "2010-09-06T16:44:06Z")

</div>

The solution that is good for me: \<% if controller.action\_name == ‘new’ %\> \<%= f.text\_field :image\_url, :value =\> ‘no image’ %\> \<% else %\> \<%= f.text\_field :image\_url %\> \<% end %\> and then in index.erb set smth lik…

---

## [About routes](https://www.ruby-forum.com/t/about-routes/194460)

<div class="topic-metadata">

**Author:** [@trencaclosques](https://www.ruby-forum.com/u/trencaclosques)\
**Replies:** 1\
**Last updated:** [September 6, 2010, 4:44pm UTC](https://www.ruby-forum.com/t/about-routes/194460 "2010-09-06T16:44:05Z")

</div>

Hello everyone, I’m trying to map a controller actions with the name as a action. I’ve got it well: match “/home” =\> “main#home”, :as =\> :home match “/contact” =\> “main#contact”, :as =\> :contact match “/whoweare” =\> …

---

## [Batch processing question](https://www.ruby-forum.com/t/batch-processing-question/194458)

<div class="topic-metadata">

**Author:** [@badnaam](https://www.ruby-forum.com/u/badnaam)\
**Replies:** 2\
**Last updated:** [September 6, 2010, 4:43pm UTC](https://www.ruby-forum.com/t/batch-processing-question/194458 "2010-09-06T16:43:29Z")

</div>

In my app a user can set the status of a Post to different flags like ‘v’ - visible, ‘d’ - mark for delete etc. These flags are set via controller actions. I have a batch process that runs and cleans all the posts mar…

---

## [Jquery post authenticity\_token is not sent](https://www.ruby-forum.com/t/jquery-post-authenticity-token-is-not-sent/194459)

<div class="topic-metadata">

**Author:** [@Manos](https://www.ruby-forum.com/u/Manos)\
**Replies:** 1\
**Last updated:** [September 6, 2010, 4:43pm UTC](https://www.ruby-forum.com/t/jquery-post-authenticity-token-is-not-sent/194459 "2010-09-06T16:43:29Z")

</div>

I have installed jquery-ujs driver and include jquery script in my view. In my view I have the following function $(function () { $(’#alert’).click(function () { $.ajax({ type: “POST”, data: ({ lat: this.getAttrib…

---

## [Unexpected behavior with respond\_to](https://www.ruby-forum.com/t/unexpected-behavior-with-respond-to/192429)

<div class="topic-metadata">

**Author:** [@Erik\_Hetzner](https://www.ruby-forum.com/u/Erik_Hetzner)\
**Replies:** 1\
**Last updated:** [September 6, 2010, 4:39pm UTC](https://www.ruby-forum.com/t/unexpected-behavior-with-respond-to/192429 "2010-09-06T16:39:57Z")

</div>

Hi all, I am encountering some unexpected behavior in the Rails 3.0.0.rc which I think may be incorrect. In my controller, I have the following: class FeedsController \< ApplicationController def recent respond\_to d…

---

## [Drop\_receiving\_element does not fire](https://www.ruby-forum.com/t/drop-receiving-element-does-not-fire/194514)

<div class="topic-metadata">

**Author:** [@nktokyo](https://www.ruby-forum.com/u/nktokyo)\
**Replies:** 0\
**Last updated:** [September 6, 2010, 4:39pm UTC](https://www.ruby-forum.com/t/drop-receiving-element-does-not-fire/194514 "2010-09-06T16:39:55Z")

</div>

I am trying drag and drop in RoR for the first time. What I want to achieve, is a list of slots, and a list of entries. You should be able to drag an entry onto a slot and slot.entry\_id will update to match the dragge…

---

## [YUI, Hpricot and security](https://www.ruby-forum.com/t/yui-hpricot-and-security/194371)

<div class="topic-metadata">

**Author:** [@himdel](https://www.ruby-forum.com/u/himdel)\
**Replies:** 1\
**Last updated:** [September 6, 2010, 4:39pm UTC](https://www.ruby-forum.com/t/yui-hpricot-and-security/194371 "2010-09-06T16:39:55Z")

</div>

I’m creating a site that involves a blog, using Rails 2.3.8. I’ve used the YUI Rich Text Editor to allow posts to be created (the blog is for a photo site so images have to be uploaded) and the SimpleEditor for postin…

---

## [2.3.5 guide](https://www.ruby-forum.com/t/2-3-5-guide/194475)

<div class="topic-metadata">

**Author:** [@badnaam](https://www.ruby-forum.com/u/badnaam)\
**Replies:** 2\
**Last updated:** [September 6, 2010, 4:39pm UTC](https://www.ruby-forum.com/t/2-3-5-guide/194475 "2010-09-06T16:39:53Z")

</div>

It seems the guide at http://guides.rubyonrails.org/ has been updated to 3.0. I am still using 2.3.5 with plans of upgrading. Any ideas on how I can get the older guide? Thanks

---

## [\[off-topic\] ruby on rails wiki off?](https://www.ruby-forum.com/t/off-topic-ruby-on-rails-wiki-off/194186)

<div class="topic-metadata">

**Author:** [@Luciano\_S](https://www.ruby-forum.com/u/Luciano_S)\
**Replies:** 2\
**Last updated:** [September 6, 2010, 4:39pm UTC](https://www.ruby-forum.com/t/off-topic-ruby-on-rails-wiki-off/194186 "2010-09-06T16:39:53Z")

</div>

whats the problem in website to ruby on rails wiki? i cant access for a long time. thanks. – att: Luciano S. http://www.lucianosousa.net http://www.lucianosousa.nethttp://twitter.com/lucianosousa \*Ruby on Rails De…

---

## [RoR with Existing tables in database using Postgresql](https://www.ruby-forum.com/t/ror-with-existing-tables-in-database-using-postgresql/194390)

<div class="topic-metadata">

**Author:** [@kannan](https://www.ruby-forum.com/u/kannan)\
**Replies:** 2\
**Last updated:** [September 6, 2010, 4:39pm UTC](https://www.ruby-forum.com/t/ror-with-existing-tables-in-database-using-postgresql/194390 "2010-09-06T16:39:52Z")

</div>

Hi, I am new bee to Rais. I need to create a Rails application with existing database with several number of tables. When i came across web, I didn’t find any fruitful ideas for developing application using existing …

---

## [Using Rails 3 with Ruby 1.9](https://www.ruby-forum.com/t/using-rails-3-with-ruby-1-9/194399)

<div class="topic-metadata">

**Author:** [@cjnkns](https://www.ruby-forum.com/u/cjnkns)\
**Replies:** 8\
**Last updated:** [September 6, 2010, 4:39pm UTC](https://www.ruby-forum.com/t/using-rails-3-with-ruby-1-9/194399 "2010-09-06T16:39:51Z")

</div>

Can we use Ruby 1.9 and Rails 3 together? Last time I tried this Rails became angry and told me I couldn’t (or shouldn’t). So, maybe I am missing the blog entry on this subject, but when will Ruby1.9 and Rails 3 play …

---

## [Determining who is calling a helper method](https://www.ruby-forum.com/t/determining-who-is-calling-a-helper-method/194351)

<div class="topic-metadata">

**Author:** [@proximal](https://www.ruby-forum.com/u/proximal)\
**Replies:** 6\
**Last updated:** [September 6, 2010, 4:39pm UTC](https://www.ruby-forum.com/t/determining-who-is-calling-a-helper-method/194351 "2010-09-06T16:39:49Z")

</div>

I have a view calling a helper method is\_disabled like this : \<%= form.input :company, :label =\> “Company name”, :input\_html =\> { :disabled =\> is\_disabled } %\> How can I determine in my helper which element (here :com…

---

## [\[newbie question\]how to add a new view to a exist controller?](https://www.ruby-forum.com/t/newbie-question-how-to-add-a-new-view-to-a-exist-controller/194471)

<div class="topic-metadata">

**Author:** [@john-anes](https://www.ruby-forum.com/u/john-anes)\
**Replies:** 2\
**Last updated:** [September 6, 2010, 4:39pm UTC](https://www.ruby-forum.com/t/newbie-question-how-to-add-a-new-view-to-a-exist-controller/194471 "2010-09-06T16:39:49Z")

</div>

hello everybody , I am a newbie to Rails’ world. I just start reading the book one question. How can I add a new view to a exist controller? we can use code: rails generate controller controller\_1\_name \[view\_1\_nam…

---

## [Undefined method \`eq' for nil:NilClass](https://www.ruby-forum.com/t/undefined-method-eq-for-nil-nilclass/194498)

<div class="topic-metadata">

**Author:** [@PalaniKannan\_K](https://www.ruby-forum.com/u/PalaniKannan_K)\
**Replies:** 0\
**Last updated:** [September 6, 2010, 4:39pm UTC](https://www.ruby-forum.com/t/undefined-method-eq-for-nil-nilclass/194498 "2010-09-06T16:39:49Z")

</div>

Hi, Please help in this regard I got the error when tried to apply the script for sql command “SELECT \* FROM clients WHERE (clients.id = 10)” Taxa = Model Name I used “taxa = Taxa.find(40)” in ActiveRecord::Base… I…

---

## [Rails 3.0, setting asset\_host class](https://www.ruby-forum.com/t/rails-3-0-setting-asset-host-class/194311)

<div class="topic-metadata">

**Author:** [@kyle](https://www.ruby-forum.com/u/kyle)\
**Replies:** 2\
**Last updated:** [September 6, 2010, 4:39pm UTC](https://www.ruby-forum.com/t/rails-3-0-setting-asset-host-class/194311 "2010-09-06T16:39:46Z")

</div>

I am upgrading to Rails 3.0, but am having a difficult time getting it to boot. I have a custom asset host class that passes the name of the asset host into its constructor. I set this class in each of the environme…

---

## [(Resolved) Re: drop\_receiving\_element does not fire](https://www.ruby-forum.com/t/resolved-re-drop-receiving-element-does-not-fire/194494)

<div class="topic-metadata">

**Author:** [@nktokyo](https://www.ruby-forum.com/u/nktokyo)\
**Replies:** 0\
**Last updated:** [September 6, 2010, 4:39pm UTC](https://www.ruby-forum.com/t/resolved-re-drop-receiving-element-does-not-fire/194494 "2010-09-06T16:39:46Z")

</div>

This is now resolved.

---

## [Action Controller Error: undefined local variable or method \`current\_user'](https://www.ruby-forum.com/t/action-controller-error-undefined-local-variable-or-method-current-user/194454)

<div class="topic-metadata">

**Author:** [@nobosh](https://www.ruby-forum.com/u/nobosh)\
**Replies:** 1\
**Last updated:** [September 6, 2010, 4:39pm UTC](https://www.ruby-forum.com/t/action-controller-error-undefined-local-variable-or-method-current-user/194454 "2010-09-06T16:39:45Z")

</div>

Newbie learning Rails. I’m currently on Chp9 here: http://railstutorial.org/chapters/sign-in-sign-out#top At the end of the tutorial, rails is erroring (see below). being new to Rails and after having checked the tuto…

---

## [Upload file attachment with rest or xml](https://www.ruby-forum.com/t/upload-file-attachment-with-rest-or-xml/194363)

<div class="topic-metadata">

**Author:** [@rorra](https://www.ruby-forum.com/u/rorra)\
**Replies:** 3\
**Last updated:** [September 6, 2010, 4:39pm UTC](https://www.ruby-forum.com/t/upload-file-attachment-with-rest-or-xml/194363 "2010-09-06T16:39:42Z")

</div>

I’ve a “attachment” model that has: title: string image: paperclip attribute video: paperclip attribute I want to let the users to upload an attachment by using xml or something like that, all the actions supports x…

---

## [YM4R - convert variable to string error](https://www.ruby-forum.com/t/ym4r-convert-variable-to-string-error/194017)

<div class="topic-metadata">

**Author:** [@ARF](https://www.ruby-forum.com/u/ARF)\
**Replies:** 1\
**Last updated:** [September 6, 2010, 4:39pm UTC](https://www.ruby-forum.com/t/ym4r-convert-variable-to-string-error/194017 "2010-09-06T16:39:42Z")

</div>

Rails 2.3.8, ruby 1.9.2.0, rubygems 1.3.7, ym4r-0.6.1, ym4r\_gm (http:// GitHub - ewildgoose/ym4r\_gm: My copy of the subversion repo at svn://rubyforge.org/var/svn/ym4r/Plugins/GM/trunk/ym4r\_gm). Help? I keep getting t…

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

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