# Rails

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

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

---

## [Switching Google Maps API Key from Deplyoment to Production](https://www.ruby-forum.com/t/switching-google-maps-api-key-from-deplyoment-to-production/137293)

<div class="topic-metadata">

**Author:** [@sjglazer](https://www.ruby-forum.com/u/sjglazer)\
**Replies:** 0\
**Last updated:** [May 11, 2008, 4:05pm UTC](https://www.ruby-forum.com/t/switching-google-maps-api-key-from-deplyoment-to-production/137293 "2008-05-11T16:05:18Z")

</div>

Hi there everyone, I have a rails app that used Google Maps in some of the views. In order to use it I have to include the following code at the top of my view: However, I have two separate keys - one for production …

---

## [Depot Application](https://www.ruby-forum.com/t/depot-application/137137)

<div class="topic-metadata">

**Author:** [@vijay](https://www.ruby-forum.com/u/vijay)\
**Replies:** 1\
**Last updated:** [May 11, 2008, 4:02pm UTC](https://www.ruby-forum.com/t/depot-application/137137 "2008-05-11T16:02:46Z")

</div>

Hello All, I am doing the depot appliction. I was first installed Instant Rails 2.0 on my machine. got error in getting scaffold :product then after searching in forum took the 1.2.6 version using the below command …

---

## [Question about adding user options to a blog](https://www.ruby-forum.com/t/question-about-adding-user-options-to-a-blog/137281)

<div class="topic-metadata">

**Author:** [@GabrielG1976](https://www.ruby-forum.com/u/GabrielG1976)\
**Replies:** 1\
**Last updated:** [May 11, 2008, 3:48pm UTC](https://www.ruby-forum.com/t/question-about-adding-user-options-to-a-blog/137281 "2008-05-11T15:48:04Z")

</div>

Hello everyone I new to this group I have a question about associations between I have e created a User registering page login/ logout ect… I like to added a Blog and have it be that you have to be signed in before y…

---

## [Month Names Constant](https://www.ruby-forum.com/t/month-names-constant/137277)

<div class="topic-metadata">

**Author:** [@johnt519](https://www.ruby-forum.com/u/johnt519)\
**Replies:** 2\
**Last updated:** [May 11, 2008, 3:34pm UTC](https://www.ruby-forum.com/t/month-names-constant/137277 "2008-05-11T15:34:33Z")

</div>

This is a pretty silly question, but I haven’t been able to find the answer. Does Ruby or Rails have a built in constant for the English month names i.e. January, February etc. or do I have to make my own? Thanks, Jo…

---

## [UnKnownAction exception](https://www.ruby-forum.com/t/unknownaction-exception/137286)

<div class="topic-metadata">

**Author:** [@Emancs](https://www.ruby-forum.com/u/Emancs)\
**Replies:** 2\
**Last updated:** [May 11, 2008, 11:59am UTC](https://www.ruby-forum.com/t/unknownaction-exception/137286 "2008-05-11T11:59:31Z")

</div>

Hi all, i’m new in ruby on rails. i created a controller which has 2 views index, add\_to\_cart & inside index i created “button\_to” which references to add\_to\_cart view, but when i click on this button UnKnownAction…

---

## [Validates\_numericality\_of and greater\_than\* doesn't appear to be working](https://www.ruby-forum.com/t/validates-numericality-of-and-greater-than-doesnt-appear-to-be-working/137285)

<div class="topic-metadata">

**Author:** [@ccuilla](https://www.ruby-forum.com/u/ccuilla)\
**Replies:** 0\
**Last updated:** [May 11, 2008, 11:54am UTC](https://www.ruby-forum.com/t/validates-numericality-of-and-greater-than-doesnt-appear-to-be-working/137285 "2008-05-11T11:54:40Z")

</div>

I’m using Rails 2.0.2 and I have been trying to take advantage of the “validates\_numericality\_of” with the “:greater\_than” option with something like this: validates\_numericality\_of :users, :greater\_than =\> 0, :only\_i…

---

## [Controlling the URL generated after an action is performed](https://www.ruby-forum.com/t/controlling-the-url-generated-after-an-action-is-performed/137278)

<div class="topic-metadata">

**Author:** [@jtoly](https://www.ruby-forum.com/u/jtoly)\
**Replies:** 0\
**Last updated:** [May 11, 2008, 10:11am UTC](https://www.ruby-forum.com/t/controlling-the-url-generated-after-an-action-is-performed/137278 "2008-05-11T10:11:16Z")

</div>

Above my listing partial I have a form\_remote\_tag that encompasses a few collection\_selects for which the :submit =\> “Filter” action builds the appropriate :conditions for the database query. This works very well. Be…

---

## [Complex fields\_for mapping to multi-level model association](https://www.ruby-forum.com/t/complex-fields-for-mapping-to-multi-level-model-association/137276)

<div class="topic-metadata">

**Author:** [@The\_Cool\_Web\_Guy](https://www.ruby-forum.com/u/The_Cool_Web_Guy)\
**Replies:** 0\
**Last updated:** [May 11, 2008, 9:25am UTC](https://www.ruby-forum.com/t/complex-fields-for-mapping-to-multi-level-model-association/137276 "2008-05-11T09:25:04Z")

</div>

I’ve come across what might be a limitation of rails, or I’ve missed something completely Here’s the situation: I have 3 models as follows class Loan \< ActiveRecord::Base has\_many :guarantors, :class\_name =\> “Gua…

---

## [Database.yml file problem](https://www.ruby-forum.com/t/database-yml-file-problem/137268)

<div class="topic-metadata">

**Author:** [@df-sean](https://www.ruby-forum.com/u/df-sean)\
**Replies:** 3\
**Last updated:** [May 11, 2008, 6:58am UTC](https://www.ruby-forum.com/t/database-yml-file-problem/137268 "2008-05-11T06:58:10Z")

</div>

Well I created a project, and had no problem with this file. I deleted the project for other reasons. Now I created a new project, but the database.yml file generated this time is set for sqlite, when I have mysql. …

---

## [Destroy data from 2 different tables](https://www.ruby-forum.com/t/destroy-data-from-2-different-tables/137189)

<div class="topic-metadata">

**Author:** [@RoR\_Nb](https://www.ruby-forum.com/u/RoR_Nb)\
**Replies:** 7\
**Last updated:** [May 11, 2008, 6:20am UTC](https://www.ruby-forum.com/t/destroy-data-from-2-different-tables/137189 "2008-05-11T06:20:48Z")

</div>

I’m trying to delete an account but at the same time i’d like to delete the portals that belongs to the account. This is what i wrote but it’s not working. how can i deal with this problem? I have this code inside th…

---

## [Attachment\_fu: loading objects w/ attachments in batch?](https://www.ruby-forum.com/t/attachment-fu-loading-objects-w-attachments-in-batch/136685)

<div class="topic-metadata">

**Author:** [@dwhsix](https://www.ruby-forum.com/u/dwhsix)\
**Replies:** 4\
**Last updated:** [May 11, 2008, 4:10am UTC](https://www.ruby-forum.com/t/attachment-fu-loading-objects-w-attachments-in-batch/136685 "2008-05-11T04:10:23Z")

</div>

Using the (very nifty) attachment\_fu plugin. It would be very convenient if I could batch-load a lot of my model objects that have attachments, instead of having to load them interactively via a web page. Experiment…

---

## [Session reassembly?](https://www.ruby-forum.com/t/session-reassembly/137165)

<div class="topic-metadata">

**Author:** [@Andreas\_Happe](https://www.ruby-forum.com/u/Andreas_Happe)\
**Replies:** 1\
**Last updated:** [May 11, 2008, 2:51am UTC](https://www.ruby-forum.com/t/session-reassembly/137165 "2008-05-11T02:51:52Z")

</div>

Hi, I want to redistribute incoming requests to different controllers, e.g. depending upon the request’s user id a request should be dispatched to user\_owner\_controller or user\_other\_controller. So far I’ve just exte…

---

## [Best practice for documenting a ROR application](https://www.ruby-forum.com/t/best-practice-for-documenting-a-ror-application/137196)

<div class="topic-metadata">

**Author:** [@jef](https://www.ruby-forum.com/u/jef)\
**Replies:** 1\
**Last updated:** [May 11, 2008, 1:44am UTC](https://www.ruby-forum.com/t/best-practice-for-documenting-a-ror-application/137196 "2008-05-11T01:44:12Z")

</div>

Hi is there a method in particular? Does IDE provide any features to do that? thanks

---

## [Install multiple versions of Rails on OSX](https://www.ruby-forum.com/t/install-multiple-versions-of-rails-on-osx/137249)

<div class="topic-metadata">

**Author:** [@Justin\_Kozuch](https://www.ruby-forum.com/u/Justin_Kozuch)\
**Replies:** 8\
**Last updated:** [May 10, 2008, 11:38pm UTC](https://www.ruby-forum.com/t/install-multiple-versions-of-rails-on-osx/137249 "2008-05-10T23:38:42Z")

</div>

Hi, I am currently running Rails 2.0.2 on my machine, but for the purposes of a AWDR 2nd Edition, I also need to run Rails 1.8.6. I looked around for a bit to find articles on how to do this, but I’m coming up short. …

---

## [Model.count broken by Rails 2.0.x](https://www.ruby-forum.com/t/model-count-broken-by-rails-2-0-x/137259)

<div class="topic-metadata">

**Author:** [@S-gw](https://www.ruby-forum.com/u/S-gw)\
**Replies:** 2\
**Last updated:** [May 10, 2008, 11:15pm UTC](https://www.ruby-forum.com/t/model-count-broken-by-rails-2-0-x/137259 "2008-05-10T23:15:14Z")

</div>

Have a working 1.2.6 application (OS X 10.4.11, Ruby 1.8.6), which I am now trying to run under 2.0.2 (via freeze). First snag I’ve run into that I can’t find any info on is that Rails is gagging on a simple .count st…

---

## [ActiveRecord and memory\_store sessions error](https://www.ruby-forum.com/t/activerecord-and-memory-store-sessions-error/137209)

<div class="topic-metadata">

**Author:** [@Brubix](https://www.ruby-forum.com/u/Brubix)\
**Replies:** 2\
**Last updated:** [May 10, 2008, 10:04pm UTC](https://www.ruby-forum.com/t/activerecord-and-memory-store-sessions-error/137209 "2008-05-10T22:04:16Z")

</div>

It seems that memory\_store sessions have problems storing ActiveRecord objects. The following test application work perfectly with the standard session option (Rails 2.0.2) but if I add config.action\_controller.sessi…

---

## [Update on a m:n table](https://www.ruby-forum.com/t/update-on-a-m-n-table/137257)

<div class="topic-metadata">

**Author:** [@sigma](https://www.ruby-forum.com/u/sigma)\
**Replies:** 1\
**Last updated:** [May 10, 2008, 9:45pm UTC](https://www.ruby-forum.com/t/update-on-a-m-n-table/137257 "2008-05-10T21:45:02Z")

</div>

Hi all following situation: 3 tables: users (id, nickname,…) conversations(id, …) conversations\_users(user\_id, conversation\_id, date\_deleted) 2: models user (has\_and\_belongs\_to\_many :conversations, :join\_table=\>…

---

## [Using RoR w/ Apache/MySQL already installed](https://www.ruby-forum.com/t/using-ror-w-apache-mysql-already-installed/137203)

<div class="topic-metadata">

**Author:** [@irksome](https://www.ruby-forum.com/u/irksome)\
**Replies:** 4\
**Last updated:** [May 10, 2008, 9:43pm UTC](https://www.ruby-forum.com/t/using-ror-w-apache-mysql-already-installed/137203 "2008-05-10T21:43:33Z")

</div>

Hi, I already had the wamp server (Apache & php w/ mysql) installed and want to use RoR with it. I installed everything fine, but how do I get RoR to use the Apache server instead of starting the Webrick server that …

---

## [Ask about Transaction](https://www.ruby-forum.com/t/ask-about-transaction/137214)

<div class="topic-metadata">

**Author:** [@malioboro](https://www.ruby-forum.com/u/malioboro)\
**Replies:** 2\
**Last updated:** [May 10, 2008, 9:33pm UTC](https://www.ruby-forum.com/t/ask-about-transaction/137214 "2008-05-10T21:33:18Z")

</div>

Dear ALL" I would like to ask, what is it true that rails already supports transaction although we do not put ActiveRecord::Base.transaction in our ruby controller or model script? - My DB ENGINE is InnoDB - I did te…

---

## [How to check that all children dates are before parent date?](https://www.ruby-forum.com/t/how-to-check-that-all-children-dates-are-before-parent-date/137218)

<div class="topic-metadata">

**Author:** [@adistarmid](https://www.ruby-forum.com/u/adistarmid)\
**Replies:** 2\
**Last updated:** [May 10, 2008, 7:58pm UTC](https://www.ruby-forum.com/t/how-to-check-that-all-children-dates-are-before-parent-date/137218 "2008-05-10T19:58:38Z")

</div>

Hello, I have a Task model that uses acts\_as\_tree, giving me the parent\_id. The Task table has these columns: name due\_on parent\_id How would I validate that all children due dates (due\_on) are inputted before the …

---

## [Has\_many/belongs\_to question](https://www.ruby-forum.com/t/has-many-belongs-to-question/137133)

<div class="topic-metadata">

**Author:** [@hrmm](https://www.ruby-forum.com/u/hrmm)\
**Replies:** 2\
**Last updated:** [May 10, 2008, 7:58pm UTC](https://www.ruby-forum.com/t/has-many-belongs-to-question/137133 "2008-05-10T19:58:19Z")

</div>

Is it possible to automatically add data to the belongs\_to end of a hm/bt relationship? For clarity, here are my models: class Page; has\_many :links; end class Link; belongs\_to :page; end Is there anyway that I can …

---

## [Strange traits in single-inheritance](https://www.ruby-forum.com/t/strange-traits-in-single-inheritance/137211)

<div class="topic-metadata">

**Author:** [@taro](https://www.ruby-forum.com/u/taro)\
**Replies:** 2\
**Last updated:** [May 10, 2008, 7:05pm UTC](https://www.ruby-forum.com/t/strange-traits-in-single-inheritance/137211 "2008-05-10T19:05:50Z")

</div>

I’m not sure why this is happening, but apparently, the only way I can access higher-leveled model in the single-inheritance models is by calling the lower ones. For example, in class Admin \< Person C:\\InstantRails\_2.…

---

## [Work in Perth (Australia)](https://www.ruby-forum.com/t/work-in-perth-australia/137250)

<div class="topic-metadata">

**Author:** [@Sharon\_and\_Dave](https://www.ruby-forum.com/u/Sharon_and_Dave)\
**Replies:** 0\
**Last updated:** [May 10, 2008, 6:34pm UTC](https://www.ruby-forum.com/t/work-in-perth-australia/137250 "2008-05-10T18:34:01Z")

</div>

Hi, I’ll be heading back to Perth in the next few months after a few years working for Customs in Canberra. Is there anyone here from Perth who can give me a bit of an idea of the job market for Ruby / Rails work ove…

---

## [Nested resources multiple levels deep](https://www.ruby-forum.com/t/nested-resources-multiple-levels-deep/137102)

<div class="topic-metadata">

**Author:** [@resident\_moron](https://www.ruby-forum.com/u/resident_moron)\
**Replies:** 1\
**Last updated:** [May 10, 2008, 6:25pm UTC](https://www.ruby-forum.com/t/nested-resources-multiple-levels-deep/137102 "2008-05-10T18:25:45Z")

</div>

I’m wondering how or if it is possible to nest a resource more than one level. routes.rb map.namespace :blog do |blog| blog.resources :channels, :has\_many =\> :articles end For example, how could I say that would li…

---

## [Engines as Gems?](https://www.ruby-forum.com/t/engines-as-gems/137247)

<div class="topic-metadata">

**Author:** [@sweetpete](https://www.ruby-forum.com/u/sweetpete)\
**Replies:** 0\
**Last updated:** [May 10, 2008, 5:30pm UTC](https://www.ruby-forum.com/t/engines-as-gems/137247 "2008-05-10T17:30:23Z")

</div>

There’s been a lot of talk lately about releasing Rails plugins as Gems, instead of putting them in vendor/plugins. I have to admit, for a few reasons this seems attractive. Has anyone given any thought to how this m…

---

## [Paginating a find statement with :select =\> "distinct products.\* "](https://www.ruby-forum.com/t/paginating-a-find-statement-with-select-distinct-products/137243)

<div class="topic-metadata">

**Author:** [@Carson](https://www.ruby-forum.com/u/Carson)\
**Replies:** 0\
**Last updated:** [May 10, 2008, 5:05pm UTC](https://www.ruby-forum.com/t/paginating-a-find-statement-with-select-distinct-products/137243 "2008-05-10T17:05:02Z")

</div>

My selection of products from a Products table looks like this: # Get products on department promotion @products = Product.find(:all, :select =\> "distinct products.\*", :order =\> " product\_id ", :joins =\> " inner join ca…

---

## [How to implement multiple select box?](https://www.ruby-forum.com/t/how-to-implement-multiple-select-box/137220)

<div class="topic-metadata">

**Author:** [@suneeta](https://www.ruby-forum.com/u/suneeta)\
**Replies:** 2\
**Last updated:** [May 10, 2008, 4:44pm UTC](https://www.ruby-forum.com/t/how-to-implement-multiple-select-box/137220 "2008-05-10T16:44:50Z")

</div>

Hi all… I have to use a select box with multiple selection capability. Also i have to retrieve the selected items from the controller. I used select\_tag. But while retrieving the value i don’t get anything in the con…

---

## [Capistrano Best Practices: Users + Permissions](https://www.ruby-forum.com/t/capistrano-best-practices-users-permissions/137061)

<div class="topic-metadata">

**Author:** [@mdaoust](https://www.ruby-forum.com/u/mdaoust)\
**Replies:** 2\
**Last updated:** [May 10, 2008, 4:30pm UTC](https://www.ruby-forum.com/t/capistrano-best-practices-users-permissions/137061 "2008-05-10T16:30:41Z")

</div>

Hello! What would people recommend for a best practice Capistrano config, specifically re: users and permissions? My current config is something like: Have a non-root user setup on my remote box (which is the web, a…

---

## [Google Maps API in ajax-call](https://www.ruby-forum.com/t/google-maps-api-in-ajax-call/137234)

<div class="topic-metadata">

**Author:** [@peter](https://www.ruby-forum.com/u/peter)\
**Replies:** 0\
**Last updated:** [May 10, 2008, 1:36pm UTC](https://www.ruby-forum.com/t/google-maps-api-in-ajax-call/137234 "2008-05-10T13:36:44Z")

</div>

I’d like to use some functionality of the Google Map API in an ajax- request, but i’m having some troubles inplementing that. What i want to use is the possibility of calculating the distance of a route between 2 citi…

---

## [Remote form for](https://www.ruby-forum.com/t/remote-form-for/137233)

<div class="topic-metadata">

**Author:** [@johnnybutler7](https://www.ruby-forum.com/u/johnnybutler7)\
**Replies:** 0\
**Last updated:** [May 10, 2008, 1:23pm UTC](https://www.ruby-forum.com/t/remote-form-for/137233 "2008-05-10T13:23:30Z")

</div>

Can anyone let me know why the below isnt passing the form values. Im getting no errors and the loading indicator shows and hides as expected. \<% remote\_form\_for :action\_item, action\_item, :url =\> { :action =\> ‘upda…

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

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