# Rails

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

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

---

## [Rails app settings for GoDaddy](https://www.ruby-forum.com/t/rails-app-settings-for-godaddy/117637)

<div class="topic-metadata">

**Author:** [@snantz](https://www.ruby-forum.com/u/snantz)\
**Replies:** 7\
**Last updated:** [October 19, 2007, 11:25pm UTC](https://www.ruby-forum.com/t/rails-app-settings-for-godaddy/117637 "2007-10-19T23:25:12Z")

</div>

I have a rails application that I am trying to get up and running on my GoDaddy account. I read an article that I got from this forum about how to properly set-up my account, but after following those direction I stil…

---

## [May a model know about the "outside world"?](https://www.ruby-forum.com/t/may-a-model-know-about-the-outside-world/117749)

<div class="topic-metadata">

**Author:** [@josh](https://www.ruby-forum.com/u/josh)\
**Replies:** 4\
**Last updated:** [October 19, 2007, 11:17pm UTC](https://www.ruby-forum.com/t/may-a-model-know-about-the-outside-world/117749 "2007-10-19T23:17:38Z")

</div>

Hi all Most of my models have the attribute creator\_id which is a foreign key to a member. Also many have the attribute owner\_id, which is a foreign key to a member, too. When being created, both attributes (if avail…

---

## [Rails 2.0 missing find\_or\_create\_by\_name and find\_or\_initialize\_by\_name](https://www.ruby-forum.com/t/rails-2-0-missing-find-or-create-by-name-and-find-or-initialize-by-name/117740)

<div class="topic-metadata">

**Author:** [@Jesper\_RSSSSnn-Jens](https://www.ruby-forum.com/u/Jesper_RSSSSnn-Jens)\
**Replies:** 3\
**Last updated:** [October 19, 2007, 11:04pm UTC](https://www.ruby-forum.com/t/rails-2-0-missing-find-or-create-by-name-and-find-or-initialize-by-name/117740 "2007-10-19T23:04:11Z")

</div>

Hey. just found out that Rails 2.0 (in the prerelease version) does not have the extended dynamic finders find\_or\_create\_by\_name and find\_or\_initialize\_by\_name They are mentioned in the old 1.x docs (section “Dynam…

---

## [Apache2 with dispatch.fcgi randomly gives Internal Server Error for RoR 1.2.3 application](https://www.ruby-forum.com/t/apache2-with-dispatch-fcgi-randomly-gives-internal-server-error-for-ror-1-2-3-application/117747)

<div class="topic-metadata">

**Author:** [@James\_SMikeSS\_Conle](https://www.ruby-forum.com/u/James_SMikeSS_Conle)\
**Replies:** 0\
**Last updated:** [October 19, 2007, 9:27pm UTC](https://www.ruby-forum.com/t/apache2-with-dispatch-fcgi-randomly-gives-internal-server-error-for-ror-1-2-3-application/117747 "2007-10-19T21:27:05Z")

</div>

I’m working on a Ruby on Rails application that is hosted in an environment that supports Apache2 calling dispatch.fcgi. The weird part is that it works about 99.5% of the time but on rare seemingly random occasions …

---

## [Managing a lopsided has\_and\_belongs\_to\_many relationship](https://www.ruby-forum.com/t/managing-a-lopsided-has-and-belongs-to-many-relationship/117736)

<div class="topic-metadata">

**Author:** [@dmorin](https://www.ruby-forum.com/u/dmorin)\
**Replies:** 1\
**Last updated:** [October 19, 2007, 8:40pm UTC](https://www.ruby-forum.com/t/managing-a-lopsided-has-and-belongs-to-many-relationship/117736 "2007-10-19T20:40:21Z")

</div>

I’ve got a fixed list of several thousand Things, and a User base that may grow to who knows how big (we can only hope ,right?) Users have and belong to many Things. I want to display a list of top Things, based on …

---

## [Rails 2.0 serialize](https://www.ruby-forum.com/t/rails-2-0-serialize/117738)

<div class="topic-metadata">

**Author:** [@rlwinter](https://www.ruby-forum.com/u/rlwinter)\
**Replies:** 0\
**Last updated:** [October 19, 2007, 8:37pm UTC](https://www.ruby-forum.com/t/rails-2-0-serialize/117738 "2007-10-19T20:37:20Z")

</div>

ActiveRecord in Rails 1.2.x has a method: serialize(attr\_name, class\_name = Object). I was wondering, given the new JSON serialization in 2.0, if it will be possible to request JSON instead of YAML when serializing da…

---

## [Cascading select boxes using rjs](https://www.ruby-forum.com/t/cascading-select-boxes-using-rjs/117737)

<div class="topic-metadata">

**Author:** [@brian](https://www.ruby-forum.com/u/brian)\
**Replies:** 0\
**Last updated:** [October 19, 2007, 8:07pm UTC](https://www.ruby-forum.com/t/cascading-select-boxes-using-rjs/117737 "2007-10-19T20:07:25Z")

</div>

Has anyone seen an example of how to populate drop-downs based on selections made elsewhere? I see several blog posts pointing to a supposedly good example from Rick Olsen on railsweenie, but the links seem to be brok…

---

## [Newbie question: persisting an object](https://www.ruby-forum.com/t/newbie-question-persisting-an-object/117640)

<div class="topic-metadata">

**Author:** [@Dany\_Wu](https://www.ruby-forum.com/u/Dany_Wu)\
**Replies:** 3\
**Last updated:** [October 19, 2007, 7:59pm UTC](https://www.ruby-forum.com/t/newbie-question-persisting-an-object/117640 "2007-10-19T19:59:14Z")

</div>

Hi folks, I’m new to RoR and getting stuck on something that should be quite simple. I’m just playing with a simple Blog concept, and working on the “create” view and action. Here are snippets the controller and view…

---

## [Building advanced search in ruby on rails](https://www.ruby-forum.com/t/building-advanced-search-in-ruby-on-rails/117725)

<div class="topic-metadata">

**Author:** [@oweism](https://www.ruby-forum.com/u/oweism)\
**Replies:** 0\
**Last updated:** [October 19, 2007, 6:59pm UTC](https://www.ruby-forum.com/t/building-advanced-search-in-ruby-on-rails/117725 "2007-10-19T18:59:49Z")

</div>

hi, i am trying to build and advance search functionality for my application. I am able trying to build a form that passes the parameters to a filter method which will use both the find and exists name like methods t…

---

## [Why I can't update data, but I can insert data into new model](https://www.ruby-forum.com/t/why-i-cant-update-data-but-i-can-insert-data-into-new-model/117723)

<div class="topic-metadata">

**Author:** [@OnRails](https://www.ruby-forum.com/u/OnRails)\
**Replies:** 0\
**Last updated:** [October 19, 2007, 6:56pm UTC](https://www.ruby-forum.com/t/why-i-cant-update-data-but-i-can-insert-data-into-new-model/117723 "2007-10-19T18:56:03Z")

</div>

why I can’t update data, but I can insert data into new model. like this: if File.find\_by\_id(id) file=File.find\_by\_id(id) else file=File.new file.name=name file.save there is a problem, when there don’t find id, …

---

## [Re: Newbie question: persisting an object](https://www.ruby-forum.com/t/re-newbie-question-persisting-an-object/117717)

<div class="topic-metadata">

**Author:** [@Thomas\_England](https://www.ruby-forum.com/u/Thomas_England)\
**Replies:** 1\
**Last updated:** [October 19, 2007, 6:10pm UTC](https://www.ruby-forum.com/t/re-newbie-question-persisting-an-object/117717 "2007-10-19T18:10:11Z")

</div>

also make surre post is the name of the model. And the params you use in the view match the columns in your post table. Tom

---

## [\<%= observe\_field](https://www.ruby-forum.com/t/observe-field/117654)

<div class="topic-metadata">

**Author:** [@vasure](https://www.ruby-forum.com/u/vasure)\
**Replies:** 1\
**Last updated:** [October 19, 2007, 6:09pm UTC](https://www.ruby-forum.com/t/observe-field/117654 "2007-10-19T18:09:15Z")

</div>

hi i have one more Q its abt \<%= observe\_field it is doing ajax post back when i check and uncheck the check box but its passing the value when i check the check box but not when i uncheck it,is there any way we coul…

---

## [ActiveScaffold many to many relationships](https://www.ruby-forum.com/t/activescaffold-many-to-many-relationships/117692)

<div class="topic-metadata">

**Author:** [@kabish](https://www.ruby-forum.com/u/kabish)\
**Replies:** 1\
**Last updated:** [October 19, 2007, 6:02pm UTC](https://www.ruby-forum.com/t/activescaffold-many-to-many-relationships/117692 "2007-10-19T18:02:53Z")

</div>

Hi there, when I create active scaffolding in a many to many relationship, I would like that my create/delete actions in the nested scaffold would actually erase one relationship between the two tables or create a new …

---

## [Target iframe from controller action](https://www.ruby-forum.com/t/target-iframe-from-controller-action/117694)

<div class="topic-metadata">

**Author:** [@mrcoffe](https://www.ruby-forum.com/u/mrcoffe)\
**Replies:** 1\
**Last updated:** [October 19, 2007, 6:00pm UTC](https://www.ruby-forum.com/t/target-iframe-from-controller-action/117694 "2007-10-19T18:00:15Z")

</div>

have a problem with something i thought should be really easy… a link is targeted to an iframe in the view: \<%= link\_to “test”, :controller =\> ‘Say’, :action =\> ‘hey’, :target =\> “open\_here” %\> the problem is that …

---

## [Setting Environmental Variables](https://www.ruby-forum.com/t/setting-environmental-variables/117701)

<div class="topic-metadata">

**Author:** [@ace](https://www.ruby-forum.com/u/ace)\
**Replies:** 1\
**Last updated:** [October 19, 2007, 5:57pm UTC](https://www.ruby-forum.com/t/setting-environmental-variables/117701 "2007-10-19T17:57:59Z")

</div>

Dear All, I want to use ENV\[‘MY\_ENV\_VARIABLE’\] in my ruby scripts. In a rails app where/how should I specify a value to this? is it okay to put that in application.rb (in app/controller folder) thanks and regards, J …

---

## [Nginx location+proxy\_pass in front of multiple mongrel\_clusters?](https://www.ruby-forum.com/t/nginx-location-proxy-pass-in-front-of-multiple-mongrel-clusters/117697)

<div class="topic-metadata">

**Author:** [@davidstokar](https://www.ruby-forum.com/u/davidstokar)\
**Replies:** 2\
**Last updated:** [October 19, 2007, 5:06pm UTC](https://www.ruby-forum.com/t/nginx-location-proxy-pass-in-front-of-multiple-mongrel-clusters/117697 "2007-10-19T17:06:47Z")

</div>

Hi All I’m trying to move a bunch of rails apps from an apache/fastcgi platform to nginx/mongrel\_cluster. What I want is something like this; http://my.server/app1 --\> mongrel\_cluster1 http://my.server/app2 --\> mong…

---

## [Rails 2.0 Scaffolding based on an existing model?](https://www.ruby-forum.com/t/rails-2-0-scaffolding-based-on-an-existing-model/117711)

<div class="topic-metadata">

**Author:** [@ant](https://www.ruby-forum.com/u/ant)\
**Replies:** 0\
**Last updated:** [October 19, 2007, 4:43pm UTC](https://www.ruby-forum.com/t/rails-2-0-scaffolding-based-on-an-existing-model/117711 "2007-10-19T16:43:17Z")

</div>

After a fair bit of reading around and googling, it appears that I can not use script/generate scaffold to make a scaffold based on an existing model. Is this correct and if so is there a plugin that can achieve this…

---

## [Help: Namespaced Model Weirdness](https://www.ruby-forum.com/t/help-namespaced-model-weirdness/117673)

<div class="topic-metadata">

**Author:** [@starmaerker](https://www.ruby-forum.com/u/starmaerker)\
**Replies:** 7\
**Last updated:** [October 19, 2007, 4:43pm UTC](https://www.ruby-forum.com/t/help-namespaced-model-weirdness/117673 "2007-10-19T16:43:17Z")

</div>

Hi, I am desperately in need of some help. I have a Rails app that involves namespaced models. In /app/models/x/ y.rb I have class X::Y \< ActiveRecord::Base blah blah end On my dev machine (OS X, ruby 1.8.6, rai…

---

## [Can't create a new class instance following instructions](https://www.ruby-forum.com/t/cant-create-a-new-class-instance-following-instructions/117683)

<div class="topic-metadata">

**Author:** [@glynne](https://www.ruby-forum.com/u/glynne)\
**Replies:** 2\
**Last updated:** [October 19, 2007, 4:03pm UTC](https://www.ruby-forum.com/t/cant-create-a-new-class-instance-following-instructions/117683 "2007-10-19T16:03:16Z")

</div>

I’m new to ruby On Rails, I’m running InstantRails on a Windows XP Pro. SP2 machine. I’m rigorously following the book ‘Build Your Own Ruby On Rails Web Applications’ by Patrick Lenz. I’ve reached ch4 without any prob…

---

## [Scaffolding based on an exiting model? Rails 2.0](https://www.ruby-forum.com/t/scaffolding-based-on-an-exiting-model-rails-2-0/117707)

<div class="topic-metadata">

**Author:** [@ant](https://www.ruby-forum.com/u/ant)\
**Replies:** 0\
**Last updated:** [October 19, 2007, 3:55pm UTC](https://www.ruby-forum.com/t/scaffolding-based-on-an-exiting-model-rails-2-0/117707 "2007-10-19T15:55:13Z")

</div>

After a fair bit of reading around and googling, it appears that I can not use script/generate scaffold to make a scaffold based on an existing model. Is this correct and if so is there a plugin that can achieve this …

---

## [Deploying in Production Level (Ideas please)](https://www.ruby-forum.com/t/deploying-in-production-level-ideas-please/117239)

<div class="topic-metadata">

**Author:** [@ace](https://www.ruby-forum.com/u/ace)\
**Replies:** 11\
**Last updated:** [October 19, 2007, 2:47pm UTC](https://www.ruby-forum.com/t/deploying-in-production-level-ideas-please/117239 "2007-10-19T14:47:44Z")

</div>

Dear All, I just started using rails. After surfing and reading a lot I need some feedback from you guys. In production level what is the best configuration to use Rails with maximum performance. Correct me if I am w…

---

## [App with different homepage per domain](https://www.ruby-forum.com/t/app-with-different-homepage-per-domain/113437)

<div class="topic-metadata">

**Author:** [@devaulw](https://www.ruby-forum.com/u/devaulw)\
**Replies:** 5\
**Last updated:** [October 19, 2007, 2:35pm UTC](https://www.ruby-forum.com/t/app-with-different-homepage-per-domain/113437 "2007-10-19T14:35:24Z")

</div>

I am trying to use a different homepage per domain pointed to a rails app. Based on the domain, only a subset of application data applies. Can you tell me how you would address this problem? The request\_routing plug…

---

## [Recommendations for a Ruby Polling/Survey/Voting type plugin?](https://www.ruby-forum.com/t/recommendations-for-a-ruby-polling-survey-voting-type-plugin/117660)

<div class="topic-metadata">

**Author:** [@LAB](https://www.ruby-forum.com/u/LAB)\
**Replies:** 1\
**Last updated:** [October 19, 2007, 2:15pm UTC](https://www.ruby-forum.com/t/recommendations-for-a-ruby-polling-survey-voting-type-plugin/117660 "2007-10-19T14:15:28Z")

</div>

I would like to add a Survey to my web application. Basically, I have 10 objects … imagine Restaurants, and I would like to ask the same 10 questions about each object … for instance rate the food, service, atmospher…

---

## [How to assign a id dinamically to checkbox created dinamical](https://www.ruby-forum.com/t/how-to-assign-a-id-dinamically-to-checkbox-created-dinamical/117631)

<div class="topic-metadata">

**Author:** [@vasure](https://www.ruby-forum.com/u/vasure)\
**Replies:** 2\
**Last updated:** [October 19, 2007, 2:13pm UTC](https://www.ruby-forum.com/t/how-to-assign-a-id-dinamically-to-checkbox-created-dinamical/117631 "2007-10-19T14:13:05Z")

</div>

hi

---

## [@session\['user'\] vs session\[:user\]](https://www.ruby-forum.com/t/session-user-vs-session-user/117468)

<div class="topic-metadata">

**Author:** [@elle](https://www.ruby-forum.com/u/elle)\
**Replies:** 9\
**Last updated:** [October 19, 2007, 1:59pm UTC](https://www.ruby-forum.com/t/session-user-vs-session-user/117468 "2007-10-19T13:59:00Z")

</div>

This might seem really simple to some but just wanted to ask: what is the difference between @session\[‘user’\] and session\[:user\] ? and how would you use each? And another question, I have the following code: def get\_…

---

## [Make sure that model.attribute is only set on :create?](https://www.ruby-forum.com/t/make-sure-that-model-attribute-is-only-set-on-create/117639)

<div class="topic-metadata">

**Author:** [@josh](https://www.ruby-forum.com/u/josh)\
**Replies:** 3\
**Last updated:** [October 19, 2007, 1:27pm UTC](https://www.ruby-forum.com/t/make-sure-that-model-attribute-is-only-set-on-create/117639 "2007-10-19T13:27:23Z")

</div>

Hi all My model Link has an attribute creator\_id which contains a foreign key to my Member model table. I want to make sure that the creator\_id is only “changeable” during the creation, and after it can’t be changed …

---

## [Pagination\_links problem](https://www.ruby-forum.com/t/pagination-links-problem/117675)

<div class="topic-metadata">

**Author:** [@rubyernewbie](https://www.ruby-forum.com/u/rubyernewbie)\
**Replies:** 1\
**Last updated:** [October 19, 2007, 1:02pm UTC](https://www.ruby-forum.com/t/pagination-links-problem/117675 "2007-10-19T13:02:28Z")

</div>

\<%= pagination\_links(@post\_pages) %\> that become 1 2 3 but I want it plus element,become 1 2 3 how should I do?

---

## [Block iteration issues](https://www.ruby-forum.com/t/block-iteration-issues/117688)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [October 19, 2007, 12:27pm UTC](https://www.ruby-forum.com/t/block-iteration-issues/117688 "2007-10-19T12:27:32Z")

</div>

Hello, I’m struggling with this stuff and can’t find an answer so please advise. What I’m trying to achieve @collection has 7 elements I want to: cycle through all those elements assign element\[“smth”\] through ele…

---

## [DEPRECATION WARNING: observer is deprecated](https://www.ruby-forum.com/t/deprecation-warning-observer-is-deprecated/117601)

<div class="topic-metadata">

**Author:** [@amagoia](https://www.ruby-forum.com/u/amagoia)\
**Replies:** 2\
**Last updated:** [October 19, 2007, 11:52am UTC](https://www.ruby-forum.com/t/deprecation-warning-observer-is-deprecated/117601 "2007-10-19T11:52:28Z")

</div>

Hello, I am getting the following warning: DEPRECATION WARNING: observer is deprecated and will be removed from Rails 2.0 See Ruby on Rails — A web-app framework that includes everything needed to create database-back…

---

## [Variables in find](https://www.ruby-forum.com/t/variables-in-find/117679)

<div class="topic-metadata">

**Author:** [@gorter9](https://www.ruby-forum.com/u/gorter9)\
**Replies:** 1\
**Last updated:** [October 19, 2007, 10:11am UTC](https://www.ruby-forum.com/t/variables-in-find/117679 "2007-10-19T10:11:11Z")

</div>

How can i make a variable in find my code is @gardens = Garden.find(:all, :conditions =\> { :user\_id =\> 1}) The number 1 must be a variable of user.id so you only get the stuff placed by the user logged in at the mome…

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

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