# Rails

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

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

---

## [How to get the responseText from an Ajax.request (urgent!)](https://www.ruby-forum.com/t/how-to-get-the-responsetext-from-an-ajax-request-urgent/143587)

<div class="topic-metadata">

**Author:** [@flaubert](https://www.ruby-forum.com/u/flaubert)\
**Replies:** 2\
**Last updated:** [July 20, 2008, 11:22pm UTC](https://www.ruby-forum.com/t/how-to-get-the-responsetext-from-an-ajax-request-urgent/143587 "2008-07-20T23:22:38Z")

</div>

Hello all is it possible? I have a select list, and “onchange” event i am using a remote\_function, when it is completed, I wanted to execute a javascript: $(this).next(.‘product\_price’).value = “RESPONSE\_TEXT\_FROM\_A…

---

## [What is the Web 2.0 way of doing menus? Any suggestions?](https://www.ruby-forum.com/t/what-is-the-web-2-0-way-of-doing-menus-any-suggestions/143293)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 6\
**Last updated:** [July 20, 2008, 10:53pm UTC](https://www.ruby-forum.com/t/what-is-the-web-2-0-way-of-doing-menus-any-suggestions/143293 "2008-07-20T22:53:38Z")

</div>

Hi, My rails single click menu options in my header are running out of room. What is the most popular Web 2.0 way of handling a growing number of menu links? What’s the most popular Rails way of having drop down men…

---

## [Collapse.gif?1208641118 in production](https://www.ruby-forum.com/t/collapse-gif-1208641118-in-production/143551)

<div class="topic-metadata">

**Author:** [@micktaiwan](https://www.ruby-forum.com/u/micktaiwan)\
**Replies:** 3\
**Last updated:** [July 20, 2008, 10:35pm UTC](https://www.ruby-forum.com/t/collapse-gif-1208641118-in-production/143551 "2008-07-20T22:35:41Z")

</div>

Hi, Why do I have ?1208641118 after my resources in production ? img alt=“Collapse” src="/images/collapse.gif?1208641118" I’am sure the site is in production mode. Thanks for your help, Mickael.

---

## [STI and fixtures](https://www.ruby-forum.com/t/sti-and-fixtures/143575)

<div class="topic-metadata">

**Author:** [@itkin](https://www.ruby-forum.com/u/itkin)\
**Replies:** 10\
**Last updated:** [July 20, 2008, 9:08pm UTC](https://www.ruby-forum.com/t/sti-and-fixtures/143575 "2008-07-20T21:08:42Z")

</div>

Hi all ! Loading fixtures doens’t seems to associate my 2 objects, do know what’s wrong ? In app/ class Manager \< Employee has\_many :employees, :foreign\_key =\> :reports\_to end class Employee \< Person belongs\_to …

---

## [Has\_many option explanation](https://www.ruby-forum.com/t/has-many-option-explanation/143524)

<div class="topic-metadata">

**Author:** [@bruparel](https://www.ruby-forum.com/u/bruparel)\
**Replies:** 3\
**Last updated:** [July 20, 2008, 7:38pm UTC](https://www.ruby-forum.com/t/has-many-option-explanation/143524 "2008-07-20T19:38:05Z")

</div>

I am maintaining an application that has an account model which has many payments. So the account model has a has\_many relationship as shown below: class Account \< ActiveRecord::Base … has\_many :payments, :order =\> …

---

## [Ssl requirement plugin: exempting a couple of actions from ssl](https://www.ruby-forum.com/t/ssl-requirement-plugin-exempting-a-couple-of-actions-from-ssl/143573)

<div class="topic-metadata">

**Author:** [@DavidB](https://www.ruby-forum.com/u/DavidB)\
**Replies:** 0\
**Last updated:** [July 20, 2008, 7:18pm UTC](https://www.ruby-forum.com/t/ssl-requirement-plugin-exempting-a-couple-of-actions-from-ssl/143573 "2008-07-20T19:18:02Z")

</div>

I am wondering the cleanest way to selectively enforce SSL. Say I have an application with 10 controllers, each with 5 actions. I want SSL on all actions except for 2. Rather than having ‘ssl\_required :action1, :actio…

---

## [HELP with self-referential join (using another model as join table)](https://www.ruby-forum.com/t/help-with-self-referential-join-using-another-model-as-join-table/143572)

<div class="topic-metadata">

**Author:** [@Sazima](https://www.ruby-forum.com/u/Sazima)\
**Replies:** 0\
**Last updated:** [July 20, 2008, 6:47pm UTC](https://www.ruby-forum.com/t/help-with-self-referential-join-using-another-model-as-join-table/143572 "2008-07-20T18:47:36Z")

</div>

Hi all, I’m having problems with the following relationship, can anybody help me out here? I’m using Rails 2.1. There is only i vote in the DB (and the 2 users exist): id voter\_id voted\_id type value status…

---

## [Destroy action not being invoked](https://www.ruby-forum.com/t/destroy-action-not-being-invoked/142841)

<div class="topic-metadata">

**Author:** [@jturney](https://www.ruby-forum.com/u/jturney)\
**Replies:** 2\
**Last updated:** [July 20, 2008, 6:39pm UTC](https://www.ruby-forum.com/t/destroy-action-not-being-invoked/142841 "2008-07-20T18:39:24Z")

</div>

This is my index: \<td\>\<%= link\_to 'Remove', user, :class =\> "list-actions", :confirm =\> 'Are you sure?', :method =\> :delete %\>\</td\> And this is my controller: def destroy @user = User.find(params\[:id\]) @user…

---

## [How does request.host get set?](https://www.ruby-forum.com/t/how-does-request-host-get-set/143545)

<div class="topic-metadata">

**Author:** [@Reynard](https://www.ruby-forum.com/u/Reynard)\
**Replies:** 4\
**Last updated:** [July 20, 2008, 5:57pm UTC](https://www.ruby-forum.com/t/how-does-request-host-get-set/143545 "2008-07-20T17:57:51Z")

</div>

how does request.host get set? Is there a way to manually set the value in request.host? I have several application servers running rails, each has its own internal address in the request.host, so when calling redirec…

---

## [About dynamic select](https://www.ruby-forum.com/t/about-dynamic-select/143564)

<div class="topic-metadata">

**Author:** [@daociyiyou](https://www.ruby-forum.com/u/daociyiyou)\
**Replies:** 2\
**Last updated:** [July 20, 2008, 5:30pm UTC](https://www.ruby-forum.com/t/about-dynamic-select/143564 "2008-07-20T17:30:07Z")

</div>

I want to design a dynamic select container.That is :when a user selects a province,there is a city select container dropping out.Then when a user select a city,there is a city section container dropping out.I use the …

---

## [Backward associations](https://www.ruby-forum.com/t/backward-associations/143569)

<div class="topic-metadata">

**Author:** [@crossblaim](https://www.ruby-forum.com/u/crossblaim)\
**Replies:** 4\
**Last updated:** [July 20, 2008, 5:21pm UTC](https://www.ruby-forum.com/t/backward-associations/143569 "2008-07-20T17:21:32Z")

</div>

hi everyone, my situation is describes as: User has\_many Blog Blog has\_many BlogPost BlogPost belongs\_to Blog Blog belongs\_to User now, to “bridge” User with Post I wrote in User model: has\_many :blog\_posts, :thro…

---

## [Object singleton problem](https://www.ruby-forum.com/t/object-singleton-problem/143356)

<div class="topic-metadata">

**Author:** [@jeanluca](https://www.ruby-forum.com/u/jeanluca)\
**Replies:** 7\
**Last updated:** [July 20, 2008, 3:52pm UTC](https://www.ruby-forum.com/t/object-singleton-problem/143356 "2008-07-20T15:52:12Z")

</div>

Hi All I’m trying to add an instance variable and a method to a object The CODE: #! /usr/bin/ruby class Xyz def initialize p “initializing” end end my\_inst = Xyz.new class \<\<my\_inst @new\_var = “Hello world” d…

---

## [How to alias the columns names to change the name on error\_messages\_for?](https://www.ruby-forum.com/t/how-to-alias-the-columns-names-to-change-the-name-on-error-messages-for/143506)

<div class="topic-metadata">

**Author:** [@lz-coelho](https://www.ruby-forum.com/u/lz-coelho)\
**Replies:** 5\
**Last updated:** [July 20, 2008, 2:49pm UTC](https://www.ruby-forum.com/t/how-to-alias-the-columns-names-to-change-the-name-on-error-messages-for/143506 "2008-07-20T14:49:38Z")

</div>

Yeah, How can i alias the columns names to show another string name in error\_messages\_for? class CreateUsers \< ActiveRecord::Migration def self.up create\_table :users do |t| t.column :pizza, :string I want to show…

---

## [Filtering results through URL (e.g. new?forum\_id=3)](https://www.ruby-forum.com/t/filtering-results-through-url-e-g-new-forum-id-3/143541)

<div class="topic-metadata">

**Author:** [@adistarmid](https://www.ruby-forum.com/u/adistarmid)\
**Replies:** 2\
**Last updated:** [July 20, 2008, 12:43pm UTC](https://www.ruby-forum.com/t/filtering-results-through-url-e-g-new-forum-id-3/143541 "2008-07-20T12:43:54Z")

</div>

Is there a special code you have to place in the routes so filtering results through the URL works? For example, Ruby Forum does it with: http://www.ruby-forum.com/topic/new?forum\_id=3 http://www.ruby-forum.com/topic…

---

## [Rails:Using Insert statement in active record?](https://www.ruby-forum.com/t/rails-using-insert-statement-in-active-record/196748)

<div class="topic-metadata">

**Author:** [@anukulsinghal](https://www.ruby-forum.com/u/anukulsinghal)\
**Replies:** 1\
**Last updated:** [July 20, 2008, 12:36pm UTC](https://www.ruby-forum.com/t/rails-using-insert-statement-in-active-record/196748 "2008-07-20T12:36:48Z")

</div>

Hi, I know this would be a simple solution to provide for any one of you. I am new to active record and this is what I have currently done: require ‘rubygems’ require ‘active\_record’ puts “connecting to db…” Active…

---

## [File path of uploaded file](https://www.ruby-forum.com/t/file-path-of-uploaded-file/143520)

<div class="topic-metadata">

**Author:** [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Replies:** 1\
**Last updated:** [July 20, 2008, 12:34pm UTC](https://www.ruby-forum.com/t/file-path-of-uploaded-file/143520 "2008-07-20T12:34:28Z")

</div>

Where is the file after a file has been uploaded? Is it stored in /tmp or in rails\_app/tmp or? I need to get the file path after it has been submitted.

---

## [About generated id](https://www.ruby-forum.com/t/about-generated-id/143546)

<div class="topic-metadata">

**Author:** [@daociyiyou](https://www.ruby-forum.com/u/daociyiyou)\
**Replies:** 1\
**Last updated:** [July 20, 2008, 12:30pm UTC](https://www.ruby-forum.com/t/about-generated-id/143546 "2008-07-20T12:30:22Z")

</div>

hello: 1 what is html element’s id generated from the \<%=select “user”,“section”,User::SHIJIAZHUANG-%\>, it is:user\_section ? 2 can i user an instance variable come from an action for select choice param? for exampl…

---

## [Eager loading a named\_scope](https://www.ruby-forum.com/t/eager-loading-a-named-scope/143548)

<div class="topic-metadata">

**Author:** [@gsterndale](https://www.ruby-forum.com/u/gsterndale)\
**Replies:** 0\
**Last updated:** [July 20, 2008, 10:48am UTC](https://www.ruby-forum.com/t/eager-loading-a-named-scope/143548 "2008-07-20T10:48:33Z")

</div>

Hi, I’d like to eager load a named\_scope like this: User.find(params\[:id\], :include =\> \[:friends.married\]) Any ideas?

---

## [Ruby Developer needed in Dallas, Tx](https://www.ruby-forum.com/t/ruby-developer-needed-in-dallas-tx/143343)

<div class="topic-metadata">

**Author:** [@jen](https://www.ruby-forum.com/u/jen)\
**Replies:** 2\
**Last updated:** [July 20, 2008, 7:25am UTC](https://www.ruby-forum.com/t/ruby-developer-needed-in-dallas-tx/143343 "2008-07-20T07:25:42Z")

</div>

If you or someone you know is looking for a position in the Dallas area, please let me know. Thanks and I look forward to speaking with you. :slight\_smile: Thanks, Jennifer Toal Radiant Recruiting removed\_email\_add…

---

## [Looking up accessor methods for ActiveRecord objects](https://www.ruby-forum.com/t/looking-up-accessor-methods-for-activerecord-objects/143531)

<div class="topic-metadata">

**Author:** [@seatown](https://www.ruby-forum.com/u/seatown)\
**Replies:** 3\
**Last updated:** [July 20, 2008, 3:43am UTC](https://www.ruby-forum.com/t/looking-up-accessor-methods-for-activerecord-objects/143531 "2008-07-20T03:43:35Z")

</div>

Hi, I am trying to invoke a method on an ActiveRecord object using something like: k = :date= obj.method(k).call(new\_date) Initially obj.method(k) is throwing a NameError. However, if I first explicitly invoke any …

---

## [Anyone got a discount coupon for GoDaddy SSL WIldcart?](https://www.ruby-forum.com/t/anyone-got-a-discount-coupon-for-godaddy-ssl-wildcart/143532)

<div class="topic-metadata">

**Author:** [@melvinram](https://www.ruby-forum.com/u/melvinram)\
**Replies:** 2\
**Last updated:** [July 20, 2008, 3:39am UTC](https://www.ruby-forum.com/t/anyone-got-a-discount-coupon-for-godaddy-ssl-wildcart/143532 "2008-07-20T03:39:29Z")

</div>

I am looking to get a wildcard SSL cert from GoDaddy but I can’t find any coupons for it. Anyone have one? I’m bootstrapping this venture so I’m trying to save every bit I can.

---

## [GoDaddy deployment](https://www.ruby-forum.com/t/godaddy-deployment/142337)

<div class="topic-metadata">

**Author:** [@icewoman](https://www.ruby-forum.com/u/icewoman)\
**Replies:** 11\
**Last updated:** [July 20, 2008, 2:13am UTC](https://www.ruby-forum.com/t/godaddy-deployment/142337 "2008-07-20T02:13:31Z")

</div>

I’m stuck with my deployment on a Premium GoDaddy Web Hosting account. I have read every hint I can find in this group and through Googling. That’s gotten me to the point that I can see the index.html page in the pu…

---

## [Routes](https://www.ruby-forum.com/t/routes/143525)

<div class="topic-metadata">

**Author:** [@papacostas](https://www.ruby-forum.com/u/papacostas)\
**Replies:** 1\
**Last updated:** [July 20, 2008, 1:37am UTC](https://www.ruby-forum.com/t/routes/143525 "2008-07-20T01:37:51Z")

</div>

Hi there, I’m having an issue with routes I frankly dont get. I have a controller named map which takes in a hash string and converts that to an actual url, works great so localhost:3000/f3gg or whatever works fine n…

---

## [Routing error](https://www.ruby-forum.com/t/routing-error/143482)

<div class="topic-metadata">

**Author:** [@joel](https://www.ruby-forum.com/u/joel)\
**Replies:** 1\
**Last updated:** [July 20, 2008, 1:35am UTC](https://www.ruby-forum.com/t/routing-error/143482 "2008-07-20T01:35:31Z")

</div>

Hello All, I’m trying to implement a new method action in my controoller to which I ll make an ajax call. So my routes go like this : map.resources :photos, :collection =\> { :increment\_downloads =\> :post } but on …

---

## [File upload and doc type](https://www.ruby-forum.com/t/file-upload-and-doc-type/143451)

<div class="topic-metadata">

**Author:** [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Replies:** 13\
**Last updated:** [July 20, 2008, 12:21am UTC](https://www.ruby-forum.com/t/file-upload-and-doc-type/143451 "2008-07-20T00:21:51Z")

</div>

I’ve made a file upload for word-files. It works fine. I also have a send\_file for getting it from the server. But there must be something wrong with the file upload. When downloading it I can’t open the file. The sam…

---

## [Checking Required Request Parameters](https://www.ruby-forum.com/t/checking-required-request-parameters/143527)

<div class="topic-metadata">

**Author:** [@dutone](https://www.ruby-forum.com/u/dutone)\
**Replies:** 0\
**Last updated:** [July 20, 2008, 12:08am UTC](https://www.ruby-forum.com/t/checking-required-request-parameters/143527 "2008-07-20T00:08:55Z")

</div>

Input validation in Rails is done via ActiveRecord objects. Most of the time, these input values are passed directly from the params hash: @bank = Bank.create(params\[:bank\]) if @bank.valid? #do some stuff end #oth…

---

## [Help debugging lost session (rails + facebook)](https://www.ruby-forum.com/t/help-debugging-lost-session-rails-facebook/143526)

<div class="topic-metadata">

**Author:** [@djconcepcion](https://www.ruby-forum.com/u/djconcepcion)\
**Replies:** 0\
**Last updated:** [July 19, 2008, 11:45pm UTC](https://www.ruby-forum.com/t/help-debugging-lost-session-rails-facebook/143526 "2008-07-19T23:45:52Z")

</div>

I have an app that is simultaneously using restful\_authentication and rfacebook (0.9.8). (I can’t use facebooker because it is completely incompatible with many other modules). restful\_authentication works just fine …

---

## [Polymorphic associations and forms](https://www.ruby-forum.com/t/polymorphic-associations-and-forms/143519)

<div class="topic-metadata">

**Author:** [@spike666](https://www.ruby-forum.com/u/spike666)\
**Replies:** 0\
**Last updated:** [July 19, 2008, 10:49pm UTC](https://www.ruby-forum.com/t/polymorphic-associations-and-forms/143519 "2008-07-19T22:49:43Z")

</div>

Hi, I’ve got an issue where I’m creating a form in my view where the user can add a Sponsorship to an Event (m2m relationship using has\_many :through). A Sponsorship belongs to an event and also belongs to a sponsor.…

---

## [Best way to code a bunch of unit tests?](https://www.ruby-forum.com/t/best-way-to-code-a-bunch-of-unit-tests/142653)

<div class="topic-metadata">

**Author:** [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Replies:** 6\
**Last updated:** [July 19, 2008, 10:40pm UTC](https://www.ruby-forum.com/t/best-way-to-code-a-bunch-of-unit-tests/142653 "2008-07-19T22:40:31Z")

</div>

Hi All, I’ve got a single unit test working on a two-variable Portfolio model. The model has transformations, pattern-matching etc. to clean up user sloppiness and ensure data quality. To make sure the transformatio…

---

## [Gem Error](https://www.ruby-forum.com/t/gem-error/143504)

<div class="topic-metadata">

**Author:** [@paradise](https://www.ruby-forum.com/u/paradise)\
**Replies:** 2\
**Last updated:** [July 19, 2008, 10:35pm UTC](https://www.ruby-forum.com/t/gem-error/143504 "2008-07-19T22:35:14Z")

</div>

I have been struggling with this problem for a couple days now and any help is greatly appreciated. I get an error when I try and update my gems and now my existing plugins aren’t even working. I am running windows …

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

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