# Rails

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

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

---

## [:primary\_key in create\_table with postgresql seems broken](https://www.ruby-forum.com/t/primary-key-in-create-table-with-postgresql-seems-broken/109418)

<div class="topic-metadata">

**Author:** [@pedz](https://www.ruby-forum.com/u/pedz)\
**Replies:** 0\
**Last updated:** [July 14, 2007, 3:12pm UTC](https://www.ruby-forum.com/t/primary-key-in-create-table-with-postgresql-seems-broken/109418 "2007-07-14T15:12:33Z")

</div>

My model has: class CreateSamples \< ActiveRecord::Migration def self.up create\_table :samples, :primary\_key =\> :other\_id do |t| t.column :name, :string end end def self.down drop\_table :samples end end my unit…

---

## [Custom XML tag](https://www.ruby-forum.com/t/custom-xml-tag/109410)

<div class="topic-metadata">

**Author:** [@PaP](https://www.ruby-forum.com/u/PaP)\
**Replies:** 0\
**Last updated:** [July 14, 2007, 1:19pm UTC](https://www.ruby-forum.com/t/custom-xml-tag/109410 "2007-07-14T13:19:53Z")

</div>

Hi i am using the standard rxml template to produce my xml georss file but i cannot figure out how to add a tag like this geo:lat or geo:long I mean how can i seperate a tag with : Thank you

---

## [Global method](https://www.ruby-forum.com/t/global-method/109407)

<div class="topic-metadata">

**Author:** [@Tarscher](https://www.ruby-forum.com/u/Tarscher)\
**Replies:** 1\
**Last updated:** [July 14, 2007, 12:27pm UTC](https://www.ruby-forum.com/t/global-method/109407 "2007-07-14T12:27:50Z")

</div>

Hi all, I want a authenticated? method that I can access in all my controllers. Where do I best put this method? Thanks Stijn

---

## [Drag&Drop w/ Rest](https://www.ruby-forum.com/t/drag-drop-w-rest/109390)

<div class="topic-metadata">

**Author:** [@cloper](https://www.ruby-forum.com/u/cloper)\
**Replies:** 1\
**Last updated:** [July 14, 2007, 10:54am UTC](https://www.ruby-forum.com/t/drag-drop-w-rest/109390 "2007-07-14T10:54:37Z")

</div>

So I have run into a problem: I have a restful setup where a user clicks on an item to view it. once viewing the item, they can drag&drop characteristics onto the item. map.resources :items, :member =\> { :apply =\> :po…

---

## [Autocomplete in array](https://www.ruby-forum.com/t/autocomplete-in-array/109067)

<div class="topic-metadata">

**Author:** [@Bala](https://www.ruby-forum.com/u/Bala)\
**Replies:** 10\
**Last updated:** [July 14, 2007, 10:23am UTC](https://www.ruby-forum.com/t/autocomplete-in-array/109067 "2007-07-14T10:23:42Z")

</div>

Experts, have you figure it out with autocomplete to pass as array objects? still i’m finding out the way to figure. :frowning: regards, Bala

---

## [Locating nested resources - how do you do it?](https://www.ruby-forum.com/t/locating-nested-resources-how-do-you-do-it/109354)

<div class="topic-metadata">

**Author:** [@kuma](https://www.ruby-forum.com/u/kuma)\
**Replies:** 1\
**Last updated:** [July 14, 2007, 9:43am UTC](https://www.ruby-forum.com/t/locating-nested-resources-how-do-you-do-it/109354 "2007-07-14T09:43:39Z")

</div>

I struggle with this all the time and I haven’t come up with a solution I’m happy with so I thought I’d ask the group for some opinions. Let’s assume I have something like this in my routes file: map.resources :users…

---

## [Shared ssl cert and url rewritting](https://www.ruby-forum.com/t/shared-ssl-cert-and-url-rewritting/109406)

<div class="topic-metadata">

**Author:** [@kyle](https://www.ruby-forum.com/u/kyle)\
**Replies:** 0\
**Last updated:** [July 14, 2007, 9:30am UTC](https://www.ruby-forum.com/t/shared-ssl-cert-and-url-rewritting/109406 "2007-07-14T09:30:38Z")

</div>

Hello, My client does not want to purchase a ssl cert, rather they want to use their host’s (westhost.com) shared ssl cert. To access the site through shared ssl under their setup you have to use the url: https://ss…

---

## [Scaffold\_resource und acts\_as\_tree](https://www.ruby-forum.com/t/scaffold-resource-und-acts-as-tree/109399)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [July 14, 2007, 8:54am UTC](https://www.ruby-forum.com/t/scaffold-resource-und-acts-as-tree/109399 "2007-07-14T08:54:37Z")

</div>

Routing nested resources on Models with has\_many is very straightforward eg. Project-\>Iteration-\>WorkItem can be mapped with: map.resources :projects do |projects| projects.resources :iterations do |iterations| ite…

---

## [Tricky ruby array grouping method](https://www.ruby-forum.com/t/tricky-ruby-array-grouping-method/109386)

<div class="topic-metadata">

**Author:** [@danlunde](https://www.ruby-forum.com/u/danlunde)\
**Replies:** 4\
**Last updated:** [July 14, 2007, 7:31am UTC](https://www.ruby-forum.com/t/tricky-ruby-array-grouping-method/109386 "2007-07-14T07:31:32Z")

</div>

I want to define a method that performs the following operation: Given an array: array = \[a, b, c, d, e, f, g, h, i\] My imaginary method (let’s call it nest\_by) would produce these results array.nest\_by(2) =\> \[\[a, b…

---

## [Periodically call remote is not my friend](https://www.ruby-forum.com/t/periodically-call-remote-is-not-my-friend/109389)

<div class="topic-metadata">

**Author:** [@rickf](https://www.ruby-forum.com/u/rickf)\
**Replies:** 1\
**Last updated:** [July 14, 2007, 6:23am UTC](https://www.ruby-forum.com/t/periodically-call-remote-is-not-my-friend/109389 "2007-07-14T06:23:55Z")

</div>

Hi All, I have a table in a view (its a partial) that is updated from every 5 seconds as the shortest frequency to as long as manual by the user based on some configuration parameters. With the periodically\_call\_remo…

---

## [Uninitialized constant CGI::Session::MemCacheStore](https://www.ruby-forum.com/t/uninitialized-constant-cgi-memcachestore/109394)

<div class="topic-metadata">

**Author:** [@krates](https://www.ruby-forum.com/u/krates)\
**Replies:** 0\
**Last updated:** [July 14, 2007, 6:16am UTC](https://www.ruby-forum.com/t/uninitialized-constant-cgi-memcachestore/109394 "2007-07-14T06:16:11Z")

</div>

I am getting this error with Rails 1.2.3, while I was trying to change session from active\_record\_store to use memcache-client 1.3. Here is my error, I have checked that actionpack-1.13.3\\lib\\action\_controller\\sessio…

---

## [Determining Action in the Controller](https://www.ruby-forum.com/t/determining-action-in-the-controller/109382)

<div class="topic-metadata">

**Author:** [@jwm](https://www.ruby-forum.com/u/jwm)\
**Replies:** 4\
**Last updated:** [July 14, 2007, 4:49am UTC](https://www.ruby-forum.com/t/determining-action-in-the-controller/109382 "2007-07-14T04:49:19Z")

</div>

Hi, I am trying to select a layout for a page based on what action is called. ex. if controller.action\_name == ‘about’ layout “internal” else layout “home\_static” end But I am receiving this error: undefined lo…

---

## [ActiveResource gem problem](https://www.ruby-forum.com/t/activeresource-gem-problem/109303)

<div class="topic-metadata">

**Author:** [@bmcolombet](https://www.ruby-forum.com/u/bmcolombet)\
**Replies:** 3\
**Last updated:** [July 14, 2007, 3:28am UTC](https://www.ruby-forum.com/t/activeresource-gem-problem/109303 "2007-07-14T03:28:09Z")

</div>

Hi, I’m trying to use ActiveResource with my Rails 1.2.3. I installed ARes 0.9.0 with the current command: sudo gem install --version 0.9.0 activeresource --source http://gems.rubyonrails.org I inserted “require” in…

---

## [Attachment\_fu not setting s3\_access on thumbnails?](https://www.ruby-forum.com/t/attachment-fu-not-setting-s3-access-on-thumbnails/109391)

<div class="topic-metadata">

**Author:** [@Shinji\_Kuwayama](https://www.ruby-forum.com/u/Shinji_Kuwayama)\
**Replies:** 0\
**Last updated:** [July 14, 2007, 3:00am UTC](https://www.ruby-forum.com/t/attachment-fu-not-setting-s3-access-on-thumbnails/109391 "2007-07-14T03:00:07Z")

</div>

I’m checking out attachment\_fu and S3, and I’m able to display uploaded images nicely. However, requests for generated thumbnails are getting “access denied” from Amazon. My guess is that the thumbnails’ s3\_access att…

---

## [Backgroundrb needs a new maintainer](https://www.ruby-forum.com/t/backgroundrb-needs-a-new-maintainer/109253)

<div class="topic-metadata">

**Author:** [@ezra\_z](https://www.ruby-forum.com/u/ezra_z)\
**Replies:** 4\
**Last updated:** [July 14, 2007, 1:46am UTC](https://www.ruby-forum.com/t/backgroundrb-needs-a-new-maintainer/109253 "2007-07-14T01:46:04Z")

</div>

Hello All- Is there anyone out there that wants to take over as maintainer of the backgroundrb project? I feel bad because I know lots of folks use it but I absolutely do not have time to work on it anymore :(. I’m l…

---

## [Rails 1.2 / Theme support plugin issue: Fix](https://www.ruby-forum.com/t/rails-1-2-theme-support-plugin-issue-fix/87794)

<div class="topic-metadata">

**Author:** [@openweb20](https://www.ruby-forum.com/u/openweb20)\
**Replies:** 5\
**Last updated:** [July 14, 2007, 1:33am UTC](https://www.ruby-forum.com/t/rails-1-2-theme-support-plugin-issue-fix/87794 "2007-07-14T01:33:25Z")

</div>

This is to answer one of my old issues, that I was having using Theme support plugin using with Rails 1.2. When you get an latest edge Rails update and run your application which has Theme support plugin you will get …

---

## [Functional testing and session\[:session\_id\]](https://www.ruby-forum.com/t/functional-testing-and-session-session-id/109370)

<div class="topic-metadata">

**Author:** [@soroe](https://www.ruby-forum.com/u/soroe)\
**Replies:** 4\
**Last updated:** [July 14, 2007, 1:06am UTC](https://www.ruby-forum.com/t/functional-testing-and-session-session-id/109370 "2007-07-14T01:06:05Z")

</div>

Hey Guys, Does Rails set the session\[:session\_id\] field in functional testing? I’ve been getting an empty string… which is causing the url\_for function call in my view to blow up. It would be really nice to avoid th…

---

## [Render\_component](https://www.ruby-forum.com/t/render-component/109321)

<div class="topic-metadata">

**Author:** [@jotape](https://www.ruby-forum.com/u/jotape)\
**Replies:** 1\
**Last updated:** [July 13, 2007, 11:53pm UTC](https://www.ruby-forum.com/t/render-component/109321 "2007-07-13T23:53:38Z")

</div>

Hello all. I have a view where I need to render an action. If i do a render\_component in the view, my action code is not executed, and that’s bad for me… My workaround is to do a render\_component\_as\_string in the fir…

---

## ["are you human" plugin for rails? does one exist?](https://www.ruby-forum.com/t/are-you-human-plugin-for-rails-does-one-exist/109388)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 1\
**Last updated:** [July 13, 2007, 11:46pm UTC](https://www.ruby-forum.com/t/are-you-human-plugin-for-rails-does-one-exist/109388 "2007-07-13T23:46:55Z")

</div>

Hi all, Does anyone know if there is a “are you human” plugin for rails that exists? (i.e. where one has to typically read numbers off an image and type them in to avoid spamming). Perhaps if there is no plugin an …

---

## [Newbie: Still confused on pluralizing controllers and models](https://www.ruby-forum.com/t/newbie-still-confused-on-pluralizing-controllers-and-models/107643)

<div class="topic-metadata">

**Author:** [@dan](https://www.ruby-forum.com/u/dan)\
**Replies:** 6\
**Last updated:** [July 13, 2007, 11:24pm UTC](https://www.ruby-forum.com/t/newbie-still-confused-on-pluralizing-controllers-and-models/107643 "2007-07-13T23:24:52Z")

</div>

Is there a proper pluralization practice I should be using when generating controlers and models? Should it be: script/generate controller Widget script/generate model Widget or plural: script/generate controller W…

---

## [Issues with Litespeed](https://www.ruby-forum.com/t/issues-with-litespeed/109385)

<div class="topic-metadata">

**Author:** [@rawn027](https://www.ruby-forum.com/u/rawn027)\
**Replies:** 2\
**Last updated:** [July 13, 2007, 11:09pm UTC](https://www.ruby-forum.com/t/issues-with-litespeed/109385 "2007-07-13T23:09:51Z")

</div>

It is very fast and obviously easier to use than any other solution but I am not happy that they limit their product for the non- enterprise version. I think I am going to get mongrel and apache running on Solaris and …

---

## [Having problems with rake?](https://www.ruby-forum.com/t/having-problems-with-rake/108913)

<div class="topic-metadata">

**Author:** [@Not\_So\_C](https://www.ruby-forum.com/u/Not_So_C)\
**Replies:** 10\
**Last updated:** [July 13, 2007, 10:57pm UTC](https://www.ruby-forum.com/t/having-problems-with-rake/108913 "2007-07-13T22:57:57Z")

</div>

I am a total newbie to Rails and Ruby. I have the Agile Web D. with Rails book and am following through the first few chapters. I got to the “Creating you own Rails API Documentation” and followed the following steps. …

---

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

<div class="topic-metadata">

**Author:** [@william](https://www.ruby-forum.com/u/william)\
**Replies:** 1\
**Last updated:** [July 13, 2007, 10:41pm UTC](https://www.ruby-forum.com/t/calendar/109372 "2007-07-13T22:41:48Z")

</div>

compaÃ±eros, que plugin me recomiendan para manejar fechas en mis campos text, algo asi como un calendario? gracias

---

## [Newbies: Read this before asking about pagination](https://www.ruby-forum.com/t/newbies-read-this-before-asking-about-pagination/109273)

<div class="topic-metadata">

**Author:** [@random52k](https://www.ruby-forum.com/u/random52k)\
**Replies:** 11\
**Last updated:** [July 13, 2007, 10:34pm UTC](https://www.ruby-forum.com/t/newbies-read-this-before-asking-about-pagination/109273 "2007-07-13T22:34:48Z")

</div>

I’ve just read three\* different messages on the list, all posted within a day of each other, and all having problems with the same thing - rails built in pagination. The common misconception seems to be that rails bui…

---

## [Why no :dependent =\> :destroy on belongs\_to?](https://www.ruby-forum.com/t/why-no-dependent-destroy-on-belongs-to/109383)

<div class="topic-metadata">

**Author:** [@chase](https://www.ruby-forum.com/u/chase)\
**Replies:** 0\
**Last updated:** [July 13, 2007, 10:31pm UTC](https://www.ruby-forum.com/t/why-no-dependent-destroy-on-belongs-to/109383 "2007-07-13T22:31:08Z")

</div>

class Animal \< ActiveRecord::Base belongs\_to :species, :polymorphic =\> true end class Goat \< ActiveRecord::Base has\_one :animal, :as =\> :species end class Capybara \< ActiveRecord::Base has\_one :animal, :as =\> :spe…

---

## [Stack level too deep when parsing xml](https://www.ruby-forum.com/t/stack-level-too-deep-when-parsing-xml/109376)

<div class="topic-metadata">

**Author:** [@dkitchel](https://www.ruby-forum.com/u/dkitchel)\
**Replies:** 3\
**Last updated:** [July 13, 2007, 9:58pm UTC](https://www.ruby-forum.com/t/stack-level-too-deep-when-parsing-xml/109376 "2007-07-13T21:58:43Z")

</div>

I’m trying to figure out why I’m getting a stack level too deep error. I have controller which parses xml (about 1400 lines) and ingests it into mysql. First I was getting a system stack error every time, but then I …

---

## [Tests running in standalone script](https://www.ruby-forum.com/t/tests-running-in-standalone-script/106395)

<div class="topic-metadata">

**Author:** [@DZDZDZ](https://www.ruby-forum.com/u/DZDZDZ)\
**Replies:** 1\
**Last updated:** [July 13, 2007, 9:14pm UTC](https://www.ruby-forum.com/t/tests-running-in-standalone-script/106395 "2007-07-13T21:14:36Z")

</div>

Greetings, I have a simple script that I want to run against my database. What is happening is that I found that it wanted to run a test suite automatically. I’ve tried to run down how that is happening, but I don’t …

---

## [Getting "object references itself" error trying to execute @](https://www.ruby-forum.com/t/getting-object-references-itself-error-trying-to-execute/109371)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [July 13, 2007, 8:47pm UTC](https://www.ruby-forum.com/t/getting-object-references-itself-error-trying-to-execute/109371 "2007-07-13T20:47:26Z")

</div>

I have a class named “Event” and am trying to get values out to pass into a javascript method. If I use, \<%= @evt.attributes.to\_json %\> I get the error message “object references itself”. For debugging I’ve tried t…

---

## [Paysimple Recurring vs. Trustcommerce Citadel](https://www.ruby-forum.com/t/paysimple-recurring-vs-trustcommerce-citadel/109365)

<div class="topic-metadata">

**Author:** [@dcgrigsby](https://www.ruby-forum.com/u/dcgrigsby)\
**Replies:** 0\
**Last updated:** [July 13, 2007, 7:22pm UTC](https://www.ruby-forum.com/t/paysimple-recurring-vs-trustcommerce-citadel/109365 "2007-07-13T19:22:00Z")

</div>

I was wondering if anyone had any experience regarding the two subscription services. As far as pricing and features are concerned, how do you guys think these services compare?

---

## [How to write a gem with rake?](https://www.ruby-forum.com/t/how-to-write-a-gem-with-rake/109361)

<div class="topic-metadata">

**Author:** [@huang\_zhimin](https://www.ruby-forum.com/u/huang_zhimin)\
**Replies:** 1\
**Last updated:** [July 13, 2007, 7:20pm UTC](https://www.ruby-forum.com/t/how-to-write-a-gem-with-rake/109361 "2007-07-13T19:20:12Z")

</div>

I have a project based on rails. I want to generate gem file by rake and automatically upload to rubyforge. How can I do that? – http://rubyforge.org/projects/ropenwiki/

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

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