# Rails

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

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

---

## [2.0 documentation, tutorials, books?](https://www.ruby-forum.com/t/2-0-documentation-tutorials-books/130711)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [March 2, 2008, 10:38am UTC](https://www.ruby-forum.com/t/2-0-documentation-tutorials-books/130711 "2008-03-02T10:38:30Z")

</div>

Hello, I’m new to ruby on rails. I took a look at it a few years ago but it changed a lot since then. The thing is I can’t find a book on 2.0. I’ve all those books on 1.2.x (agile development with ruby on rails, rail…

---

## [Post method map.resources](https://www.ruby-forum.com/t/post-method-map-resources/130710)

<div class="topic-metadata">

**Author:** [@grayson](https://www.ruby-forum.com/u/grayson)\
**Replies:** 1\
**Last updated:** [March 2, 2008, 10:11am UTC](https://www.ruby-forum.com/t/post-method-map-resources/130710 "2008-03-02T10:11:31Z")

</div>

Sorry if this is a really basic question but I can’t seem to add my own action that works through a post method. I’ve tried :new, :create, :collection, :member, etc without any success it seems to automatically take…

---

## [No database data showing up no warning message](https://www.ruby-forum.com/t/no-database-data-showing-up-no-warning-message/130698)

<div class="topic-metadata">

**Author:** [@drorchung](https://www.ruby-forum.com/u/drorchung)\
**Replies:** 2\
**Last updated:** [March 2, 2008, 8:12am UTC](https://www.ruby-forum.com/t/no-database-data-showing-up-no-warning-message/130698 "2008-03-02T08:12:30Z")

</div>

After working for several days, I finally got Ruby on Rails set up on my Ubuntu. I read several tutorials and tried with them. Finally, I adopted the sample used in http://www.oracle.com/technology/pub/articles/hae…

---

## [Class function vs. object function](https://www.ruby-forum.com/t/class-function-vs-object-function/130702)

<div class="topic-metadata">

**Author:** [@dino\_d](https://www.ruby-forum.com/u/dino_d)\
**Replies:** 1\
**Last updated:** [March 2, 2008, 6:34am UTC](https://www.ruby-forum.com/t/class-function-vs-object-function/130702 "2008-03-02T06:34:06Z")

</div>

Hi - I want to define a customized finding method on a class, that is accessible to the class, not just the object, just like you can say Class.find(:all) for ActiveRecord without needing an instance of Class. So, I …

---

## [Rails failing to post to create for resource under dispatch.\[f\]cgi](https://www.ruby-forum.com/t/rails-failing-to-post-to-create-for-resource-under-dispatch-f-cgi/130705)

<div class="topic-metadata">

**Author:** [@capnregex](https://www.ruby-forum.com/u/capnregex)\
**Replies:** 0\
**Last updated:** [March 2, 2008, 5:38am UTC](https://www.ruby-forum.com/t/rails-failing-to-post-to-create-for-resource-under-dispatch-f-cgi/130705 "2008-03-02T05:38:26Z")

</div>

I have discovered some odd behavior while trying to get an application to work under fcgid… as I have also discovered this problem happening under plain old cgi, but not under script/server or mongrel, I thought that …

---

## [DB sessions store table structure](https://www.ruby-forum.com/t/db-sessions-store-table-structure/130701)

<div class="topic-metadata">

**Author:** [@praveen\_pg](https://www.ruby-forum.com/u/praveen_pg)\
**Replies:** 0\
**Last updated:** [March 2, 2008, 5:17am UTC](https://www.ruby-forum.com/t/db-sessions-store-table-structure/130701 "2008-03-02T05:17:31Z")

</div>

Hello, I was working on a POC (proof of concept) to prove that RAILS is an alternative to consider for our web projects. I have enjoyed my RAILS experience till now. I was trying to create a sessions table in Oracle …

---

## [Ssl\_requirement: transitions from https to http and vice versa are slooooow](https://www.ruby-forum.com/t/ssl-requirement-transitions-from-https-to-http-and-vice-versa-are-slooooow/130700)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [March 2, 2008, 4:55am UTC](https://www.ruby-forum.com/t/ssl-requirement-transitions-from-https-to-http-and-vice-versa-are-slooooow/130700 "2008-03-02T04:55:06Z")

</div>

Hi, I’m using rails 1.2.5 along with nginx and mongrel\_cluster to serve both encrypted and unencrypted content. I installed the ssl\_requirement plugin to force https on certain pages/ actions. ssl\_requirement works,…

---

## [\[ANN\] BackgrounDRb 1.0.3 release ( Requiem for a dream )](https://www.ruby-forum.com/t/ann-backgroundrb-1-0-3-release-requiem-for-a-dream/130699)

<div class="topic-metadata">

**Author:** [@gnufied](https://www.ruby-forum.com/u/gnufied)\
**Replies:** 1\
**Last updated:** [March 2, 2008, 4:40am UTC](https://www.ruby-forum.com/t/ann-backgroundrb-1-0-3-release-requiem-for-a-dream/130699 "2008-03-02T04:40:27Z")

</div>

Hi Folks, BackgrounDRb 1.0.3 is available now. This release contains several bug fixes, cleanups, test case coverage and brand new documentation. A brief ChangeLog: 2008-02-28 hemant kumar hemant@shire fixed som…

---

## [The best way to do primary keys?](https://www.ruby-forum.com/t/the-best-way-to-do-primary-keys/130677)

<div class="topic-metadata">

**Author:** [@bodikp](https://www.ruby-forum.com/u/bodikp)\
**Replies:** 4\
**Last updated:** [March 1, 2008, 11:39pm UTC](https://www.ruby-forum.com/t/the-best-way-to-do-primary-keys/130677 "2008-03-01T23:39:24Z")

</div>

I’ve just made a simple test app - it’s a very basic blog. I ran this (or something vaguely like this): ruby script/generate scaffold article title:string body:text id:primary\_key Now, I’ve got the scaffold, but it s…

---

## [Habtm and counter\_cache](https://www.ruby-forum.com/t/habtm-and-counter-cache/130528)

<div class="topic-metadata">

**Author:** [@foxbunny](https://www.ruby-forum.com/u/foxbunny)\
**Replies:** 1\
**Last updated:** [March 1, 2008, 11:08pm UTC](https://www.ruby-forum.com/t/habtm-and-counter-cache/130528 "2008-03-01T23:08:56Z")

</div>

Hi, I’ve a set of two models in habtm relationship. However, since :counter\_cache can only be used on belongs\_to method, how can I implement the counter cache on habtm models? I have tried with after\_add and after\_re…

---

## [Testing XML over HTTP in a Rails app](https://www.ruby-forum.com/t/testing-xml-over-http-in-a-rails-app/130687)

<div class="topic-metadata">

**Author:** [@Olly\_L](https://www.ruby-forum.com/u/Olly_L)\
**Replies:** 0\
**Last updated:** [March 1, 2008, 10:40pm UTC](https://www.ruby-forum.com/t/testing-xml-over-http-in-a-rails-app/130687 "2008-03-01T22:40:32Z")

</div>

Hi I’m looking at testing the XML API methods of my RESTful controllers – create, update etc. I thought this would be really straightforward, and perhaps it is, but I’m struggling to find a good explanation of how t…

---

## [Using group in with find in an ActiveRecord appropriately](https://www.ruby-forum.com/t/using-group-in-with-find-in-an-activerecord-appropriately/186764)

<div class="topic-metadata">

**Author:** [@rob](https://www.ruby-forum.com/u/rob)\
**Replies:** 4\
**Last updated:** [March 1, 2008, 10:16pm UTC](https://www.ruby-forum.com/t/using-group-in-with-find-in-an-activerecord-appropriately/186764 "2008-03-01T22:16:57Z")

</div>

I’m playing around with the Practical Rails Projects code, and was attempting to make a change for graphing data differently using groupings. Basically the code went from: total\_weight = @exercise.activities.collect …

---

## [Caching Problem](https://www.ruby-forum.com/t/caching-problem/129354)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [March 1, 2008, 9:07pm UTC](https://www.ruby-forum.com/t/caching-problem/129354 "2008-03-01T21:07:48Z")

</div>

Hello, I’m running rails 2.0.2 and mongrel 1.1.3, trying to get caching working with multiple parameters. I found sites that pointed out you need to make sure the parameters are part of the URL, so I have built rout…

---

## [Evaluating rubycode after redirect](https://www.ruby-forum.com/t/evaluating-rubycode-after-redirect/130680)

<div class="topic-metadata">

**Author:** [@der\_guido](https://www.ruby-forum.com/u/der_guido)\
**Replies:** 1\
**Last updated:** [March 1, 2008, 8:18pm UTC](https://www.ruby-forum.com/t/evaluating-rubycode-after-redirect/130680 "2008-03-01T20:18:24Z")

</div>

Hi, there is somthing, that I do not understand. class MyController \< ApplicationController def index … end def my\_def redirect\_to :action=\> “index” unless params\[:id\] my\_model = MyModel.find(params\[:id\]) ... en…

---

## [How to selectively display a field in the View?](https://www.ruby-forum.com/t/how-to-selectively-display-a-field-in-the-view/130652)

<div class="topic-metadata">

**Author:** [@nahabed](https://www.ruby-forum.com/u/nahabed)\
**Replies:** 1\
**Last updated:** [March 1, 2008, 3:44pm UTC](https://www.ruby-forum.com/t/how-to-selectively-display-a-field-in-the-view/130652 "2008-03-01T15:44:25Z")

</div>

I am building a app for trading books where a user lists books that they want to trade and those then want to get. I have a Book model with title, author and condition as attributes. The “condition” attribute (good, f…

---

## [Question about installing rails with mongrel](https://www.ruby-forum.com/t/question-about-installing-rails-with-mongrel/130581)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [March 1, 2008, 1:36pm UTC](https://www.ruby-forum.com/t/question-about-installing-rails-with-mongrel/130581 "2008-03-01T13:36:55Z")

</div>

Hi, I’ve decided to go with an Apache-Mongrel installation. But I have a question. Following the instructions here – http://blog.codahale.com/2006/06/19/time-for-a-grown-up-server-rails-mongrel-apache-capistrano-and…

---

## [Validates\_uniqueness\_of and combo of three fields](https://www.ruby-forum.com/t/validates-uniqueness-of-and-combo-of-three-fields/130597)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 3\
**Last updated:** [March 1, 2008, 12:30pm UTC](https://www.ruby-forum.com/t/validates-uniqueness-of-and-combo-of-three-fields/130597 "2008-03-01T12:30:11Z")

</div>

I have a model, Property, that has\_many\_polymorphs. The associated join table (labellings) has fields: id (simple record id), property\_id, labellable\_id labellable\_type. It’s basically the same system used with ac…

---

## [Default AS show behavior](https://www.ruby-forum.com/t/default-as-show-behavior/130645)

<div class="topic-metadata">

**Author:** [@agilehack](https://www.ruby-forum.com/u/agilehack)\
**Replies:** 1\
**Last updated:** [March 1, 2008, 10:21am UTC](https://www.ruby-forum.com/t/default-as-show-behavior/130645 "2008-03-01T10:21:33Z")

</div>

I am new to AS and probably using it in the simplest manner but…by default when I invoke my controller- localhost:3000/mycontroller the default behavior is to show all the data for the model I am tied to. (kind of lik…

---

## [Open-ID not working](https://www.ruby-forum.com/t/open-id-not-working/130650)

<div class="topic-metadata">

**Author:** [@chirag\_shah](https://www.ruby-forum.com/u/chirag_shah)\
**Replies:** 1\
**Last updated:** [March 1, 2008, 9:47am UTC](https://www.ruby-forum.com/t/open-id-not-working/130650 "2008-03-01T09:47:42Z")

</div>

Hi, I have problem while i am going to apply open-id in my application. It gives an Error of “uninitialized constant OpenID::Store” I have added all require files and also added one open\_url column in my user table. …

---

## [How to express this architecture](https://www.ruby-forum.com/t/how-to-express-this-architecture/130651)

<div class="topic-metadata">

**Author:** [@uvsoft](https://www.ruby-forum.com/u/uvsoft)\
**Replies:** 0\
**Last updated:** [March 1, 2008, 9:07am UTC](https://www.ruby-forum.com/t/how-to-express-this-architecture/130651 "2008-03-01T09:07:16Z")

</div>

Hi, There are several models, an instance of one model can own (be an owner) another instance (that is a possession, property) of the same or another model. How to express this architecture, so that I can easily acce…

---

## [RJS and after\_filter](https://www.ruby-forum.com/t/rjs-and-after-filter/85302)

<div class="topic-metadata">

**Author:** [@Marcello\_P](https://www.ruby-forum.com/u/Marcello_P)\
**Replies:** 9\
**Last updated:** [March 1, 2008, 8:08am UTC](https://www.ruby-forum.com/t/rjs-and-after-filter/85302 "2008-03-01T08:08:48Z")

</div>

Hello all, I need to call page.replace\_html in every Ajax call. Is there a way to do this in some after\_filter ? I tried a render :update do |page| in after\_filter, but it says that can only render once per action… T…

---

## [Undefined method \`calendar\_date\_select\_tag'](https://www.ruby-forum.com/t/undefined-method-calendar-date-select-tag/130542)

<div class="topic-metadata">

**Author:** [@hbotadra](https://www.ruby-forum.com/u/hbotadra)\
**Replies:** 1\
**Last updated:** [March 1, 2008, 4:44am UTC](https://www.ruby-forum.com/t/undefined-method-calendar-date-select-tag/130542 "2008-03-01T04:44:09Z")

</div>

Hi, I am trying to use the ‘Calendar Date Select’ plugin (http://calendardateselect.googlecode.com/svn/tags/calendar\_date\_select/). I’ve copied all the necessary files (javascript + css + calendar\_date\_select.rb and…

---

## [Fixtures in ActionController::TestCase](https://www.ruby-forum.com/t/fixtures-in-actioncontroller-testcase/130642)

<div class="topic-metadata">

**Author:** [@JTJTJT](https://www.ruby-forum.com/u/JTJTJT)\
**Replies:** 0\
**Last updated:** [March 1, 2008, 3:48am UTC](https://www.ruby-forum.com/t/fixtures-in-actioncontroller-testcase/130642 "2008-03-01T03:48:28Z")

</div>

Hi guys, Need some help. I am using Rails 2.0 and while writing functional test, I encountered the following problem class UserControllerTest \< ActionController::TestCase fixtures :users … def do\_something attemp…

---

## [Please Mock me :-) Rspec](https://www.ruby-forum.com/t/please-mock-me-rspec/130372)

<div class="topic-metadata">

**Author:** [@confundido](https://www.ruby-forum.com/u/confundido)\
**Replies:** 9\
**Last updated:** [March 1, 2008, 3:17am UTC](https://www.ruby-forum.com/t/please-mock-me-rspec/130372 "2008-03-01T03:17:23Z")

</div>

Hi all, I’m trying to understand rspec. questions:- Can/should I use mock in model tests. I’m thinking to mock out models external to the test ie parent/child objects etc so assuming answer to question 1 is ye…

---

## [Calendar Solution](https://www.ruby-forum.com/t/calendar-solution/130593)

<div class="topic-metadata">

**Author:** [@akitaonrails](https://www.ruby-forum.com/u/akitaonrails)\
**Replies:** 1\
**Last updated:** [March 1, 2008, 2:20am UTC](https://www.ruby-forum.com/t/calendar-solution/130593 "2008-03-01T02:20:32Z")

</div>

Hi, I have a requirement in a project to have something like a “group calendar” meaning that I am going to have several different calendar (one per person) that are going to cross some global calendar (local and natio…

---

## [Always use eager loading on a specific model?](https://www.ruby-forum.com/t/always-use-eager-loading-on-a-specific-model/130526)

<div class="topic-metadata">

**Author:** [@adam](https://www.ruby-forum.com/u/adam)\
**Replies:** 3\
**Last updated:** [March 1, 2008, 2:12am UTC](https://www.ruby-forum.com/t/always-use-eager-loading-on-a-specific-model/130526 "2008-03-01T02:12:19Z")

</div>

Let’s say I’ve got the following models: Book MyBook User Author Where books and user has\_many :through =\> my\_books, author has\_many books, and books belongs\_to author and user. If books/index showed me all of the…

---

## [Gems on shared server](https://www.ruby-forum.com/t/gems-on-shared-server/130615)

<div class="topic-metadata">

**Author:** [@chrisolsen](https://www.ruby-forum.com/u/chrisolsen)\
**Replies:** 6\
**Last updated:** [March 1, 2008, 2:12am UTC](https://www.ruby-forum.com/t/gems-on-shared-server/130615 "2008-03-01T02:12:01Z")

</div>

To use gems on a shared server do I have to get the server admin to install it for me? Or is there another way? In a small project I use GoogleCharts and fastercsv which were only available as gems and not rails plug…

---

## [RJB Not Working?](https://www.ruby-forum.com/t/rjb-not-working/130395)

<div class="topic-metadata">

**Author:** [@chell](https://www.ruby-forum.com/u/chell)\
**Replies:** 1\
**Last updated:** [March 1, 2008, 12:47am UTC](https://www.ruby-forum.com/t/rjb-not-working/130395 "2008-03-01T00:47:42Z")

</div>

Heya all – I recently downloaded the RJB 1.1.1 gem, and the install seemed to go fine. However, when I try to require ‘rjb’ I get the following error: no such file to load – rjb Has anyone seen this before? Any thoug…

---

## [Observer with group of radio buttons](https://www.ruby-forum.com/t/observer-with-group-of-radio-buttons/130609)

<div class="topic-metadata">

**Author:** [@neha-rohan](https://www.ruby-forum.com/u/neha-rohan)\
**Replies:** 4\
**Last updated:** [February 29, 2008, 11:33pm UTC](https://www.ruby-forum.com/t/observer-with-group-of-radio-buttons/130609 "2008-02-29T23:33:20Z")

</div>

Hi, My code looks like this \<%get\_date\_ranges().each{|arr|%\> \<%=arr\[1\]%\> \<%}%\> \<%= observe\_field(“criteria\[#{count}\]”, :url =\> { :action =\> :date\_range, :count =\> count,:type\_id =\> type\_id, :report\_key =\> repo…

---

## [Eliminate leading-directory name from URL's](https://www.ruby-forum.com/t/eliminate-leading-directory-name-from-urls/130613)

<div class="topic-metadata">

**Author:** [@inari](https://www.ruby-forum.com/u/inari)\
**Replies:** 2\
**Last updated:** [February 29, 2008, 11:28pm UTC](https://www.ruby-forum.com/t/eliminate-leading-directory-name-from-urls/130613 "2008-02-29T23:28:50Z")

</div>

Hello, Is there a way to get Rails to ignore a leading-directory in a URL (either in the environment.rb or routes.rb file)? For example, I’d like all requests to: http://domain.com/blah/products to get processed as \[…

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

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