# Rails

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

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

---

## [Not able to install rDoc in Rails](https://www.ruby-forum.com/t/not-able-to-install-rdoc-in-rails/152073)

<div class="topic-metadata">

**Author:** [@caruso\_g](https://www.ruby-forum.com/u/caruso_g)\
**Replies:** 2\
**Last updated:** [October 29, 2008, 10:09pm UTC](https://www.ruby-forum.com/t/not-able-to-install-rdoc-in-rails/152073 "2008-10-29T22:09:40Z")

</div>

As the subject, I am not able to get installed the rDoc for Rails 2.1.2 Any suggestion? Already tried with the rdoc command and when installing the gem, even indicating the option to install them even if already set a…

---

## [HashWithIndifferentAccess in testing](https://www.ruby-forum.com/t/hashwithindifferentaccess-in-testing/152072)

<div class="topic-metadata">

**Author:** [@arachnd](https://www.ruby-forum.com/u/arachnd)\
**Replies:** 6\
**Last updated:** [October 29, 2008, 9:19pm UTC](https://www.ruby-forum.com/t/hashwithindifferentaccess-in-testing/152072 "2008-10-29T21:19:55Z")

</div>

Hi, I’m trying to externalize the strings in my application, and have this in the environment.rb file APP\_TEXT = (HashWithIndifferentAccess).new(YAML::load(File.open("#{RAILS\_ROOT}/config/strings.yml"))), This works…

---

## [Polymorphic Associations with inheritance](https://www.ruby-forum.com/t/polymorphic-associations-with-inheritance/152056)

<div class="topic-metadata">

**Author:** [@etetet](https://www.ruby-forum.com/u/etetet)\
**Replies:** 5\
**Last updated:** [October 29, 2008, 8:41pm UTC](https://www.ruby-forum.com/t/polymorphic-associations-with-inheritance/152056 "2008-10-29T20:41:06Z")

</div>

I have two models, Article and Post, that has many Comments. However, both Article and Post are inherited from a BaseContent class like so: class Article \< BaseContent has\_many :comments, :as =\> :commentable end cl…

---

## [Undefined method f\_title](https://www.ruby-forum.com/t/undefined-method-f-title/151823)

<div class="topic-metadata">

**Author:** [@Commander\_J](https://www.ruby-forum.com/u/Commander_J)\
**Replies:** 3\
**Last updated:** [October 29, 2008, 8:32pm UTC](https://www.ruby-forum.com/t/undefined-method-f-title/151823 "2008-10-29T20:32:49Z")

</div>

Hi, This is my migration: class CreateSampleForms \< ActiveRecord::Migration def self.add\_data SampleForm.create(:name =\> ‘Default (Empty)’, :f\_type =\> ‘Default (Empty)’, :description =\> ‘Use this template to create …

---

## [Acts as tree and belongs to](https://www.ruby-forum.com/t/acts-as-tree-and-belongs-to/152011)

<div class="topic-metadata">

**Author:** [@pandabeer](https://www.ruby-forum.com/u/pandabeer)\
**Replies:** 2\
**Last updated:** [October 29, 2008, 7:58pm UTC](https://www.ruby-forum.com/t/acts-as-tree-and-belongs-to/152011 "2008-10-29T19:58:16Z")

</div>

Hello all, is that possible to define an association between Section and Category just for the root of a category? Here is my Category model: class Category \< ActiveRecord::Base acts\_as\_tree :order =\> “name” belong…

---

## [Verify that an email is sent?](https://www.ruby-forum.com/t/verify-that-an-email-is-sent/151742)

<div class="topic-metadata">

**Author:** [@josh](https://www.ruby-forum.com/u/josh)\
**Replies:** 2\
**Last updated:** [October 29, 2008, 7:49pm UTC](https://www.ruby-forum.com/t/verify-that-an-email-is-sent/151742 "2008-10-29T19:49:01Z")

</div>

Hi all I’m trying to get my actionmailer to work. I’ve set the following params in my environment.rb: config.action\_mailer.smtp\_settings = { :address =\> “mail.???.ch”, :port =\> 25, :domain =\> “???.ch”, :authentica…

---

## [AJAX and REST: rendering partials](https://www.ruby-forum.com/t/ajax-and-rest-rendering-partials/152038)

<div class="topic-metadata">

**Author:** [@ratcheer](https://www.ruby-forum.com/u/ratcheer)\
**Replies:** 2\
**Last updated:** [October 29, 2008, 7:43pm UTC](https://www.ruby-forum.com/t/ajax-and-rest-rendering-partials/152038 "2008-10-29T19:43:12Z")

</div>

Hi, I have an Items resource and each Item has an attribute ‘starred’. The items/index page shows a list of items, each one is in its own partial and has an image of a star (star\_off.gif) next to it. When the star i…

---

## ["Remember Me" feature](https://www.ruby-forum.com/t/remember-me-feature/151932)

<div class="topic-metadata">

**Author:** [@thabenksta](https://www.ruby-forum.com/u/thabenksta)\
**Replies:** 4\
**Last updated:** [October 29, 2008, 7:25pm UTC](https://www.ruby-forum.com/t/remember-me-feature/151932 "2008-10-29T19:25:14Z")

</div>

Posted by Ben K. (biguniverse) on 28.10.2008 02:28 I realize this has probably been asked on these forums before but I wanted to get the latest information on what’s available. We need to implement the typical “Rememb…

---

## [Cloud computing and Ruby on Rails](https://www.ruby-forum.com/t/cloud-computing-and-ruby-on-rails/151993)

<div class="topic-metadata">

**Author:** [@Delirium\_tremens](https://www.ruby-forum.com/u/Delirium_tremens)\
**Replies:** 4\
**Last updated:** [October 29, 2008, 7:14pm UTC](https://www.ruby-forum.com/t/cloud-computing-and-ruby-on-rails/151993 "2008-10-29T19:14:04Z")

</div>

How does cloud computing relate to Ruby on Rails?

---

## [RSpec and Testing for the presence of css class](https://www.ruby-forum.com/t/rspec-and-testing-for-the-presence-of-css-class/152039)

<div class="topic-metadata">

**Author:** [@Armand\_du\_Plessis](https://www.ruby-forum.com/u/Armand_du_Plessis)\
**Replies:** 3\
**Last updated:** [October 29, 2008, 7:12pm UTC](https://www.ruby-forum.com/t/rspec-and-testing-for-the-presence-of-css-class/152039 "2008-10-29T19:12:54Z")

</div>

Hi there, Hoping someone can help with this or point out alternative options for testing for the presence of a css class on a specific element. We’re using rspec and I would like to check for the presence of a specif…

---

## [Page does not seem to be reloaded on prod server](https://www.ruby-forum.com/t/page-does-not-seem-to-be-reloaded-on-prod-server/151989)

<div class="topic-metadata">

**Author:** [@josh](https://www.ruby-forum.com/u/josh)\
**Replies:** 5\
**Last updated:** [October 29, 2008, 7:03pm UTC](https://www.ruby-forum.com/t/page-does-not-seem-to-be-reloaded-on-prod-server/151989 "2008-10-29T19:03:49Z")

</div>

Hi all I’ve coded a small shop that works well on my dev machine (OSX 10.5). But look at the following page: http://shop.incense.ch/compact\_discs/1 When clicking “Reservieren”, the page is forwarded to a new page, wh…

---

## [To\_xml associations and :only](https://www.ruby-forum.com/t/to-xml-associations-and-only/151971)

<div class="topic-metadata">

**Author:** [@arvias](https://www.ruby-forum.com/u/arvias)\
**Replies:** 1\
**Last updated:** [October 29, 2008, 7:00pm UTC](https://www.ruby-forum.com/t/to-xml-associations-and-only/151971 "2008-10-29T19:00:00Z")

</div>

Hi, A call to to\_xml(:only =\> \[:field\], :include =\> :association\]) will filter the association result too(the resulting association will only have :field). Is there a way around this? I want to specify different fil…

---

## [Examples of forms using nested resources?](https://www.ruby-forum.com/t/examples-of-forms-using-nested-resources/152064)

<div class="topic-metadata">

**Author:** [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Replies:** 1\
**Last updated:** [October 29, 2008, 6:56pm UTC](https://www.ruby-forum.com/t/examples-of-forms-using-nested-resources/152064 "2008-10-29T18:56:29Z")

</div>

Does anyone know of some examples of simple forms using nested resources? I want to have a parent record, with many child records all on the one form, and have all the add, edit, delete etc methods available on the c…

---

## [ActiveMerchant / ARB Code Advice](https://www.ruby-forum.com/t/activemerchant-arb-code-advice/152066)

<div class="topic-metadata">

**Author:** [@jeremy](https://www.ruby-forum.com/u/jeremy)\
**Replies:** 0\
**Last updated:** [October 29, 2008, 6:20pm UTC](https://www.ruby-forum.com/t/activemerchant-arb-code-advice/152066 "2008-10-29T18:20:44Z")

</div>

Would anyone with some experience at best practices with getting recurring billing working be willing to look at my code and perhaps point out how to improve and get my validations and objects going in the right order…

---

## [SQL in rails](https://www.ruby-forum.com/t/sql-in-rails/152051)

<div class="topic-metadata">

**Author:** [@xxmithila](https://www.ruby-forum.com/u/xxmithila)\
**Replies:** 2\
**Last updated:** [October 29, 2008, 5:49pm UTC](https://www.ruby-forum.com/t/sql-in-rails/152051 "2008-10-29T17:49:40Z")

</div>

Hi all… please give me an example that use SQL in models to handel data in the data base. with “sql.execute” or any other possible way… thankx

---

## [Generate Model or Migration not getting 001\_create.rb](https://www.ruby-forum.com/t/generate-model-or-migration-not-getting-001-create-rb/151819)

<div class="topic-metadata">

**Author:** [@Wes\_D](https://www.ruby-forum.com/u/Wes_D)\
**Replies:** 2\
**Last updated:** [October 29, 2008, 5:00pm UTC](https://www.ruby-forum.com/t/generate-model-or-migration-not-getting-001-create-rb/151819 "2008-10-29T17:00:59Z")

</div>

When I run “ruby script/generate model users” or “ruby script/generate migration users” (just as a test to see what number the migrations is going to give me as a first run on a newly created project) I get something…

---

## [Controller mixins not present in tests?](https://www.ruby-forum.com/t/controller-mixins-not-present-in-tests/151599)

<div class="topic-metadata">

**Author:** [@Antonio\_Tapiador\_de](https://www.ruby-forum.com/u/Antonio_Tapiador_de)\
**Replies:** 1\
**Last updated:** [October 29, 2008, 4:49pm UTC](https://www.ruby-forum.com/t/controller-mixins-not-present-in-tests/151599 "2008-10-29T16:49:47Z")

</div>

I’m using Controller mixins in an application, overwriding just one method from the plugin. Everything works fine in develpment env, but when passing tests, it seems like the Controller from the plugin isn’t loaded: …

---

## [How to react to a key press in rjs file?](https://www.ruby-forum.com/t/how-to-react-to-a-key-press-in-rjs-file/152060)

<div class="topic-metadata">

**Author:** [@christopher](https://www.ruby-forum.com/u/christopher)\
**Replies:** 1\
**Last updated:** [October 29, 2008, 4:08pm UTC](https://www.ruby-forum.com/t/how-to-react-to-a-key-press-in-rjs-file/152060 "2008-10-29T16:08:42Z")

</div>

Hi everybody, I’m a rails beginner and I’m trying to figure out how to react to a keyboard press in an rjs-file and then do some stuff to the page. It should go something like this: if @correct #do something #wait …

---

## [Disable protected attributes for create or save](https://www.ruby-forum.com/t/disable-protected-attributes-for-create-or-save/152058)

<div class="topic-metadata">

**Author:** [@arvias](https://www.ruby-forum.com/u/arvias)\
**Replies:** 1\
**Last updated:** [October 29, 2008, 4:01pm UTC](https://www.ruby-forum.com/t/disable-protected-attributes-for-create-or-save/152058 "2008-10-29T16:01:40Z")

</div>

Hi, Is there a way to temporarily disable attr\_protected for create and save method calls? Something like save\_without\_protected… – M.

---

## [Perooidically\_call\_remote](https://www.ruby-forum.com/t/perooidically-call-remote/152005)

<div class="topic-metadata">

**Author:** [@snantz](https://www.ruby-forum.com/u/snantz)\
**Replies:** 2\
**Last updated:** [October 29, 2008, 3:30pm UTC](https://www.ruby-forum.com/t/perooidically-call-remote/152005 "2008-10-29T15:30:41Z")

</div>

I am using the following for to peroidically call back to the control to see if a certain amount of time has passed: in .rhtml \<%= periodically\_call\_remote :url =\> { :action =\> ‘session\_expiry’ }, :update =\> ‘’ %\> i…

---

## [How to run multiple application on mongrel using proxy?](https://www.ruby-forum.com/t/how-to-run-multiple-application-on-mongrel-using-proxy/152055)

<div class="topic-metadata">

**Author:** [@gordons11](https://www.ruby-forum.com/u/gordons11)\
**Replies:** 0\
**Last updated:** [October 29, 2008, 3:21pm UTC](https://www.ruby-forum.com/t/how-to-run-multiple-application-on-mongrel-using-proxy/152055 "2008-10-29T15:21:20Z")

</div>

hey im wondering how can i run multiple application on mongrel using proxy. my supervisor wants it so that mongrel does everything for you. for example mongrel should know that the relative url is http://domain/myapp …

---

## [(Newbie) routing question](https://www.ruby-forum.com/t/newbie-routing-question/151956)

<div class="topic-metadata">

**Author:** [@vahagn](https://www.ruby-forum.com/u/vahagn)\
**Replies:** 2\
**Last updated:** [October 29, 2008, 3:11pm UTC](https://www.ruby-forum.com/t/newbie-routing-question/151956 "2008-10-29T15:11:44Z")

</div>

Hi, I have a question about routing and nested resources. I have an app with Photos that belong to Users via a many2one relationship. The URL: http://localhost:3000/photos lists all photos (from all users). Clicking o…

---

## [Using text helper in a model class](https://www.ruby-forum.com/t/using-text-helper-in-a-model-class/152035)

<div class="topic-metadata">

**Author:** [@vanight](https://www.ruby-forum.com/u/vanight)\
**Replies:** 1\
**Last updated:** [October 29, 2008, 2:58pm UTC](https://www.ruby-forum.com/t/using-text-helper-in-a-model-class/152035 "2008-10-29T14:58:49Z")

</div>

Hi, I have refactored my code and the previous function in my controller help.truncate() doesn’t seems to work anymore in my model. My model class is generating files and I’d like to use this text helper. How can I f…

---

## [Who uses a virtualized server witth separated VMs?](https://www.ruby-forum.com/t/who-uses-a-virtualized-server-witth-separated-vms/151476)

<div class="topic-metadata">

**Author:** [@fipa](https://www.ruby-forum.com/u/fipa)\
**Replies:** 6\
**Last updated:** [October 29, 2008, 2:57pm UTC](https://www.ruby-forum.com/t/who-uses-a-virtualized-server-witth-separated-vms/151476 "2008-10-29T14:57:03Z")

</div>

Hi, Following Ezra’s advice in his book “rails deployment”, I have decided to go through all the pain of setting up a server virtualized with Xen, and separate each layer of the application in its own VM. So I have 4…

---

## [Store session variable in a table](https://www.ruby-forum.com/t/store-session-variable-in-a-table/152030)

<div class="topic-metadata">

**Author:** [@ruby\_ishk](https://www.ruby-forum.com/u/ruby_ishk)\
**Replies:** 4\
**Last updated:** [October 29, 2008, 2:09pm UTC](https://www.ruby-forum.com/t/store-session-variable-in-a-table/152030 "2008-10-29T14:09:58Z")

</div>

hi,can anyone tell me how a session variable can store in table,

---

## [\[ANN/ADV\] Intro and Advanced Rails training in Florida in January](https://www.ruby-forum.com/t/ann-adv-intro-and-advanced-rails-training-in-florida-in-january/152046)

<div class="topic-metadata">

**Author:** [@David\_ASBlack](https://www.ruby-forum.com/u/David_ASBlack)\
**Replies:** 0\
**Last updated:** [October 29, 2008, 1:41pm UTC](https://www.ruby-forum.com/t/ann-adv-intro-and-advanced-rails-training-in-florida-in-january/152046 "2008-10-29T13:41:45Z")

</div>

Hi everyone – My .sig has said so for a while, but I thought I would directly announce two Rails training courses from Ruby Power and Light, coming up in Florida in January, both in Fort Lauderdaler Intro to Ruby on …

---

## [Attributes on join model](https://www.ruby-forum.com/t/attributes-on-join-model/152001)

<div class="topic-metadata">

**Author:** [@ahoward](https://www.ruby-forum.com/u/ahoward)\
**Replies:** 3\
**Last updated:** [October 29, 2008, 12:13pm UTC](https://www.ruby-forum.com/t/attributes-on-join-model/152001 "2008-10-29T12:13:47Z")

</div>

given a setup like class Parent has\_many :child\_parents has\_many :children, :through =\> child\_parents end and assuming i’d like to store the style of relationship on the child\_parents table, for example create tab…

---

## [Pagination in ajax](https://www.ruby-forum.com/t/pagination-in-ajax/151874)

<div class="topic-metadata">

**Author:** [@subhadip](https://www.ruby-forum.com/u/subhadip)\
**Replies:** 8\
**Last updated:** [October 29, 2008, 11:47am UTC](https://www.ruby-forum.com/t/pagination-in-ajax/151874 "2008-10-29T11:47:26Z")

</div>

hi, I am curently using rails version 2.1.1. Currently i have done simple pagination using will\_paginate plugin.it works.but when i am trying pagination using ajax with help of will\_paginate plugin it wont works.i a…

---

## [Problem of Active Resource in production mode](https://www.ruby-forum.com/t/problem-of-active-resource-in-production-mode/152031)

<div class="topic-metadata">

**Author:** [@Omnibus](https://www.ruby-forum.com/u/Omnibus)\
**Replies:** 1\
**Last updated:** [October 29, 2008, 10:27am UTC](https://www.ruby-forum.com/t/problem-of-active-resource-in-production-mode/152031 "2008-10-29T10:27:02Z")

</div>

I have the following code in a controller with an AcitveResource base class in Farm and Server which working perfectly in development mode but not in production. It seems some caching mechanism make it broken and I n…

---

## [Backwards N+1 problem](https://www.ruby-forum.com/t/backwards-n-1-problem/151929)

<div class="topic-metadata">

**Author:** [@indigoi](https://www.ruby-forum.com/u/indigoi)\
**Replies:** 3\
**Last updated:** [October 29, 2008, 10:11am UTC](https://www.ruby-forum.com/t/backwards-n-1-problem/151929 "2008-10-29T10:11:47Z")

</div>

Hey, iâ€™m running into an N+1 problem, but i don’t exactly know how to :include in this situation. (controller code is at the bottom). I’m trying to find all of the highest ranked definitions, and then render their a…

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

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