# Rails

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

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

---

## [Some table structure advice?](https://www.ruby-forum.com/t/some-table-structure-advice/105353)

<div class="topic-metadata">

**Author:** [@Davo](https://www.ruby-forum.com/u/Davo)\
**Replies:** 2\
**Last updated:** [May 30, 2007, 1:48am UTC](https://www.ruby-forum.com/t/some-table-structure-advice/105353 "2007-05-30T01:48:02Z")

</div>

Hi everyone, I’m just starting a new project and it needs this type of structure: an item has a brand and the brand has a number of models. ( e.g. The item might be an Advert for a Honda ( brand ), Civic ( model ) S…

---

## [Transferring Rails Installation to new Macbook](https://www.ruby-forum.com/t/transferring-rails-installation-to-new-macbook/105440)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [May 30, 2007, 1:46am UTC](https://www.ruby-forum.com/t/transferring-rails-installation-to-new-macbook/105440 "2007-05-30T01:46:02Z")

</div>

I just got a new Macbook and transferred all my files from my old mac onto it. Looks like rails didn’t make the cut. Is there a way to transfer rails over or do I have to re-install from the beginning? Thanks Jason

---

## [Sharing Sessions across domains](https://www.ruby-forum.com/t/sharing-sessions-across-domains/105446)

<div class="topic-metadata">

**Author:** [@JPJPJP](https://www.ruby-forum.com/u/JPJPJP)\
**Replies:** 0\
**Last updated:** [May 30, 2007, 1:38am UTC](https://www.ruby-forum.com/t/sharing-sessions-across-domains/105446 "2007-05-30T01:38:26Z")

</div>

I want to share a session id used to identify users shopping carts across multiple domains…www.domain1.com, www.domain2.com wwww.domain3.com. I am going to have all the data about the order stored in a database, and …

---

## [\[Newbie\] Errno::ECONNREFUSED](https://www.ruby-forum.com/t/newbie-errno-econnrefused/105084)

<div class="topic-metadata">

**Author:** [@andrew\_maddox](https://www.ruby-forum.com/u/andrew_maddox)\
**Replies:** 2\
**Last updated:** [May 30, 2007, 1:06am UTC](https://www.ruby-forum.com/t/newbie-errno-econnrefused/105084 "2007-05-30T01:06:59Z")

</div>

Hello- Just trying to get a basic CRUD going using the sample database on XP system. I have edited my database.yml file as follows: development: adapter: mysql database: sample username: app password: app host: l…

---

## [Selected menu item in the layout](https://www.ruby-forum.com/t/selected-menu-item-in-the-layout/104995)

<div class="topic-metadata">

**Author:** [@damaris](https://www.ruby-forum.com/u/damaris)\
**Replies:** 4\
**Last updated:** [May 30, 2007, 12:55am UTC](https://www.ruby-forum.com/t/selected-menu-item-in-the-layout/104995 "2007-05-30T00:55:57Z")

</div>

Hi you all, I have a basic menu in my index page which is always shown (Home-New page-List pages, etc.) This menu list is therefore on the layout of the app. However, I would like to change the color (the class from …

---

## [Recreating the Wheel: Using Composite Keys, and RESTful Auth](https://www.ruby-forum.com/t/recreating-the-wheel-using-composite-keys-and-restful-auth/105128)

<div class="topic-metadata">

**Author:** [@gberz3](https://www.ruby-forum.com/u/gberz3)\
**Replies:** 5\
**Last updated:** [May 30, 2007, 12:33am UTC](https://www.ruby-forum.com/t/recreating-the-wheel-using-composite-keys-and-restful-auth/105128 "2007-05-30T00:33:47Z")

</div>

Hi All, I’m interested in creating something similar to, but not the same as, Basecamp. I know, I know, why reinvent the wheel? Well, honestly, because it’s not my wheel and it’s rather hard to make a living off of …

---

## [Attachment\_fu help? broken pipe?](https://www.ruby-forum.com/t/attachment-fu-help-broken-pipe/105436)

<div class="topic-metadata">

**Author:** [@mixplate](https://www.ruby-forum.com/u/mixplate)\
**Replies:** 0\
**Last updated:** [May 30, 2007, 12:05am UTC](https://www.ruby-forum.com/t/attachment-fu-help-broken-pipe/105436 "2007-05-30T00:05:33Z")

</div>

Hello, Weird problem I am experiencing. I can upload files to my s3 account, but maybe after 4 times, my rails app starts to no longer upload. If i killall -user dispatch.fcgi, I can upload again for a few times befor…

---

## [Rails alternative for Blackboard?](https://www.ruby-forum.com/t/rails-alternative-for-blackboard/105433)

<div class="topic-metadata">

**Author:** [@le\_colibri](https://www.ruby-forum.com/u/le_colibri)\
**Replies:** 0\
**Last updated:** [May 29, 2007, 11:32pm UTC](https://www.ruby-forum.com/t/rails-alternative-for-blackboard/105433 "2007-05-29T23:32:51Z")

</div>

Dear rails riders, After some Google searching I gave up, instead I will try and ask here. Does anyone know of some (open source) RoR alternative to Blackboard? The only thing I could find was Chalksite, \<http://www.…

---

## [Undefined method using update\_attributes?](https://www.ruby-forum.com/t/undefined-method-using-update-attributes/104908)

<div class="topic-metadata">

**Author:** [@jfjfjf](https://www.ruby-forum.com/u/jfjfjf)\
**Replies:** 3\
**Last updated:** [May 29, 2007, 10:08pm UTC](https://www.ruby-forum.com/t/undefined-method-using-update-attributes/104908 "2007-05-29T22:08:42Z")

</div>

I have the following code in my controller to update some data; dd = DueDate.find(@sales\_order.due\_date.id) dd.update\_attributes = params\[:DueDate\] But I get the following error when I try to run it? unde…

---

## [Insert into an Oracle table no working](https://www.ruby-forum.com/t/insert-into-an-oracle-table-no-working/105024)

<div class="topic-metadata">

**Author:** [@david\_salisbury](https://www.ruby-forum.com/u/david_salisbury)\
**Replies:** 2\
**Last updated:** [May 29, 2007, 9:38pm UTC](https://www.ruby-forum.com/t/insert-into-an-oracle-table-no-working/105024 "2007-05-29T21:38:48Z")

</div>

Beginner here, so this should be easy. I created an RoR application that worked against and sqlite3 table. But the next step was for it to work against an Oracle table. So, I’ve changed the database.yml file to look …

---

## [Hash.collect displaying in wrong order in view helper](https://www.ruby-forum.com/t/hash-collect-displaying-in-wrong-order-in-view-helper/105422)

<div class="topic-metadata">

**Author:** [@blinking\_bear](https://www.ruby-forum.com/u/blinking_bear)\
**Replies:** 1\
**Last updated:** [May 29, 2007, 9:20pm UTC](https://www.ruby-forum.com/t/hash-collect-displaying-in-wrong-order-in-view-helper/105422 "2007-05-29T21:20:32Z")

</div>

I have this helper method in my application\_helper, for some reason it doesn’t output in the correct order: def view\_by\_options(active) html = “View The List by: " html +={ :popular =\> ‘Most Popular’, :new =\> “Newes…

---

## [/archives/:year/:month/:day routes with REST?](https://www.ruby-forum.com/t/archives-year-month-day-routes-with-rest/105380)

<div class="topic-metadata">

**Author:** [@dougal](https://www.ruby-forum.com/u/dougal)\
**Replies:** 10\
**Last updated:** [May 29, 2007, 9:20pm UTC](https://www.ruby-forum.com/t/archives-year-month-day-routes-with-rest/105380 "2007-05-29T21:20:31Z")

</div>

Hi folks. I’m looking to emulate a feature I have implemented in Rails routing of old, where the above URL could be used as so… By year: http://douglasfshearer.com/blog/2007 By month: http://douglasfshearer.com/blog/…

---

## [How to "break action"](https://www.ruby-forum.com/t/how-to-break-action/105419)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [May 29, 2007, 9:03pm UTC](https://www.ruby-forum.com/t/how-to-break-action/105419 "2007-05-29T21:03:26Z")

</div>

hi all, if i want to “return or exit” (Like C language) in a action(function) , and maybe translate control to another function ,how can it do ? (direct\_to?) thanks -Feng

---

## [Application working on a remote server](https://www.ruby-forum.com/t/application-working-on-a-remote-server/105352)

<div class="topic-metadata">

**Author:** [@eagoweb](https://www.ruby-forum.com/u/eagoweb)\
**Replies:** 2\
**Last updated:** [May 29, 2007, 8:56pm UTC](https://www.ruby-forum.com/t/application-working-on-a-remote-server/105352 "2007-05-29T20:56:27Z")

</div>

Hello i have done a project, now i want to know how can i make it running on the server. i have upload the entire tree of folders, but it didn’t do anything… yess i know that i haven’t do something, could you tell me …

---

## [Form not invoking "create" action in production](https://www.ruby-forum.com/t/form-not-invoking-create-action-in-production/90942)

<div class="topic-metadata">

**Author:** [@trevorturk](https://www.ruby-forum.com/u/trevorturk)\
**Replies:** 3\
**Last updated:** [May 29, 2007, 8:42pm UTC](https://www.ruby-forum.com/t/form-not-invoking-create-action-in-production/90942 "2007-05-29T20:42:23Z")

</div>

I’ve officially lost my mind. I’ve got a form that looks like this: \<%= error\_messages\_for :avatar %\> \<% form\_for(:avatar, :url =\> avatars\_path, :html =\> { :multipart =\> true }) do |f| %\> \<%= f.file\_field :uploaded…

---

## [STI and Active Record](https://www.ruby-forum.com/t/sti-and-active-record/105415)

<div class="topic-metadata">

**Author:** [@mike](https://www.ruby-forum.com/u/mike)\
**Replies:** 0\
**Last updated:** [May 29, 2007, 8:25pm UTC](https://www.ruby-forum.com/t/sti-and-active-record/105415 "2007-05-29T20:25:21Z")

</div>

Hey, I’m trying to use STI in my models, while writing a little cms. A have a model called Page and some subclasses like ContentPage, Sysfolder etc. Some classes share similar attributes, so I use STI and one table f…

---

## [YAML fails when has\_one is null](https://www.ruby-forum.com/t/yaml-fails-when-has-one-is-null/105344)

<div class="topic-metadata">

**Author:** [@robertjames](https://www.ruby-forum.com/u/robertjames)\
**Replies:** 1\
**Last updated:** [May 29, 2007, 8:23pm UTC](https://www.ruby-forum.com/t/yaml-fails-when-has-one-is-null/105344 "2007-05-29T20:23:21Z")

</div>

My model has\_one :association If I call model.to\_yaml (or y model) in the console, and the association is nil, I get a yaml error. Anyone else get this? Is this a confirmed bug?

---

## [Assigning values to a session? Ben Curtis's OpenID example?](https://www.ruby-forum.com/t/assigning-values-to-a-session-ben-curtiss-openid-example/105406)

<div class="topic-metadata">

**Author:** [@bravedave](https://www.ruby-forum.com/u/bravedave)\
**Replies:** 1\
**Last updated:** [May 29, 2007, 8:17pm UTC](https://www.ruby-forum.com/t/assigning-values-to-a-session-ben-curtiss-openid-example/105406 "2007-05-29T20:17:15Z")

</div>

I’m taking apart Ben Curtis’s OpenID / RESTful authentication ‘head start’ and trying to understand it enough to integrate it into my app. registration is a hash containing the valid sreg keys given above use this to …

---

## [Validates\_uniqueness\_of does not pass unit test](https://www.ruby-forum.com/t/validates-uniqueness-of-does-not-pass-unit-test/105266)

<div class="topic-metadata">

**Author:** [@jko170](https://www.ruby-forum.com/u/jko170)\
**Replies:** 5\
**Last updated:** [May 29, 2007, 8:11pm UTC](https://www.ruby-forum.com/t/validates-uniqueness-of-does-not-pass-unit-test/105266 "2007-05-29T20:11:19Z")

</div>

I am doing some very very basic unit testing. If I take away the uniqueness validation, the tests pass. Could this be a bug in Edge Rails?

---

## [Cache everything but](https://www.ruby-forum.com/t/cache-everything-but/105381)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 4\
**Last updated:** [May 29, 2007, 8:05pm UTC](https://www.ruby-forum.com/t/cache-everything-but/105381 "2007-05-29T20:05:16Z")

</div>

I saw this older post when searching for information: On Feb 16, 5:10 pm, Ingo W. removed\_email\_address@domain.invalid wrote: possible? I have exactly the same need - a front page that has a bit of text that change…

---

## [CTI in ActiveRecord](https://www.ruby-forum.com/t/cti-in-activerecord/105325)

<div class="topic-metadata">

**Author:** [@mr\_brownstone](https://www.ruby-forum.com/u/mr_brownstone)\
**Replies:** 5\
**Last updated:** [May 29, 2007, 8:03pm UTC](https://www.ruby-forum.com/t/cti-in-activerecord/105325 "2007-05-29T20:03:16Z")

</div>

I search an plugin or gem, but don’t find nothing satisfactory. I believe to be stranger a technology that nails the DRY, have that create you vary equal tables, instead of using inheritance. Exists an soluction for t…

---

## [Design patterns](https://www.ruby-forum.com/t/design-patterns/105002)

<div class="topic-metadata">

**Author:** [@mguzman](https://www.ruby-forum.com/u/mguzman)\
**Replies:** 4\
**Last updated:** [May 29, 2007, 6:11pm UTC](https://www.ruby-forum.com/t/design-patterns/105002 "2007-05-29T18:11:56Z")

</div>

Hi everyone I’m Maximiliano G. from Brazil and I am programing on ruby on rails only a couple of months. I read a lot of books and articles about it but I could not clarify some doubts about design patterns: Is i…

---

## [Instantiating new engine controller?](https://www.ruby-forum.com/t/instantiating-new-engine-controller/105097)

<div class="topic-metadata">

**Author:** [@Marc\_Hassman](https://www.ruby-forum.com/u/Marc_Hassman)\
**Replies:** 2\
**Last updated:** [May 29, 2007, 5:54pm UTC](https://www.ruby-forum.com/t/instantiating-new-engine-controller/105097 "2007-05-29T17:54:53Z")

</div>

I am trying to do some dynamic instantiation trickery and have found success, up to the point where my view is to be rendered. When I call an action and let the new controller render, it tries to render out of the ap…

---

## [HOW TO: Implementing discounts in an invoicing/billing/pos](https://www.ruby-forum.com/t/how-to-implementing-discounts-in-an-invoicing-billing-pos/105397)

<div class="topic-metadata">

**Author:** [@gberz3](https://www.ruby-forum.com/u/gberz3)\
**Replies:** 1\
**Last updated:** [May 29, 2007, 5:31pm UTC](https://www.ruby-forum.com/t/how-to-implementing-discounts-in-an-invoicing-billing-pos/105397 "2007-05-29T17:31:49Z")

</div>

Hi All, I’m in the process of creating an invoicing/billing/pos-esque package with Rails. It was suggested I do something I’m excited about and potentially even need in order to motivate me; so, that’s what I’m doin…

---

## [Route all requests to one action](https://www.ruby-forum.com/t/route-all-requests-to-one-action/105372)

<div class="topic-metadata">

**Author:** [@milo](https://www.ruby-forum.com/u/milo)\
**Replies:** 2\
**Last updated:** [May 29, 2007, 5:13pm UTC](https://www.ruby-forum.com/t/route-all-requests-to-one-action/105372 "2007-05-29T17:13:29Z")

</div>

Is there a simple way of directing all requests to a particular controller to resolve to a single action? I was thinking that this might be a useful way to redirect to a “site down for maintenance” page rather than us…

---

## [AR: abstract model and eager loading](https://www.ruby-forum.com/t/ar-abstract-model-and-eager-loading/105124)

<div class="topic-metadata">

**Author:** [@daxhuiberts](https://www.ruby-forum.com/u/daxhuiberts)\
**Replies:** 2\
**Last updated:** [May 29, 2007, 5:09pm UTC](https://www.ruby-forum.com/t/ar-abstract-model-and-eager-loading/105124 "2007-05-29T17:09:40Z")

</div>

Hi, I have the following setup: class Item \< ActiveRecord::Base belongs\_to :item, :polymorphic =\> true end class AbstractItem \< ActiveRecord::Base has\_one :item, :as =\> :item def self.abstract\_class?; self == Abst…

---

## [Job opportunity](https://www.ruby-forum.com/t/job-opportunity/105351)

<div class="topic-metadata">

**Author:** [@jacquie](https://www.ruby-forum.com/u/jacquie)\
**Replies:** 1\
**Last updated:** [May 29, 2007, 5:02pm UTC](https://www.ruby-forum.com/t/job-opportunity/105351 "2007-05-29T17:02:46Z")

</div>

Hi,all I am back.I wonder if there is any job opportunities for junior “Ruby on Rails” developer in Sydney? any information could be helpful! Thanks very much in advance! Cheers Jacquie

---

## [Validates that one date is before another one](https://www.ruby-forum.com/t/validates-that-one-date-is-before-another-one/105360)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 4\
**Last updated:** [May 29, 2007, 4:49pm UTC](https://www.ruby-forum.com/t/validates-that-one-date-is-before-another-one/105360 "2007-05-29T16:49:39Z")

</div>

How could I use validation in Ror to validate that one date is before the other date ? Thanks.

---

## [Get config hash for active connection](https://www.ruby-forum.com/t/get-config-hash-for-active-connection/105393)

<div class="topic-metadata">

**Author:** [@bartocc](https://www.ruby-forum.com/u/bartocc)\
**Replies:** 1\
**Last updated:** [May 29, 2007, 4:49pm UTC](https://www.ruby-forum.com/t/get-config-hash-for-active-connection/105393 "2007-05-29T16:49:28Z")

</div>

Hi, I want to use establish\_connection for one of my classes, but I just want to change the user and password, and keep the current connection adapter and host. I can call ActiveRecord::Base.connection to get the ada…

---

## [Automatic emails](https://www.ruby-forum.com/t/automatic-emails/105379)

<div class="topic-metadata">

**Author:** [@muralimaran](https://www.ruby-forum.com/u/muralimaran)\
**Replies:** 1\
**Last updated:** [May 29, 2007, 3:49pm UTC](https://www.ruby-forum.com/t/automatic-emails/105379 "2007-05-29T15:49:13Z")

</div>

Hi folks, My application needs to send scheduled emails to customers. is this possible with ruby on rails, if yes can anybody advice me to start from correct source please. How to use “cron” plug-in for this and how …

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

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