# Rails

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

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

---

## [Submit a patch?](https://www.ruby-forum.com/t/submit-a-patch/161937)

<div class="topic-metadata">

**Author:** [@sprsquish](https://www.ruby-forum.com/u/sprsquish)\
**Replies:** 10\
**Last updated:** [March 5, 2009, 10:42pm UTC](https://www.ruby-forum.com/t/submit-a-patch/161937 "2009-03-05T22:42:09Z")

</div>

Short version: How do I submit a patch? Long version: I hit an error with Rails 2.3 on Ruby 1.9.1, debugged it, and fixed it locally. Now, I’d like to open a bug report and submit a patch, but I’m having a hard tim…

---

## [Service Merchant](https://www.ruby-forum.com/t/service-merchant/161933)

<div class="topic-metadata">

**Author:** [@George](https://www.ruby-forum.com/u/George)\
**Replies:** 2\
**Last updated:** [March 5, 2009, 10:10pm UTC](https://www.ruby-forum.com/t/service-merchant/161933 "2009-03-05T22:10:50Z")

</div>

I’m about to dive into a revamp of the payment processing engine for a my company’s software application service. I came across a tool called Service Merchant (http://servicemerchant.org), and it looks like it could b…

---

## [Validate callback balks when using AR.find method](https://www.ruby-forum.com/t/validate-callback-balks-when-using-ar-find-method/162111)

<div class="topic-metadata">

**Author:** [@S-gw](https://www.ruby-forum.com/u/S-gw)\
**Replies:** 2\
**Last updated:** [March 5, 2009, 9:51pm UTC](https://www.ruby-forum.com/t/validate-callback-balks-when-using-ar-find-method/162111 "2009-03-05T21:51:43Z")

</div>

In an AR model (PrivilegedUser), I have several custom validations, so am using validate method to call a sequence of other small methods which perform specific tasks. def validate do\_this do\_that end In do\_this, …

---

## [ROR - Random \[BUG\] Segmentation faults](https://www.ruby-forum.com/t/ror-random-bug-segmentation-faults/162108)

<div class="topic-metadata">

**Author:** [@Beatty](https://www.ruby-forum.com/u/Beatty)\
**Replies:** 0\
**Last updated:** [March 5, 2009, 8:09pm UTC](https://www.ruby-forum.com/t/ror-random-bug-segmentation-faults/162108 "2009-03-05T20:09:05Z")

</div>

I’m new to ruby and webdev in general and am having a really hard time getting my first project kickin. I can install and get the initial server page up and running. I’ve updated the gems and installed the mysql on…

---

## [Issue with the object cache](https://www.ruby-forum.com/t/issue-with-the-object-cache/162054)

<div class="topic-metadata">

**Author:** [@luis](https://www.ruby-forum.com/u/luis)\
**Replies:** 7\
**Last updated:** [March 5, 2009, 7:50pm UTC](https://www.ruby-forum.com/t/issue-with-the-object-cache/162054 "2009-03-05T19:50:52Z")

</div>

Hi, I am getting a method\_missing error when I run my application in the production environment unless I set config.cache\_classes = false in config/environments/production.rb. This happens in Rails 2.2.2 but not in R…

---

## [Create migration from existing database](https://www.ruby-forum.com/t/create-migration-from-existing-database/162105)

<div class="topic-metadata">

**Author:** [@will](https://www.ruby-forum.com/u/will)\
**Replies:** 0\
**Last updated:** [March 5, 2009, 7:18pm UTC](https://www.ruby-forum.com/t/create-migration-from-existing-database/162105 "2009-03-05T19:18:34Z")

</div>

I’m looking to see if anyone knows of a tool that can be used in ruby to autogenerate a rails migration from an existing database that comes from a non ruby project. I know I can do this with rake db:backup with a ra…

---

## [Occassional NoMethodError after creating new model object](https://www.ruby-forum.com/t/occassional-nomethoderror-after-creating-new-model-object/162102)

<div class="topic-metadata">

**Author:** [@amirj26](https://www.ruby-forum.com/u/amirj26)\
**Replies:** 0\
**Last updated:** [March 5, 2009, 6:50pm UTC](https://www.ruby-forum.com/t/occassional-nomethoderror-after-creating-new-model-object/162102 "2009-03-05T18:50:49Z")

</div>

This seems to happen every so often, where I have code similar to the following: new\_model\_obj = Foo.new new\_model\_obj.someParam = someVar And I get the following error: undefined method \`someParam=’ for # This co…

---

## ["test" terminology](https://www.ruby-forum.com/t/test-terminology/162030)

<div class="topic-metadata">

**Author:** [@sprsquish](https://www.ruby-forum.com/u/sprsquish)\
**Replies:** 2\
**Last updated:** [March 5, 2009, 6:46pm UTC](https://www.ruby-forum.com/t/test-terminology/162030 "2009-03-05T18:46:41Z")

</div>

I’ve just learned that “unit” and “functional” tests, in the context of Rails application development, really mean “model” and “controller” tests, respectively. \[1\] What terms should I use for actual unit tests? Is i…

---

## [Global Hash vs. DB-Model (...social-networking-site with profile -\> eyecolour e.g.) - best practise](https://www.ruby-forum.com/t/global-hash-vs-db-model-social-networking-site-with-profile-eyecolour-e-g-best-practise/162077)

<div class="topic-metadata">

**Author:** [@LpLpLp](https://www.ruby-forum.com/u/LpLpLp)\
**Replies:** 1\
**Last updated:** [March 5, 2009, 6:32pm UTC](https://www.ruby-forum.com/t/global-hash-vs-db-model-social-networking-site-with-profile-eyecolour-e-g-best-practise/162077 "2009-03-05T18:32:01Z")

</div>

Hello, can somebody tell me what to do with static-models? Should I put them into the DB or should I create it als normal Hash? For example: User has one eyecolour and he is able to choose the right value in a view …

---

## [How to pass additional get parameters using button\_to?](https://www.ruby-forum.com/t/how-to-pass-additional-get-parameters-using-button-to/162099)

<div class="topic-metadata">

**Author:** [@Dennis\_T](https://www.ruby-forum.com/u/Dennis_T)\
**Replies:** 0\
**Last updated:** [March 5, 2009, 6:32pm UTC](https://www.ruby-forum.com/t/how-to-pass-additional-get-parameters-using-button-to/162099 "2009-03-05T18:32:00Z")

</div>

A google search only turned up a few posts with the same problem, but no answer… Problem: \<%= button\_to(“New user”, new\_user\_path(:testvar1 =\> “test1”, :testvar2 =\> “test2”), :method =\> :get) %\> generates: Which d…

---

## [Help me understand what to\_param does on a hash](https://www.ruby-forum.com/t/help-me-understand-what-to-param-does-on-a-hash/162092)

<div class="topic-metadata">

**Author:** [@ehudros](https://www.ruby-forum.com/u/ehudros)\
**Replies:** 1\
**Last updated:** [March 5, 2009, 6:24pm UTC](https://www.ruby-forum.com/t/help-me-understand-what-to-param-does-on-a-hash/162092 "2009-03-05T18:24:21Z")

</div>

Hi all, I’m trying to track down the source of the to\_param method for hashes. let’s say I have a hash like this: {:b=\>“This is a description”, :a=\>“1”} what I currently get from to\_param is “a=1&b=This+is+a+descript…

---

## [Canceled/abandoned request to Mongrel/Ruby](https://www.ruby-forum.com/t/canceled-abandoned-request-to-mongrel-ruby/162098)

<div class="topic-metadata">

**Author:** [@michael\_teter](https://www.ruby-forum.com/u/michael_teter)\
**Replies:** 0\
**Last updated:** [March 5, 2009, 6:19pm UTC](https://www.ruby-forum.com/t/canceled-abandoned-request-to-mongrel-ruby/162098 "2009-03-05T18:19:39Z")

</div>

Howdy. I’m wondering what happens in Mongrel/Ruby when a user asks for a page but then hits Stop in the browser or just clicks a different link before the response comes back. The reason I ask is that the app I’m bui…

---

## [Customizing the run time error page](https://www.ruby-forum.com/t/customizing-the-run-time-error-page/162026)

<div class="topic-metadata">

**Author:** [@ramya](https://www.ruby-forum.com/u/ramya)\
**Replies:** 2\
**Last updated:** [March 5, 2009, 5:35pm UTC](https://www.ruby-forum.com/t/customizing-the-run-time-error-page/162026 "2009-03-05T17:35:35Z")

</div>

hi there I am trying to include a link in the run time error page any ideas would be appreciated. Is there a way that i can access the runtime error page template at least the code that generates it. Regards Ramya

---

## [About before\_\* callbacks](https://www.ruby-forum.com/t/about-before-callbacks/162038)

<div class="topic-metadata">

**Author:** [@cfc](https://www.ruby-forum.com/u/cfc)\
**Replies:** 6\
**Last updated:** [March 5, 2009, 5:32pm UTC](https://www.ruby-forum.com/t/about-before-callbacks/162038 "2009-03-05T17:32:39Z")

</div>

Hi I have an problem about before\_\* callbacks. I have a model named: Event And I don’t want anyone to destroy or update any records in Event model. So: class ActiveRecord::Base before\_destroy :log\_illegal\_operati…

---

## [Dynamic Config Plugin for Rails - recommendations? (e.g. storing in database)](https://www.ruby-forum.com/t/dynamic-config-plugin-for-rails-recommendations-e-g-storing-in-database/162044)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 2\
**Last updated:** [March 5, 2009, 5:28pm UTC](https://www.ruby-forum.com/t/dynamic-config-plugin-for-rails-recommendations-e-g-storing-in-database/162044 "2009-03-05T17:28:32Z")

</div>

Wondering if there is an existing plugin/approach for config data that you want your application to be able to change? In other words a value/pair type configuration plugin that persists to the database. Just a norm…

---

## [Attachment\_fu](https://www.ruby-forum.com/t/attachment-fu/162088)

<div class="topic-metadata">

**Author:** [@chimorito](https://www.ruby-forum.com/u/chimorito)\
**Replies:** 2\
**Last updated:** [March 5, 2009, 5:23pm UTC](https://www.ruby-forum.com/t/attachment-fu/162088 "2009-03-05T17:23:17Z")

</div>

First at all sorry if my english is not the best I have a problem with this plugin. It has been installed because we need to upload images in our web. We need 3 kinds of images with different sizes. this is our code: …

---

## [Render, partial, and cancel button issues](https://www.ruby-forum.com/t/render-partial-and-cancel-button-issues/162089)

<div class="topic-metadata">

**Author:** [@bskaggs](https://www.ruby-forum.com/u/bskaggs)\
**Replies:** 0\
**Last updated:** [March 5, 2009, 5:17pm UTC](https://www.ruby-forum.com/t/render-partial-and-cancel-button-issues/162089 "2009-03-05T17:17:34Z")

</div>

I am using a form\_remote\_tag to create a new object in my web page. When the save is successful, then it displays the list and added current object in a partial. I have two questions: When the save fails, i want it…

---

## [Model has\_many 3 degrees separation](https://www.ruby-forum.com/t/model-has-many-3-degrees-separation/162048)

<div class="topic-metadata">

**Author:** [@Chad](https://www.ruby-forum.com/u/Chad)\
**Replies:** 7\
**Last updated:** [March 5, 2009, 4:34pm UTC](https://www.ruby-forum.com/t/model-has-many-3-degrees-separation/162048 "2009-03-05T16:34:52Z")

</div>

I feel like this should be simple but it’s stumping me. In the following model, is there an easy way to setup my models so that I can make the following call: @company.survey\_answers class Company \< ActiveRecord::Base …

---

## [How to navigate to an external URL from a controller](https://www.ruby-forum.com/t/how-to-navigate-to-an-external-url-from-a-controller/161992)

<div class="topic-metadata">

**Author:** [@cpyong27](https://www.ruby-forum.com/u/cpyong27)\
**Replies:** 5\
**Last updated:** [March 5, 2009, 4:33pm UTC](https://www.ruby-forum.com/t/how-to-navigate-to-an-external-url-from-a-controller/161992 "2009-03-05T16:33:06Z")

</div>

I’m using restful\_authentication plugin for my webapp. After everything is setup properly, the user signup, login and logout can work without any problem. Now, I don’t know how an external URL, such as http://www.my-…

---

## [Validate\_presence\_of problem](https://www.ruby-forum.com/t/validate-presence-of-problem/162081)

<div class="topic-metadata">

**Author:** [@srikanth](https://www.ruby-forum.com/u/srikanth)\
**Replies:** 1\
**Last updated:** [March 5, 2009, 4:07pm UTC](https://www.ruby-forum.com/t/validate-presence-of-problem/162081 "2009-03-05T16:07:17Z")

</div>

Hi In my application i want to validate the fields of perticular views. in my application: controller name: streams\_controller model name: stream and i want to validates a text field in the view “new.html.erb”.here …

---

## [Failing to gem update](https://www.ruby-forum.com/t/failing-to-gem-update/162082)

<div class="topic-metadata">

**Author:** [@pesho318i](https://www.ruby-forum.com/u/pesho318i)\
**Replies:** 0\
**Last updated:** [March 5, 2009, 3:45pm UTC](https://www.ruby-forum.com/t/failing-to-gem-update/162082 "2009-03-05T15:45:17Z")

</div>

Hi, I keep on receiving the following error when I try to gem update: Updating installed gems Updating facebooker Building native extensions. This could take a while… ERROR: While executing gem … (Gem::Installer::E…

---

## [RubyAmf + DataGrid Binding](https://www.ruby-forum.com/t/rubyamf-datagrid-binding/162066)

<div class="topic-metadata">

**Author:** [@enzor](https://www.ruby-forum.com/u/enzor)\
**Replies:** 1\
**Last updated:** [March 5, 2009, 1:07pm UTC](https://www.ruby-forum.com/t/rubyamf-datagrid-binding/162066 "2009-03-05T13:07:33Z")

</div>

Hi there! I’m trying to bind some data from my Rails application inside a Flex Datagrid, and i’m just wondering why this code don’t work! flex Code: \</mx:Script\> \<mx:DataGrid id=“dg” width=“600” height=“400”\> mx…

---

## [Rendering different html for mobile devices](https://www.ruby-forum.com/t/rendering-different-html-for-mobile-devices/162065)

<div class="topic-metadata">

**Author:** [@bingobob](https://www.ruby-forum.com/u/bingobob)\
**Replies:** 1\
**Last updated:** [March 5, 2009, 12:10pm UTC](https://www.ruby-forum.com/t/rendering-different-html-for-mobile-devices/162065 "2009-03-05T12:10:53Z")

</div>

Sorry if this is a bit OT - but I know people here like to help out! Be grateful for any advice. I’d like to render an html page but two versions. One version for mobile devices (iphones and blackberries specifically…

---

## [Retrieving all values of the column from the table](https://www.ruby-forum.com/t/retrieving-all-values-of-the-column-from-the-table/162053)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [March 5, 2009, 11:40am UTC](https://www.ruby-forum.com/t/retrieving-all-values-of-the-column-from-the-table/162053 "2009-03-05T11:40:53Z")

</div>

Hi, I have a function in my model like class Pattern def self.get\_all(field) @patterns = Pattern.find(:all) @patterns.collect do |pp| pp.field end end end so that whatever field i give to the function, it return…

---

## [Link\_to\_remote and open new window passing parameters](https://www.ruby-forum.com/t/link-to-remote-and-open-new-window-passing-parameters/162062)

<div class="topic-metadata">

**Author:** [@kinunt](https://www.ruby-forum.com/u/kinunt)\
**Replies:** 0\
**Last updated:** [March 5, 2009, 11:28am UTC](https://www.ruby-forum.com/t/link-to-remote-and-open-new-window-passing-parameters/162062 "2009-03-05T11:28:25Z")

</div>

Hi, I would like to implement this: I have a view that shows a list of elements. Each element have a checkbox. The user can select some events marking the checkbox and click the link\_to\_remote “Print this elements”. …

---

## [Ajax Request with Select Box](https://www.ruby-forum.com/t/ajax-request-with-select-box/162058)

<div class="topic-metadata">

**Author:** [@Geekyra](https://www.ruby-forum.com/u/Geekyra)\
**Replies:** 1\
**Last updated:** [March 5, 2009, 10:58am UTC](https://www.ruby-forum.com/t/ajax-request-with-select-box/162058 "2009-03-05T10:58:01Z")

</div>

Hi All, sorry for my silly question… How to make an Ajax Request when the item in Select Box change ? So when I change the item in select box I like to partial refresh some of my page with new item choosen in select b…

---

## [Getting xml file display as xml when using render :text](https://www.ruby-forum.com/t/getting-xml-file-display-as-xml-when-using-render-text/162056)

<div class="topic-metadata">

**Author:** [@sudhi](https://www.ruby-forum.com/u/sudhi)\
**Replies:** 0\
**Last updated:** [March 5, 2009, 10:44am UTC](https://www.ruby-forum.com/t/getting-xml-file-display-as-xml-when-using-render-text/162056 "2009-03-05T10:44:49Z")

</div>

Hi, I have a problem when I do a fd = File.open(“test”,“rb”) render :text fd.read I the “test” file contains xml dog cat The output is shown as “dog cat” how do I get the xml shown as is with the animal tag also …

---

## [Error\_messages with form\_tag](https://www.ruby-forum.com/t/error-messages-with-form-tag/162057)

<div class="topic-metadata">

**Author:** [@neetal](https://www.ruby-forum.com/u/neetal)\
**Replies:** 1\
**Last updated:** [March 5, 2009, 10:43am UTC](https://www.ruby-forum.com/t/error-messages-with-form-tag/162057 "2009-03-05T10:43:51Z")

</div>

Hi Am facing a problem in accessing the error\_messages. Actually am using form\_tag is there any way with which i can access error\_messages with form\_tag. I don’t want to use form\_for. Thanks in Advancve

---

## [Need some rails/mysql setup assistance](https://www.ruby-forum.com/t/need-some-rails-mysql-setup-assistance/162055)

<div class="topic-metadata">

**Author:** [@chris](https://www.ruby-forum.com/u/chris)\
**Replies:** 0\
**Last updated:** [March 5, 2009, 10:32am UTC](https://www.ruby-forum.com/t/need-some-rails-mysql-setup-assistance/162055 "2009-03-05T10:32:41Z")

</div>

I had Mysql/ruby/rails running (although slowly) on an old windows xp box. having access to better hardware on local network, i chose to remove mysql locally and am able to connect to server via mysql query browser a…

---

## [ActiveResource & HTTP proxy](https://www.ruby-forum.com/t/activeresource-http-proxy/162052)

<div class="topic-metadata">

**Author:** [@fiddler](https://www.ruby-forum.com/u/fiddler)\
**Replies:** 0\
**Last updated:** [March 5, 2009, 10:19am UTC](https://www.ruby-forum.com/t/activeresource-http-proxy/162052 "2009-03-05T10:19:54Z")

</div>

Hi, Do you know if there is any way to configure HTTP proxy connection in ActiveResource? I’m testing the youtube-model plugin (GitHub - edgarjs/youtube-model: Allows you to generate an ActiveResource model ready to …

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

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