# Rails

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

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

---

## [Create a controller via a script .rb](https://www.ruby-forum.com/t/create-a-controller-via-a-script-rb/106617)

<div class="topic-metadata">

**Author:** [@halvor](https://www.ruby-forum.com/u/halvor)\
**Replies:** 1\
**Last updated:** [June 12, 2007, 9:51pm UTC](https://www.ruby-forum.com/t/create-a-controller-via-a-script-rb/106617 "2007-06-12T21:51:18Z")

</div>

Hello, this should be a straightfoward question. I was wondering how to do the equivalent of : ruby script/generate controller MyNewController from within a .rb file. I would then want to call the .rb script from my…

---

## [Receive Emails](https://www.ruby-forum.com/t/receive-emails/106652)

<div class="topic-metadata">

**Author:** [@newby](https://www.ruby-forum.com/u/newby)\
**Replies:** 1\
**Last updated:** [June 12, 2007, 9:48pm UTC](https://www.ruby-forum.com/t/receive-emails/106652 "2007-06-12T21:48:17Z")

</div>

I want to be able to receive emails in RoR. It seems kind of complicated. Anyone have experience in this?

---

## [Hi Friends, You favorite travelling](https://www.ruby-forum.com/t/hi-friends-you-favorite-travelling/106655)

<div class="topic-metadata">

**Author:** [@Smart\_Nobia](https://www.ruby-forum.com/u/Smart_Nobia)\
**Replies:** 0\
**Last updated:** [June 12, 2007, 9:46pm UTC](https://www.ruby-forum.com/t/hi-friends-you-favorite-travelling/106655 "2007-06-12T21:46:17Z")

</div>

Your favorite travelling website www.sadabahar.net have been update now with the ROAD MAP of selected cities. Thousand of traveler are surfing there requirements on this site… they are all waiting for you… Click the …

---

## [Rake migrate question!](https://www.ruby-forum.com/t/rake-migrate-question/106651)

<div class="topic-metadata">

**Author:** [@DBC\_User](https://www.ruby-forum.com/u/DBC_User)\
**Replies:** 2\
**Last updated:** [June 12, 2007, 9:12pm UTC](https://www.ruby-forum.com/t/rake-migrate-question/106651 "2007-06-12T21:12:13Z")

</div>

I have followed the tutorial at http://godbit.com/article/beginners-guide-to-rails-part-1 to learn rake migrate. I created a database and have the database information in my database.yml correct. I ran ruby to genera…

---

## [Database.yml question](https://www.ruby-forum.com/t/database-yml-question/106635)

<div class="topic-metadata">

**Author:** [@DBC\_User](https://www.ruby-forum.com/u/DBC_User)\
**Replies:** 2\
**Last updated:** [June 12, 2007, 8:40pm UTC](https://www.ruby-forum.com/t/database-yml-question/106635 "2007-06-12T20:40:05Z")

</div>

Based on what I read, database.yml has the config pointing to all 3 different environment. You can use rake to move the schema from one environment to another. How will the rails know it is running in development or t…

---

## [Routing error when including javascript](https://www.ruby-forum.com/t/routing-error-when-including-javascript/106645)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [June 12, 2007, 8:33pm UTC](https://www.ruby-forum.com/t/routing-error-when-including-javascript/106645 "2007-06-12T20:33:04Z")

</div>

Hi all - I’m trying to use a javascript library in my rails app and I’m getting a routing error that I can’t seem to fix. I’m using rails 1.2.3, and all restful routing. In my layout file, I have the following line: …

---

## [Issue w/ Eager Loading](https://www.ruby-forum.com/t/issue-w-eager-loading/106634)

<div class="topic-metadata">

**Author:** [@ptremblett](https://www.ruby-forum.com/u/ptremblett)\
**Replies:** 4\
**Last updated:** [June 12, 2007, 8:18pm UTC](https://www.ruby-forum.com/t/issue-w-eager-loading/106634 "2007-06-12T20:18:16Z")

</div>

Hi, I have a rails app that uses these models: class CoreRouter \< ActiveRecord::Base has\_many :ports end class Port \< ActiveRecord::Base belongs\_to :core\_router has\_many :addresses end class Address \< ActiveReco…

---

## [Whitch of the authentication methodes to choose?](https://www.ruby-forum.com/t/whitch-of-the-authentication-methodes-to-choose/106613)

<div class="topic-metadata">

**Author:** [@spitfire](https://www.ruby-forum.com/u/spitfire)\
**Replies:** 1\
**Last updated:** [June 12, 2007, 7:37pm UTC](https://www.ruby-forum.com/t/whitch-of-the-authentication-methodes-to-choose/106613 "2007-06-12T19:37:43Z")

</div>

Hi List! I was searching the web for a HowTo about authatication or session handling in rails. Finally I found Peak Obsession and read: “This article is part of the confusing world of Authentication in Rails. Feel …

---

## [Restful nested and unnested routes](https://www.ruby-forum.com/t/restful-nested-and-unnested-routes/106549)

<div class="topic-metadata">

**Author:** [@Sebastian\_SchSSSSn](https://www.ruby-forum.com/u/Sebastian_SchSSSSn)\
**Replies:** 1\
**Last updated:** [June 12, 2007, 7:21pm UTC](https://www.ruby-forum.com/t/restful-nested-and-unnested-routes/106549 "2007-06-12T19:21:42Z")

</div>

Hi, I´ve problems with the restful routes. I know that /artists/1/songs works: map.resources :artists do | artists | artists.resources :songs end But how can I route to a list of all songs with artist, something l…

---

## [Where's Rails presence at WWDC07](https://www.ruby-forum.com/t/wheres-rails-presence-at-wwdc07/106631)

<div class="topic-metadata">

**Author:** [@jose](https://www.ruby-forum.com/u/jose)\
**Replies:** 1\
**Last updated:** [June 12, 2007, 7:10pm UTC](https://www.ruby-forum.com/t/wheres-rails-presence-at-wwdc07/106631 "2007-06-12T19:10:39Z")

</div>

I’m looking forward to deploying Rails on Leopard server running on 8 core. So far, one mention of Rails on Leopard server has been made by Apple at the WWDC07. Where’s the Rails presence at the conference to tell mo…

---

## [Connecting to Production Database](https://www.ruby-forum.com/t/connecting-to-production-database/106581)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [June 12, 2007, 5:53pm UTC](https://www.ruby-forum.com/t/connecting-to-production-database/106581 "2007-06-12T17:53:05Z")

</div>

I would like to connect to my production database from my local machine, so that I can import/export data using rake commands. (for example: RAILS\_ENV=production rake db:fixtures:load) My database.yml file is typical: …

---

## [Builder::XmlMarkup and dashes](https://www.ruby-forum.com/t/builder-xmlmarkup-and-dashes/106482)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [June 12, 2007, 5:44pm UTC](https://www.ruby-forum.com/t/builder-xmlmarkup-and-dashes/106482 "2007-06-12T17:44:03Z")

</div>

Has anyone hacked Builder::XmlMarkup to dasherize underscore tags by default? I know I can use tag!, but I’d like to find a way for it to translate underscores to dashes automatically. In other words: xml.department\_…

---

## [How do I get act\_as\_tree members to use the same object for](https://www.ruby-forum.com/t/how-do-i-get-act-as-tree-members-to-use-the-same-object-for/106598)

<div class="topic-metadata">

**Author:** [@Ben\_Stephens](https://www.ruby-forum.com/u/Ben_Stephens)\
**Replies:** 1\
**Last updated:** [June 12, 2007, 5:32pm UTC](https://www.ruby-forum.com/t/how-do-i-get-act-as-tree-members-to-use-the-same-object-for/106598 "2007-06-12T17:32:01Z")

</div>

Hi, how do I get act\_as\_tree members to use the same object for their parent? For example at the moment I have: tree\_member = TreeMember.find(8) sibling\_tree\_member = TreeMember.find(9) tree\_member.parent.id =\> 2 s…

---

## [RESTful messaging. Trying to put it together and it feels u](https://www.ruby-forum.com/t/restful-messaging-trying-to-put-it-together-and-it-feels-u/106583)

<div class="topic-metadata">

**Author:** [@bellcolt](https://www.ruby-forum.com/u/bellcolt)\
**Replies:** 2\
**Last updated:** [June 12, 2007, 5:26pm UTC](https://www.ruby-forum.com/t/restful-messaging-trying-to-put-it-together-and-it-feels-u/106583 "2007-06-12T17:26:22Z")

</div>

Hi all, I’m putting together a quick little app just to do some messaging between users. I’m trying to do it restfully but what I have feels kind of unclean. Here’s what I have: Models: User has\_many :mes…

---

## [Linking to images outside public folder](https://www.ruby-forum.com/t/linking-to-images-outside-public-folder/106544)

<div class="topic-metadata">

**Author:** [@urbanf](https://www.ruby-forum.com/u/urbanf)\
**Replies:** 4\
**Last updated:** [June 12, 2007, 5:21pm UTC](https://www.ruby-forum.com/t/linking-to-images-outside-public-folder/106544 "2007-06-12T17:21:12Z")

</div>

I have a project where I need to show images (.jpg’s) in the browser that are outside my projects “public” directory. I’m developing on a Mac and I’ve tried using an absolute path “/Users/my\_name/Desktop/ image.jpg”. …

---

## [Need to find a bottleneck when traffic is kinda high](https://www.ruby-forum.com/t/need-to-find-a-bottleneck-when-traffic-is-kinda-high/106530)

<div class="topic-metadata">

**Author:** [@nephish](https://www.ruby-forum.com/u/nephish)\
**Replies:** 12\
**Last updated:** [June 12, 2007, 4:28pm UTC](https://www.ruby-forum.com/t/need-to-find-a-bottleneck-when-traffic-is-kinda-high/106530 "2007-06-12T16:28:38Z")

</div>

Hello there all, i have one page that uses periodically\_call\_remote to update about 65 divs on this page every 5 minutes or so. The page also uses a rather large background map. the server we are using has 4 cpu at 2…

---

## [Standard practices for RESTful remote (AJAXified) manipulati](https://www.ruby-forum.com/t/standard-practices-for-restful-remote-ajaxified-manipulati/106528)

<div class="topic-metadata">

**Author:** [@madscene](https://www.ruby-forum.com/u/madscene)\
**Replies:** 2\
**Last updated:** [June 12, 2007, 4:28pm UTC](https://www.ruby-forum.com/t/standard-practices-for-restful-remote-ajaxified-manipulati/106528 "2007-06-12T16:28:38Z")

</div>

In a nutshell: I’ve got 2 RESTful resources and complex edit page for the parent resource. I want to modify the nested resource from the parent resource’s edit page, and I want to use AJAX to do it. I’m having a re…

---

## [Duplicate 'SHOW FIELDS' statements when inserting data for p](https://www.ruby-forum.com/t/duplicate-show-fields-statements-when-inserting-data-for-p/106440)

<div class="topic-metadata">

**Author:** [@dmcclean](https://www.ruby-forum.com/u/dmcclean)\
**Replies:** 5\
**Last updated:** [June 12, 2007, 4:25pm UTC](https://www.ruby-forum.com/t/duplicate-show-fields-statements-when-inserting-data-for-p/106440 "2007-06-12T16:25:38Z")

</div>

I am using a HABTM relationship for my app. When inserting data for a number of collection objects, I am seeing a ‘SHOW FIELD’ query as each row is inserted: 0m \[4;36;1melements\_tags Columns (0.020000) \[0m \[0;1mSH…

---

## [\[ADV\] The Rails Edge Conference](https://www.ruby-forum.com/t/adv-the-rails-edge-conference/106626)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [June 12, 2007, 4:18pm UTC](https://www.ruby-forum.com/t/adv-the-rails-edge-conference/106626 "2007-06-12T16:18:37Z")

</div>

We hope you’ll join us for The Rails Edge conference coming to Chicago on August 23-25. This is the third running of this conference, put on by the same folks who run the Pragmatic Studio Rails and Ruby training even…

---

## [Form input limit reached?](https://www.ruby-forum.com/t/form-input-limit-reached/106441)

<div class="topic-metadata">

**Author:** [@blakeage](https://www.ruby-forum.com/u/blakeage)\
**Replies:** 5\
**Last updated:** [June 12, 2007, 4:02pm UTC](https://www.ruby-forum.com/t/form-input-limit-reached/106441 "2007-06-12T16:02:03Z")

</div>

I have a form that uploads 2 files via 2 file fields (I’m not actually uploading anything, but this problem occurs specifically when the form enctype is multipart). If I remove the multipart designation from the form…

---

## [Streaming FLV in RoR](https://www.ruby-forum.com/t/streaming-flv-in-ror/106618)

<div class="topic-metadata">

**Author:** [@rocky](https://www.ruby-forum.com/u/rocky)\
**Replies:** 4\
**Last updated:** [June 12, 2007, 3:42pm UTC](https://www.ruby-forum.com/t/streaming-flv-in-ror/106618 "2007-06-12T15:42:15Z")

</div>

I am working on development of an RoR site that needs to display a small streaming video on a page. My first choice is to use Flash 8 and the off the shelf skins for playback controls. Anyone have experience using th…

---

## [How do i cache this?](https://www.ruby-forum.com/t/how-do-i-cache-this/106621)

<div class="topic-metadata">

**Author:** [@mixplate](https://www.ruby-forum.com/u/mixplate)\
**Replies:** 0\
**Last updated:** [June 12, 2007, 3:19pm UTC](https://www.ruby-forum.com/t/how-do-i-cache-this/106621 "2007-06-12T15:19:20Z")

</div>

i have a account controller, where the user can make a post private or public. the function that views a public post is in the ‘main’ controller. i put cache :view\_post in the main controller, but now if the user cha…

---

## [\[ADV\] Registration for the Ruby Hoedown is now open!](https://www.ruby-forum.com/t/adv-registration-for-the-ruby-hoedown-is-now-open/106620)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [June 12, 2007, 3:14pm UTC](https://www.ruby-forum.com/t/adv-registration-for-the-ruby-hoedown-is-now-open/106620 "2007-06-12T15:14:10Z")

</div>

We opened up registration for The Ruby Hoedown 2007 yesterday (to give our announce list subscribers first dibs ;)), so fire up your web browser and hit http://www.rubyhoedown.com/. There you can check out the amazin…

---

## [Including SWFs as part of rails content](https://www.ruby-forum.com/t/including-swfs-as-part-of-rails-content/106043)

<div class="topic-metadata">

**Author:** [@rocky](https://www.ruby-forum.com/u/rocky)\
**Replies:** 8\
**Last updated:** [June 12, 2007, 2:57pm UTC](https://www.ruby-forum.com/t/including-swfs-as-part-of-rails-content/106043 "2007-06-12T14:57:08Z")

</div>

I’m having difficulties developing pages that include simple SWFs as part of the content. Specifically, they won’t play in MSIE 6. In Firefox and Opera the pages play exactly as planned, both Mac and Windows. SWFs are…

---

## [Securing private file area](https://www.ruby-forum.com/t/securing-private-file-area/106460)

<div class="topic-metadata">

**Author:** [@wickie](https://www.ruby-forum.com/u/wickie)\
**Replies:** 6\
**Last updated:** [June 12, 2007, 2:36pm UTC](https://www.ruby-forum.com/t/securing-private-file-area/106460 "2007-06-12T14:36:22Z")

</div>

I’m building an application for a company that has thousands of clients, and for each client there will a set of documents that are private to that client. Rails makes it easy, of course, to show the list of documents…

---

## [Validation of form fields](https://www.ruby-forum.com/t/validation-of-form-fields/106616)

<div class="topic-metadata">

**Author:** [@athi](https://www.ruby-forum.com/u/athi)\
**Replies:** 0\
**Last updated:** [June 12, 2007, 2:29pm UTC](https://www.ruby-forum.com/t/validation-of-form-fields/106616 "2007-06-12T14:29:33Z")

</div>

Hi, I have a form that contains two fields : Actor - text field Movie - text field. On clicking Add another movie link, I am displaying another text field for entering another movie using AJAX. So on clicking submit…

---

## [Alias\_method\_chain and Class methods (a Ruby question)](https://www.ruby-forum.com/t/alias-method-chain-and-class-methods-a-ruby-question/106615)

<div class="topic-metadata">

**Author:** [@christos](https://www.ruby-forum.com/u/christos)\
**Replies:** 0\
**Last updated:** [June 12, 2007, 2:07pm UTC](https://www.ruby-forum.com/t/alias-method-chain-and-class-methods-a-ruby-question/106615 "2007-06-12T14:07:59Z")

</div>

Hello list, I am trying to override the post\_form method of Net::HTTP so that it does something before actually doing the post. I tried the following in environments/development.rb module Net class HTTP alias\_meth…

---

## [Missing HTTP\_AUTHORIZATION headers](https://www.ruby-forum.com/t/missing-http-authorization-headers/106534)

<div class="topic-metadata">

**Author:** [@Olly\_L](https://www.ruby-forum.com/u/Olly_L)\
**Replies:** 1\
**Last updated:** [June 12, 2007, 1:29pm UTC](https://www.ruby-forum.com/t/missing-http-authorization-headers/106534 "2007-06-12T13:29:45Z")

</div>

Hi there, I’ve just installed the full Rails stack on a Slicehost Ubuntu VPS using deprec 1.7.1. I’ve successfully deployed my app and it all works fine with one exception (albeit a rather fatal one) : I’m using Aut…

---

## [Optimistic Locking and How to Handle?](https://www.ruby-forum.com/t/optimistic-locking-and-how-to-handle/92386)

<div class="topic-metadata">

**Author:** [@michael](https://www.ruby-forum.com/u/michael)\
**Replies:** 1\
**Last updated:** [June 12, 2007, 1:25pm UTC](https://www.ruby-forum.com/t/optimistic-locking-and-how-to-handle/92386 "2007-06-12T13:25:45Z")

</div>

Hello, I need to use the magic column “lock\_version” to prevent users from updating a record simultaneously. I’ve got it working without a problem. Has anyone implemented a nice way to handle the conflict resolution…

---

## [Application layout question](https://www.ruby-forum.com/t/application-layout-question/106494)

<div class="topic-metadata">

**Author:** [@springbok](https://www.ruby-forum.com/u/springbok)\
**Replies:** 6\
**Last updated:** [June 12, 2007, 12:59pm UTC](https://www.ruby-forum.com/t/application-layout-question/106494 "2007-06-12T12:59:35Z")

</div>

Hi, I’m a RoR noob so excuse me if this is an obvious question. I’ve looked in all my RoR books (I have 5) and tried to find the answer in the newsgroups but to no avail. I have an application layout which defines th…

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

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