# Rails

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

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

---

## [Avoiding reflection errors in migrations](https://www.ruby-forum.com/t/avoiding-reflection-errors-in-migrations/108481)

<div class="topic-metadata">

**Author:** [@andrew\_chase](https://www.ruby-forum.com/u/andrew_chase)\
**Replies:** 3\
**Last updated:** [July 4, 2007, 4:22pm UTC](https://www.ruby-forum.com/t/avoiding-reflection-errors-in-migrations/108481 "2007-07-04T16:22:17Z")

</div>

I’ve hit an issue a couple times now with migrations that I’ve solved by hacking around, but now I’m interested in finding a more robust solution. The problem comes when a migration contains some logic that requires …

---

## [How to get selection from multiple select list?](https://www.ruby-forum.com/t/how-to-get-selection-from-multiple-select-list/108494)

<div class="topic-metadata">

**Author:** [@wpollans](https://www.ruby-forum.com/u/wpollans)\
**Replies:** 2\
**Last updated:** [July 4, 2007, 4:16pm UTC](https://www.ruby-forum.com/t/how-to-get-selection-from-multiple-select-list/108494 "2007-07-04T16:16:16Z")

</div>

I have a multiple select list ( with multiple=‘multiple’) in one of my view templates. I can select several items from the list - items with values: 3,4,5. I can see, using Tamper Data in Firefox, that the selection i…

---

## [Filtering a database table](https://www.ruby-forum.com/t/filtering-a-database-table/108545)

<div class="topic-metadata">

**Author:** [@sandman](https://www.ruby-forum.com/u/sandman)\
**Replies:** 0\
**Last updated:** [July 4, 2007, 4:00pm UTC](https://www.ruby-forum.com/t/filtering-a-database-table/108545 "2007-07-04T16:00:17Z")

</div>

Hello everyone, I’ve created a web form using form\_for helper. Based on the values entered, I want to display only the relevant entries in the table. Can someone tell me how to do it???

---

## [Multiple date\_select](https://www.ruby-forum.com/t/multiple-date-select/108540)

<div class="topic-metadata">

**Author:** [@athi](https://www.ruby-forum.com/u/athi)\
**Replies:** 0\
**Last updated:** [July 4, 2007, 3:15pm UTC](https://www.ruby-forum.com/t/multiple-date-select/108540 "2007-07-04T15:15:40Z")

</div>

Hi, I tried to create 2 date fields with date\_select in ruby. But the names assigned to the two date fields are the same(date\[year\], date\[month\] and date\[day\] for both) when I view the page source. Is there any way t…

---

## [Stupid Rails rendering](https://www.ruby-forum.com/t/stupid-rails-rendering/108324)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 3\
**Last updated:** [July 4, 2007, 2:18pm UTC](https://www.ruby-forum.com/t/stupid-rails-rendering/108324 "2007-07-04T14:18:33Z")

</div>

I dont’ understand why it’s not possible to have a conditional redirection in rendering respond\_to do |format| format.js { render :update do |page| page.redirect\_to posts\_url if @located page.replace\_html…

---

## [Params, before\_filter and functional test](https://www.ruby-forum.com/t/params-before-filter-and-functional-test/108525)

<div class="topic-metadata">

**Author:** [@tachekent](https://www.ruby-forum.com/u/tachekent)\
**Replies:** 0\
**Last updated:** [July 4, 2007, 12:14pm UTC](https://www.ruby-forum.com/t/params-before-filter-and-functional-test/108525 "2007-07-04T12:14:46Z")

</div>

hi there, I have a before\_filter which does some date formatting on create and update. This works fine live but it’s failing in the tests: http://pastie.caboo.se/75968 I’m not really sure why that would be the case. …

---

## [Method method does not find attributes](https://www.ruby-forum.com/t/method-method-does-not-find-attributes/108520)

<div class="topic-metadata">

**Author:** [@tmendo](https://www.ruby-forum.com/u/tmendo)\
**Replies:** 0\
**Last updated:** [July 4, 2007, 11:52am UTC](https://www.ruby-forum.com/t/method-method-does-not-find-attributes/108520 "2007-07-04T11:52:35Z")

</div>

Hi, I have something like this in an partial template: \<% @fields.each { |field| %\> \<% m = host.method(field) %\> \<%= m.call %\> \<% } %\> This does not work because host.methods does not have the attribute accessors …

---

## [About mulitple selectable languages](https://www.ruby-forum.com/t/about-mulitple-selectable-languages/108513)

<div class="topic-metadata">

**Author:** [@emuen](https://www.ruby-forum.com/u/emuen)\
**Replies:** 1\
**Last updated:** [July 4, 2007, 11:27am UTC](https://www.ruby-forum.com/t/about-mulitple-selectable-languages/108513 "2007-07-04T11:27:10Z")

</div>

Hi guys. I failed to find my desired information on google, so im writing you in hopes, that on or more of you know how to implement multiple languages in a smart and easy way. Lets say, that the user i spanish, and h…

---

## [How to create our own class and how to access that](https://www.ruby-forum.com/t/how-to-create-our-own-class-and-how-to-access-that/108516)

<div class="topic-metadata">

**Author:** [@unnikrishnanes](https://www.ruby-forum.com/u/unnikrishnanes)\
**Replies:** 2\
**Last updated:** [July 4, 2007, 11:18am UTC](https://www.ruby-forum.com/t/how-to-create-our-own-class-and-how-to-access-that/108516 "2007-07-04T11:18:47Z")

</div>

Hi Could any one tell me about how to create our own class , where to put it and how to access that class in controller Thanks in advance Unnikrishnan

---

## [How to display an image in my view from a BLOB column?](https://www.ruby-forum.com/t/how-to-display-an-image-in-my-view-from-a-blob-column/108519)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 0\
**Last updated:** [July 4, 2007, 11:16am UTC](https://www.ruby-forum.com/t/how-to-display-an-image-in-my-view-from-a-blob-column/108519 "2007-07-04T11:16:23Z")

</div>

I have a model ‘Picture’ with a blob column ‘small’ and a string column ‘extension’ in my PictureController , I want to show it in the show view my show action is quite simple def show @user = User.find(params\[:us…

---

## [\[PATCH\] Need help to write a test](https://www.ruby-forum.com/t/patch-need-help-to-write-a-test/108465)

<div class="topic-metadata">

**Author:** [@kayros](https://www.ruby-forum.com/u/kayros)\
**Replies:** 2\
**Last updated:** [July 4, 2007, 10:19am UTC](https://www.ruby-forum.com/t/patch-need-help-to-write-a-test/108465 "2007-07-04T10:19:31Z")

</div>

I’m trying to write a test for a modification I’ve done on link\_to helper. The problem is that my patch is relying on url\_for behaviour defined in link\_to helper. In url\_helper\_test.rb test file url\_for is overwrited …

---

## [ActionMailer issue](https://www.ruby-forum.com/t/actionmailer-issue/108429)

<div class="topic-metadata">

**Author:** [@Sase](https://www.ruby-forum.com/u/Sase)\
**Replies:** 13\
**Last updated:** [July 4, 2007, 10:13am UTC](https://www.ruby-forum.com/t/actionmailer-issue/108429 "2007-07-04T10:13:38Z")

</div>

Hi. :slight\_smile: I’m working on sending mails issue and I have one question: How can it be possible for my application to be sending emails, without configuring mail server specific parameters (domain name, username…

---

## [Encrypt/ Decrypt password](https://www.ruby-forum.com/t/encrypt-decrypt-password/53029)

<div class="topic-metadata">

**Author:** [@sainaba](https://www.ruby-forum.com/u/sainaba)\
**Replies:** 3\
**Last updated:** [July 4, 2007, 9:30am UTC](https://www.ruby-forum.com/t/encrypt-decrypt-password/53029 "2007-07-04T09:30:58Z")

</div>

Hi, I have user add/edit forms.While creating a user I tried the following method to encrypt password and stored the encrypted password in the table. def self.sha1(pass) Digest::SHA1.hexdigest("#{salt}–#{pass}–") e…

---

## [Accessing items when using Enumerable](https://www.ruby-forum.com/t/accessing-items-when-using-enumerable/108493)

<div class="topic-metadata">

**Author:** [@iceninejon](https://www.ruby-forum.com/u/iceninejon)\
**Replies:** 3\
**Last updated:** [July 4, 2007, 9:23am UTC](https://www.ruby-forum.com/t/accessing-items-when-using-enumerable/108493 "2007-07-04T09:23:27Z")

</div>

I’m a RoR newbie and am trying to use the paginating\_find plug-in (Welcome cardboardrocket.com - BlueHost.com) for pagination. Everything works fine but after my .find() call, I want to add additional data to my objec…

---

## [MacBook vs.?](https://www.ruby-forum.com/t/macbook-vs/108402)

<div class="topic-metadata">

**Author:** [@DyingToLearn](https://www.ruby-forum.com/u/DyingToLearn)\
**Replies:** 7\
**Last updated:** [July 4, 2007, 8:50am UTC](https://www.ruby-forum.com/t/macbook-vs/108402 "2007-07-04T08:50:24Z")

</div>

Hi, I need some help on a new laptop purchase! I have an old toshiba laptop that is currency running Ubuntu 7.04. The machine is definitely on it’s last legs; I expect it to die any time within the next 3 months, pro…

---

## [FCGI processes versus Mongrel servers](https://www.ruby-forum.com/t/fcgi-processes-versus-mongrel-servers/108404)

<div class="topic-metadata">

**Author:** [@Hasham](https://www.ruby-forum.com/u/Hasham)\
**Replies:** 1\
**Last updated:** [July 4, 2007, 8:35am UTC](https://www.ruby-forum.com/t/fcgi-processes-versus-mongrel-servers/108404 "2007-07-04T08:35:21Z")

</div>

I can bet that running 10 FCGI processes is much lighter on resources than running 10 instances of mongrels. what do you think? then why is running mongrels is more preferable these days? Is there any work going on to…

---

## ["form\_for" names fields using brackets = javascript problems](https://www.ruby-forum.com/t/form-for-names-fields-using-brackets-javascript-problems/108476)

<div class="topic-metadata">

**Author:** [@Andreas\_Hallberg](https://www.ruby-forum.com/u/Andreas_Hallberg)\
**Replies:** 2\
**Last updated:** [July 4, 2007, 7:58am UTC](https://www.ruby-forum.com/t/form-for-names-fields-using-brackets-javascript-problems/108476 "2007-07-04T07:58:32Z")

</div>

Hi all, The “form\_for” helper and its friends “text\_field\_for” etc generate form fields with names like "forum\[title\]â€, i.e. using square brackets to denote attributes on model objects. Now, for the convenience of …

---

## [Passing nested hash in params, in pagination\_links](https://www.ruby-forum.com/t/passing-nested-hash-in-params-in-pagination-links/108508)

<div class="topic-metadata">

**Author:** [@Abhishek\_Srivastava](https://www.ruby-forum.com/u/Abhishek_Srivastava)\
**Replies:** 0\
**Last updated:** [July 4, 2007, 7:22am UTC](https://www.ruby-forum.com/t/passing-nested-hash-in-params-in-pagination-links/108508 "2007-07-04T07:22:15Z")

</div>

Hi all, I am using autocomplete in a rhtml form which means that i am getting the input as params\[:datatest\]\[:chartmajorid\] in my controller. I am then using this input as the criterion for a find condition and dis…

---

## [Passing nested hash in params, in pagination\_links](https://www.ruby-forum.com/t/passing-nested-hash-in-params-in-pagination-links/108507)

<div class="topic-metadata">

**Author:** [@Abhishek\_Srivastava](https://www.ruby-forum.com/u/Abhishek_Srivastava)\
**Replies:** 0\
**Last updated:** [July 4, 2007, 7:21am UTC](https://www.ruby-forum.com/t/passing-nested-hash-in-params-in-pagination-links/108507 "2007-07-04T07:21:15Z")

</div>

Hi all, I am using autocomplete in a rhtml form which means that i am getting the input as params\[:datatest\]\[:chartmajorid\] in my controller. I am then using this input as the criterion for a find condition and dis…

---

## [Edge Rails required for ActiveResource](https://www.ruby-forum.com/t/edge-rails-required-for-activeresource/108504)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [July 4, 2007, 7:11am UTC](https://www.ruby-forum.com/t/edge-rails-required-for-activeresource/108504 "2007-07-04T07:11:14Z")

</div>

Just wanted to make sure I’m not missing anything here… I’m trying to use ActiveResource and I was trying to avoid using Edge Rails. However, since ActiveResource depends on the edge version of activesupport, I appear…

---

## [Capitalizing words](https://www.ruby-forum.com/t/capitalizing-words/108487)

<div class="topic-metadata">

**Author:** [@raghus](https://www.ruby-forum.com/u/raghus)\
**Replies:** 4\
**Last updated:** [July 4, 2007, 5:54am UTC](https://www.ruby-forum.com/t/capitalizing-words/108487 "2007-07-04T05:54:09Z")

</div>

I am trying to write a function that converts something like “It’s a dog’s life” to “It’s A Dog’s Life”. I am doing this with string.gsub(/ \\b\\w/) {$&.upcase} but this gives me “It’S A Dog’S Life” - how can I tell the…

---

## [Expected ... to define](https://www.ruby-forum.com/t/expected-to-define/108499)

<div class="topic-metadata">

**Author:** [@terhorst](https://www.ruby-forum.com/u/terhorst)\
**Replies:** 1\
**Last updated:** [July 4, 2007, 5:40am UTC](https://www.ruby-forum.com/t/expected-to-define/108499 "2007-07-04T05:40:08Z")

</div>

I found several topics that covered a similar error with controllers, but mine is with a model, and none of the fixes previously mentioned seemed to apply. Here is the error: Expected ./app/models/lab\_result.rb to de…

---

## [How to handle plugin dependency](https://www.ruby-forum.com/t/how-to-handle-plugin-dependency/108497)

<div class="topic-metadata">

**Author:** [@Serengeti](https://www.ruby-forum.com/u/Serengeti)\
**Replies:** 0\
**Last updated:** [July 4, 2007, 4:46am UTC](https://www.ruby-forum.com/t/how-to-handle-plugin-dependency/108497 "2007-07-04T04:46:04Z")

</div>

I am trying to use the permalink\_fu plugin together with the acts\_as\_taggable plugin so my tags will have both a full name (like COM/OLE) and a permalink suitable for use in a url (like com-ole) so I can have urls lik…

---

## [How can I create a 2nd/separate cookie for my app? (i.e. an](https://www.ruby-forum.com/t/how-can-i-create-a-2nd-separate-cookie-for-my-app-i-e-an/108484)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 5\
**Last updated:** [July 4, 2007, 2:40am UTC](https://www.ruby-forum.com/t/how-can-i-create-a-2nd-separate-cookie-for-my-app-i-e-an/108484 "2007-07-04T02:40:55Z")

</div>

Hi, How can I create a 2nd/separate cookie for my app (i.e. and not use the session tracking cookie). Is this possible? Currently the timezone id I’m saving via “cookies\[:tz\]” gets stored ok in the application cook…

---

## [Symmetric relationships](https://www.ruby-forum.com/t/symmetric-relationships/106458)

<div class="topic-metadata">

**Author:** [@Chef\_vom\_Dienst](https://www.ruby-forum.com/u/Chef_vom_Dienst)\
**Replies:** 8\
**Last updated:** [July 4, 2007, 2:17am UTC](https://www.ruby-forum.com/t/symmetric-relationships/106458 "2007-07-04T02:17:54Z")

</div>

Hi, I’m building an application where you can have friends like in myspace. Only if two people agree to be friends, a friendship relation should be established. If they agreed, it should be an undirected (aka symmetr…

---

## [Transactions rollback question](https://www.ruby-forum.com/t/transactions-rollback-question/108489)

<div class="topic-metadata">

**Author:** [@juan](https://www.ruby-forum.com/u/juan)\
**Replies:** 1\
**Last updated:** [July 4, 2007, 1:37am UTC](https://www.ruby-forum.com/t/transactions-rollback-question/108489 "2007-07-04T01:37:52Z")

</div>

I have something like this: def import\_from\_csv(csv\_file) Item.transaction do FasterCSV.foreach(csv\_file.path) do |row| item = Item.new(:name =\> row\[0\], :units =\> row\[1\], :price =\> row\[2\]) item.save! end end #tra…

---

## [Full\_filename error testing attachement\_fu plugin](https://www.ruby-forum.com/t/full-filename-error-testing-attachement-fu-plugin/108478)

<div class="topic-metadata">

**Author:** [@tachekent](https://www.ruby-forum.com/u/tachekent)\
**Replies:** 2\
**Last updated:** [July 4, 2007, 1:31am UTC](https://www.ruby-forum.com/t/full-filename-error-testing-attachement-fu-plugin/108478 "2007-07-04T01:31:52Z")

</div>

hi there, I’m testing my install of attachment\_fu on rails 1.2.3 (on a mac with darwin ports) using: rake test:plugins everything is fine apart from 2 tests, but I don’t really understand what’s going wrong with the…

---

## [Rails, partials and AJAX.. what am I missing?](https://www.ruby-forum.com/t/rails-partials-and-ajax-what-am-i-missing/108399)

<div class="topic-metadata">

**Author:** [@jeannibee](https://www.ruby-forum.com/u/jeannibee)\
**Replies:** 6\
**Last updated:** [July 4, 2007, 1:26am UTC](https://www.ruby-forum.com/t/rails-partials-and-ajax-what-am-i-missing/108399 "2007-07-04T01:26:07Z")

</div>

Hi I’ve had this problem before, but the previous solution isn’t working so I believe I’m just missing something in the ‘chain’ mentioned in the subject. Nutshell summary: I’m removing items from a cart and I have an…

---

## [Sharing session variables between apps](https://www.ruby-forum.com/t/sharing-session-variables-between-apps/108485)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [July 3, 2007, 11:58pm UTC](https://www.ruby-forum.com/t/sharing-session-variables-between-apps/108485 "2007-07-03T23:58:45Z")

</div>

Hey everyone, I have two Rails applications on a production server. I’d like to share session variables between them (mostly for authentication purposes). Since both apps are using the database for sessions, I’m thin…

---

## [(Potentially OT) Any experience with Amazon SellerCentral?](https://www.ruby-forum.com/t/potentially-ot-any-experience-with-amazon-sellercentral/108483)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 0\
**Last updated:** [July 3, 2007, 11:51pm UTC](https://www.ruby-forum.com/t/potentially-ot-any-experience-with-amazon-sellercentral/108483 "2007-07-03T23:51:03Z")

</div>

All, Anyone have any experience integrating with Amazon SellerCentral which allows a vendor of products to sell items via the Amazon Web site? Specifically I’m looking for information on which XML data is transferred…

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

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