# Rails

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

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

---

## [Enumeration sum](https://www.ruby-forum.com/t/enumeration-sum/137418)

<div class="topic-metadata">

**Author:** [@emeratius](https://www.ruby-forum.com/u/emeratius)\
**Replies:** 3\
**Last updated:** [May 13, 2008, 2:38am UTC](https://www.ruby-forum.com/t/enumeration-sum/137418 "2008-05-13T02:38:50Z")

</div>

Any idees why I can do this: @sum = @selected.inject(0) { |sum, player| sum + player.value } but not this: @sum = @selected.sum { |player| player.value } @sum = @selected.sum(&:value) The last two give me following …

---

## [Polymorphic naming difficulties](https://www.ruby-forum.com/t/polymorphic-naming-difficulties/137426)

<div class="topic-metadata">

**Author:** [@dewie](https://www.ruby-forum.com/u/dewie)\
**Replies:** 0\
**Last updated:** [May 13, 2008, 2:24am UTC](https://www.ruby-forum.com/t/polymorphic-naming-difficulties/137426 "2008-05-13T02:24:12Z")

</div>

Hi all. I’m having a problem naming a polymorphic relationship. Here’s my thinking… First, an analogy. You’re walking through the mall. Through a window you see a game you’re interested. I’m attempting to model the re…

---

## [ActiveResource & Authenticating with Emails](https://www.ruby-forum.com/t/activeresource-authenticating-with-emails/137351)

<div class="topic-metadata">

**Author:** [@stimpy](https://www.ruby-forum.com/u/stimpy)\
**Replies:** 13\
**Last updated:** [May 13, 2008, 1:52am UTC](https://www.ruby-forum.com/t/activeresource-authenticating-with-emails/137351 "2008-05-13T01:52:38Z")

</div>

I’m trying to use a site called zendesk.com and you authenticate to the site using an email address and a password, so that the self.site definition in the model looks like this: self.site = “http://removed\_email\_ad…

---

## [SSL w/ mongrel and Apache 2](https://www.ruby-forum.com/t/ssl-w-mongrel-and-apache-2/137424)

<div class="topic-metadata">

**Author:** [@weliwarmer](https://www.ruby-forum.com/u/weliwarmer)\
**Replies:** 0\
**Last updated:** [May 13, 2008, 1:45am UTC](https://www.ruby-forum.com/t/ssl-w-mongrel-and-apache-2/137424 "2008-05-13T01:45:28Z")

</div>

Hello, I’m working on a Rails app that needs to open an SSL connection to another server. We use mongrel+Apache 2, and the SSL Requirement plugin (installed via script/plugin install). I have a method in a controlle…

---

## [Class variables refreshed in development, but how exception\_notification does it?](https://www.ruby-forum.com/t/class-variables-refreshed-in-development-but-how-exception-notification-does-it/137420)

<div class="topic-metadata">

**Author:** [@mr\_tibs](https://www.ruby-forum.com/u/mr_tibs)\
**Replies:** 1\
**Last updated:** [May 13, 2008, 12:51am UTC](https://www.ruby-forum.com/t/class-variables-refreshed-in-development-but-how-exception-notification-does-it/137420 "2008-05-13T00:51:10Z")

</div>

Hi, I discovered today that Rails class variables are refreshed in development mode (because classes are reloaded). How else can you persist class variables in memory? I know it is possible, because the exception\_not…

---

## [Operator Names](https://www.ruby-forum.com/t/operator-names/137204)

<div class="topic-metadata">

**Author:** [@mcarlson](https://www.ruby-forum.com/u/mcarlson)\
**Replies:** 6\
**Last updated:** [May 13, 2008, 12:16am UTC](https://www.ruby-forum.com/t/operator-names/137204 "2008-05-13T00:16:39Z")

</div>

What is this ‘=\>’ operator called? Does it have a name?

---

## [How best to extend acts\_as\_tree?](https://www.ruby-forum.com/t/how-best-to-extend-acts-as-tree/137400)

<div class="topic-metadata">

**Author:** [@dmorin](https://www.ruby-forum.com/u/dmorin)\
**Replies:** 2\
**Last updated:** [May 13, 2008, 12:10am UTC](https://www.ruby-forum.com/t/how-best-to-extend-acts-as-tree/137400 "2008-05-13T00:10:46Z")

</div>

I’ve got a bunch of tables that will act\_as\_tree. I don’t see a method (maybe I’m missing it) to “get myself and my children”? So I wanted to add it to my model, but I have so many acts\_as\_tree models I was trying t…

---

## [Newbie on Rails](https://www.ruby-forum.com/t/newbie-on-rails/137312)

<div class="topic-metadata">

**Author:** [@diabolic](https://www.ruby-forum.com/u/diabolic)\
**Replies:** 6\
**Last updated:** [May 12, 2008, 11:51pm UTC](https://www.ruby-forum.com/t/newbie-on-rails/137312 "2008-05-12T23:51:46Z")

</div>

Hello everyone. Near the end of last week I’ve decided to get my hands on a project that, unfortunately, has been lying around in my desk for a while now. As with any other project I’ve elaborated my project plan, wit…

---

## [Beginner's problem :p](https://www.ruby-forum.com/t/beginners-problem-p/137392)

<div class="topic-metadata">

**Author:** [@rubynoobie](https://www.ruby-forum.com/u/rubynoobie)\
**Replies:** 15\
**Last updated:** [May 12, 2008, 11:47pm UTC](https://www.ruby-forum.com/t/beginners-problem-p/137392 "2008-05-12T23:47:01Z")

</div>

Hi all, I’m new to RoR I finally got a RoR environment working on my PC with instantrails 2.0. Here is my problem. I created a database with a “Users” table. It’s structure is the following : Name, Surnmame, City, a…

---

## [What remains constant with Rails 1.2 and rails 2.0.2](https://www.ruby-forum.com/t/what-remains-constant-with-rails-1-2-and-rails-2-0-2/137381)

<div class="topic-metadata">

**Author:** [@webreservoir](https://www.ruby-forum.com/u/webreservoir)\
**Replies:** 5\
**Last updated:** [May 12, 2008, 11:44pm UTC](https://www.ruby-forum.com/t/what-remains-constant-with-rails-1-2-and-rails-2-0-2/137381 "2008-05-12T23:44:33Z")

</div>

Hello, I have been waiting for good books on rails 2.0.2, but unfortunately it seems very far. I don’t think… i will be getting very good books like … (1) Rails Space, Ruby for Rails and many other specially written …

---

## [Organizing a Hash Map](https://www.ruby-forum.com/t/organizing-a-hash-map/137412)

<div class="topic-metadata">

**Author:** [@sithadmin](https://www.ruby-forum.com/u/sithadmin)\
**Replies:** 4\
**Last updated:** [May 12, 2008, 11:28pm UTC](https://www.ruby-forum.com/t/organizing-a-hash-map/137412 "2008-05-12T23:28:58Z")

</div>

Hello, I have a hash map that gets pumped full of info. The key is a username… I’m using a @myhashmap.each do |key, item| to display the hash map in my rhtml, but I need it to be alphabetized… Is there a built-in way…

---

## [Image upload with attachment\_fu](https://www.ruby-forum.com/t/image-upload-with-attachment-fu/137411)

<div class="topic-metadata">

**Author:** [@mattmcswain](https://www.ruby-forum.com/u/mattmcswain)\
**Replies:** 2\
**Last updated:** [May 12, 2008, 11:09pm UTC](https://www.ruby-forum.com/t/image-upload-with-attachment-fu/137411 "2008-05-12T23:09:25Z")

</div>

I want to be able to edit the uploaded images from attachment\_fu. In my view I do something like this: Cover \<%= f.file\_field :cover %\> and then in my controller, I do something like @book = Book.new(params\[:b…

---

## [Cannot toggle div from radio\_buttons](https://www.ruby-forum.com/t/cannot-toggle-div-from-radio-buttons/137391)

<div class="topic-metadata">

**Author:** [@Erwin](https://www.ruby-forum.com/u/Erwin)\
**Replies:** 4\
**Last updated:** [May 12, 2008, 10:51pm UTC](https://www.ruby-forum.com/t/cannot-toggle-div-from-radio-buttons/137391 "2008-05-12T22:51:54Z")

</div>

Hi I have a couple of radio\_buttons in my form \<% form\_for … \<%= radio\_button\_tag('contact\_type', '1', (@contact\_type == "1" ? true : false), {:id =\> 'ct1', :onclick =\> "$('contact\_by').toggle;"}) -%\> Contact 1 \<%…

---

## [ESPN- Sr. Web Developer position in our Burbank, CA office- Ruby experience required](https://www.ruby-forum.com/t/espn-sr-web-developer-position-in-our-burbank-ca-office-ruby-experience-required/137410)

<div class="topic-metadata">

**Author:** [@Marisa](https://www.ruby-forum.com/u/Marisa)\
**Replies:** 0\
**Last updated:** [May 12, 2008, 10:35pm UTC](https://www.ruby-forum.com/t/espn-sr-web-developer-position-in-our-burbank-ca-office-ruby-experience-required/137410 "2008-05-12T22:35:17Z")

</div>

We have a Sr. Web D. position in our Burbank, CA office. We are looking for someone that has Ruby on Rails experience. I have included a job description for your review. If you are interested in the position plea…

---

## [Import an existing app](https://www.ruby-forum.com/t/import-an-existing-app/137092)

<div class="topic-metadata">

**Author:** [@cyberthug](https://www.ruby-forum.com/u/cyberthug)\
**Replies:** 3\
**Last updated:** [May 12, 2008, 10:31pm UTC](https://www.ruby-forum.com/t/import-an-existing-app/137092 "2008-05-12T22:31:42Z")

</div>

I’m setting up a dev environment for an existing ruby app. I grabbed the app files & database via SVN. I changed the database.yml file but I can’t even reach any page other than the default Welcome to Rails page!. Wh…

---

## [This Week in Ruby (May 12, 2008)](https://www.ruby-forum.com/t/this-week-in-ruby-may-12-2008/137404)

<div class="topic-metadata">

**Author:** [@visitor1981](https://www.ruby-forum.com/u/visitor1981)\
**Replies:** 0\
**Last updated:** [May 12, 2008, 10:10pm UTC](https://www.ruby-forum.com/t/this-week-in-ruby-may-12-2008/137404 "2008-05-12T22:10:03Z")

</div>

\-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi all, here you can find the seventh edition of “This Week in Ruby”: Cheers, Antonio http://antoniocangiano.com - Zen and the Art of Programming http://stacktrace…

---

## [How to change the default action for all the controllers?](https://www.ruby-forum.com/t/how-to-change-the-default-action-for-all-the-controllers/137136)

<div class="topic-metadata">

**Author:** [@muyayi](https://www.ruby-forum.com/u/muyayi)\
**Replies:** 4\
**Last updated:** [May 12, 2008, 9:56pm UTC](https://www.ruby-forum.com/t/how-to-change-the-default-action-for-all-the-controllers/137136 "2008-05-12T21:56:59Z")

</div>

I am new to rails. I am trying to study the structure of rails. And I am wondering, where is the default action for all the controllers (i.e. index) defined. How does rails know that when no action is defined in UR…

---

## [Expiring Fragment caching](https://www.ruby-forum.com/t/expiring-fragment-caching/137402)

<div class="topic-metadata">

**Author:** [@railsdog](https://www.ruby-forum.com/u/railsdog)\
**Replies:** 0\
**Last updated:** [May 12, 2008, 9:44pm UTC](https://www.ruby-forum.com/t/expiring-fragment-caching/137402 "2008-05-12T21:44:30Z")

</div>

The standard Cache sweepers seem to work on too big a scale for what I’d like… I’m caching and reading three different fragments on a page: The “Left Nav” menu for the current user (changes infrequently for a user). …

---

## [Sendmail, rails and spam](https://www.ruby-forum.com/t/sendmail-rails-and-spam/137332)

<div class="topic-metadata">

**Author:** [@PeteSalty](https://www.ruby-forum.com/u/PeteSalty)\
**Replies:** 2\
**Last updated:** [May 12, 2008, 9:39pm UTC](https://www.ruby-forum.com/t/sendmail-rails-and-spam/137332 "2008-05-12T21:39:02Z")

</div>

We’re having a terrible problem with sending email using sendmail and rails. We believe we have everything set up correctly. (I’ve changed the domain name below because this is so embarrassing ). Our mail config look…

---

## [Photo rotation](https://www.ruby-forum.com/t/photo-rotation/196679)

<div class="topic-metadata">

**Author:** [@sunfish](https://www.ruby-forum.com/u/sunfish)\
**Replies:** 3\
**Last updated:** [May 12, 2008, 9:08pm UTC](https://www.ruby-forum.com/t/photo-rotation/196679 "2008-05-12T21:08:02Z")

</div>

hi in my application i have a photo gallery page where i showing all my album photos, i want to developed a functionality where i can rotate photo there and and saved backed to file system. how it is possible ?

---

## [Reducing Heap Fragmentation - Any Thoughts?](https://www.ruby-forum.com/t/reducing-heap-fragmentation-any-thoughts/136964)

<div class="topic-metadata">

**Author:** [@kyle](https://www.ruby-forum.com/u/kyle)\
**Replies:** 3\
**Last updated:** [May 12, 2008, 8:52pm UTC](https://www.ruby-forum.com/t/reducing-heap-fragmentation-any-thoughts/136964 "2008-05-12T20:52:36Z")

</div>

My mongrels slowly grow as my application runs, and I have to restart them every few days (not as bad as some, I know). I used bleak\_house and had the following conversation with Evan: http://rubyforge.org/forum/foru…

---

## [Strange behaviour collection on the resources](https://www.ruby-forum.com/t/strange-behaviour-collection-on-the-resources/137313)

<div class="topic-metadata">

**Author:** [@blj](https://www.ruby-forum.com/u/blj)\
**Replies:** 2\
**Last updated:** [May 12, 2008, 8:21pm UTC](https://www.ruby-forum.com/t/strange-behaviour-collection-on-the-resources/137313 "2008-05-12T20:21:19Z")

</div>

My route is as follows: map.namespace :admin do |admin| admin.resources :campaigns, :collection=\>{ :auto\_complete\_for\_client\_name=\>:post, :auto\_complete\_for\_user\_login=\>:post} end The auto complete prototype POST r…

---

## [Getting Rid of soap4r](https://www.ruby-forum.com/t/getting-rid-of-soap4r/137393)

<div class="topic-metadata">

**Author:** [@mwalsh](https://www.ruby-forum.com/u/mwalsh)\
**Replies:** 3\
**Last updated:** [May 12, 2008, 8:17pm UTC](https://www.ruby-forum.com/t/getting-rid-of-soap4r/137393 "2008-05-12T20:17:12Z")

</div>

Hello, I’m maintaining a legacy app that crashes when I remove the “gem soap4r” line from boot.rb. As far as I can tell, nothing in this app uses soap. The app doesn’t complain when I switch the Rails gem to 1.1.6 fr…

---

## [Link\_to](https://www.ruby-forum.com/t/link-to/137390)

<div class="topic-metadata">

**Author:** [@biqut2](https://www.ruby-forum.com/u/biqut2)\
**Replies:** 2\
**Last updated:** [May 12, 2008, 7:54pm UTC](https://www.ruby-forum.com/t/link-to/137390 "2008-05-12T19:54:18Z")

</div>

I am having trouble with this piece of code. It does not open a popup window. If I put curly braces around the controller and action part I get a popup but the varible username does not get passed. Can anyone help me …

---

## [Address Bar after XMLHTTP request](https://www.ruby-forum.com/t/address-bar-after-xmlhttp-request/137236)

<div class="topic-metadata">

**Author:** [@monkeyten](https://www.ruby-forum.com/u/monkeyten)\
**Replies:** 2\
**Last updated:** [May 12, 2008, 7:44pm UTC](https://www.ruby-forum.com/t/address-bar-after-xmlhttp-request/137236 "2008-05-12T19:44:08Z")

</div>

Hello all, I was trawling the web for an answer to this one - is there an accepted/preferred methodology for updating the browser address bar after an AJAX page transition? For example, I have a list of folders, whic…

---

## [How should I structure this model?](https://www.ruby-forum.com/t/how-should-i-structure-this-model/137328)

<div class="topic-metadata">

**Author:** [@Shelby\_W](https://www.ruby-forum.com/u/Shelby_W)\
**Replies:** 2\
**Last updated:** [May 12, 2008, 7:16pm UTC](https://www.ruby-forum.com/t/how-should-i-structure-this-model/137328 "2008-05-12T19:16:03Z")

</div>

I have an application that is used by several different organizations. (each organization runs their own copy) In the application, there are users, and each user can have a number of specialties. The specialties vary…

---

## [Screencast on in-place edit](https://www.ruby-forum.com/t/screencast-on-in-place-edit/137385)

<div class="topic-metadata">

**Author:** [@wickie](https://www.ruby-forum.com/u/wickie)\
**Replies:** 0\
**Last updated:** [May 12, 2008, 6:11pm UTC](https://www.ruby-forum.com/t/screencast-on-in-place-edit/137385 "2008-05-12T18:11:20Z")

</div>

We tackled in-place edit in the latest screencast in our free Learning Rails course: www.BuildingWebApps.com/learningrails/14 We were surprised to find that the in-place edit plugin in the official Rails repository s…

---

## [Dreamhost, Ruby on Rails, attachment\_fu and RMagick](https://www.ruby-forum.com/t/dreamhost-ruby-on-rails-attachment-fu-and-rmagick/137383)

<div class="topic-metadata">

**Author:** [@Walter\_Lockhart](https://www.ruby-forum.com/u/Walter_Lockhart)\
**Replies:** 0\
**Last updated:** [May 12, 2008, 5:54pm UTC](https://www.ruby-forum.com/t/dreamhost-ruby-on-rails-attachment-fu-and-rmagick/137383 "2008-05-12T17:54:15Z")

</div>

Dear Forum, I am hosting a Ruby on Rails site on Dreamhost and use attachment\_fu and RMagick to upload images to the site. Everything works fine on my development machine. However, on Dreamhost it appears to be faili…

---

## [To delete a topic posted by me](https://www.ruby-forum.com/t/to-delete-a-topic-posted-by-me/137340)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 3\
**Last updated:** [May 12, 2008, 5:38pm UTC](https://www.ruby-forum.com/t/to-delete-a-topic-posted-by-me/137340 "2008-05-12T17:38:53Z")

</div>

Hi This is not related to rails.How can i delete my post from this site once after it is posted Sijo

---

## [CRUD in one single page (inline editing and creating with AJAX\[?\])](https://www.ruby-forum.com/t/crud-in-one-single-page-inline-editing-and-creating-with-ajax/137134)

<div class="topic-metadata">

**Author:** [@paco.onrails](https://www.ruby-forum.com/u/paco.onrails)\
**Replies:** 2\
**Last updated:** [May 12, 2008, 4:59pm UTC](https://www.ruby-forum.com/t/crud-in-one-single-page-inline-editing-and-creating-with-ajax/137134 "2008-05-12T16:59:20Z")

</div>

Hello everybody, I am new in RoR and this is my first post. What I am looking for is a pattern for do CRUD in one single page with in-line creating and in-line editing. The idea is that main page is a listing and you …

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

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