# Rails

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

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

---

## [Having some trouble with loop in a form](https://www.ruby-forum.com/t/having-some-trouble-with-loop-in-a-form/175030)

<div class="topic-metadata">

**Author:** [@maximulus](https://www.ruby-forum.com/u/maximulus)\
**Replies:** 14\
**Last updated:** [September 7, 2009, 9:51am UTC](https://www.ruby-forum.com/t/having-some-trouble-with-loop-in-a-form/175030 "2009-09-07T09:51:46Z")

</div>

Hello, I’m clearly missing some bit of code, but I can’t figure out what. There are three models: Invoice, Lineitems and items. I want the user to search a list of items, and then add them to the lineitems table. The…

---

## [Web service in Ruby consumed by a C# client](https://www.ruby-forum.com/t/web-service-in-ruby-consumed-by-a-c-client/175035)

<div class="topic-metadata">

**Author:** [@Phylroy](https://www.ruby-forum.com/u/Phylroy)\
**Replies:** 1\
**Last updated:** [September 7, 2009, 9:51am UTC](https://www.ruby-forum.com/t/web-service-in-ruby-consumed-by-a-c-client/175035 "2009-09-07T09:51:11Z")

</div>

Now it is my understanding that Rails no longer officially supports ActionWebService and WSDL generation, and the new approach is RESTful webservices with WADL. The client app consuming the webservice is a C# applicat…

---

## [Problem with Double Submit](https://www.ruby-forum.com/t/problem-with-double-submit/174996)

<div class="topic-metadata">

**Author:** [@Hunt\_J](https://www.ruby-forum.com/u/Hunt_J)\
**Replies:** 4\
**Last updated:** [September 7, 2009, 8:33am UTC](https://www.ruby-forum.com/t/problem-with-double-submit/174996 "2009-09-07T08:33:19Z")

</div>

Hi, We occasionally have a user pressing “submit” button more than once. I know I can disable submit button using “onclick”. But I sometimes need a more solid solution especially for a form that could change a record…

---

## [Errno::EINVAL](https://www.ruby-forum.com/t/errno-einval/175058)

<div class="topic-metadata">

**Author:** [@preethi](https://www.ruby-forum.com/u/preethi)\
**Replies:** 2\
**Last updated:** [September 7, 2009, 8:27am UTC](https://www.ruby-forum.com/t/errno-einval/175058 "2009-09-07T08:27:36Z")

</div>

Hi , I’m getting this error “Errno::EINVAL in Home#home\_page” where home\_page contains periodic\_remote\_call The error is shown in the line \<%= myblogpost\_homepage.created\_at.strftime ‘%d’ %\>\<%= date\_to\_ordinal(mybl…

---

## [Wrong URL/Application crashing Notification](https://www.ruby-forum.com/t/wrong-url-application-crashing-notification/175061)

<div class="topic-metadata">

**Author:** [@salil](https://www.ruby-forum.com/u/salil)\
**Replies:** 1\
**Last updated:** [September 7, 2009, 8:06am UTC](https://www.ruby-forum.com/t/wrong-url-application-crashing-notification/175061 "2009-09-07T08:06:59Z")

</div>

Hi All, I want to make a default page if application is crashes i want to know what is the best way to do that. Also when user make some url changes application shouldn’t get crashed.for ex. if user type url :- http…

---

## [How do I make a performance test?](https://www.ruby-forum.com/t/how-do-i-make-a-performance-test/175060)

<div class="topic-metadata">

**Author:** [@jarl](https://www.ruby-forum.com/u/jarl)\
**Replies:** 0\
**Last updated:** [September 7, 2009, 7:41am UTC](https://www.ruby-forum.com/t/how-do-i-make-a-performance-test/175060 "2009-09-07T07:41:13Z")

</div>

Hi. I would like to make a performance test using rails 2.3.3 I see there is a generator called performance\_test, but can someone give me a link to a url that gives some examples. I have read http://guides.rubyonrai…

---

## [Escape\_javascript error](https://www.ruby-forum.com/t/escape-javascript-error/174919)

<div class="topic-metadata">

**Author:** [@bgumbiker](https://www.ruby-forum.com/u/bgumbiker)\
**Replies:** 2\
**Last updated:** [September 7, 2009, 2:16am UTC](https://www.ruby-forum.com/t/escape-javascript-error/174919 "2009-09-07T02:16:27Z")

</div>

Hello, I am using jQuery for all ajax stuff and recently got following error: ActionView::TemplateError (private method \`gsub’ called for #\<Array: 0x2425ae8\>) on line #1 of… and the code where it happens: $("#notice…

---

## [Active record accessor best practices?](https://www.ruby-forum.com/t/active-record-accessor-best-practices/175051)

<div class="topic-metadata">

**Author:** [@tony](https://www.ruby-forum.com/u/tony)\
**Replies:** 0\
**Last updated:** [September 7, 2009, 1:37am UTC](https://www.ruby-forum.com/t/active-record-accessor-best-practices/175051 "2009-09-07T01:37:15Z")

</div>

Within an ActiveRecord sub-class I have seen several ways that people access the model attributes. As I have wandered through various blogs, my code now uses several different methods and I’m planning on making my co…

---

## [ActiveResource How to set site at runtime?](https://www.ruby-forum.com/t/activeresource-how-to-set-site-at-runtime/175042)

<div class="topic-metadata">

**Author:** [@aftershock](https://www.ruby-forum.com/u/aftershock)\
**Replies:** 0\
**Last updated:** [September 6, 2009, 11:04pm UTC](https://www.ruby-forum.com/t/activeresource-how-to-set-site-at-runtime/175042 "2009-09-06T23:04:34Z")

</div>

I have a number of ActiveResource classes that I won’t know the site for until runtime. The current definition for one of these resources looks like this class ResourceSiteDetail \< ActiveResource self.element\_name = …

---

## [Rails and Mocha problem](https://www.ruby-forum.com/t/rails-and-mocha-problem/175017)

<div class="topic-metadata">

**Author:** [@chrisjo](https://www.ruby-forum.com/u/chrisjo)\
**Replies:** 2\
**Last updated:** [September 6, 2009, 10:38pm UTC](https://www.ruby-forum.com/t/rails-and-mocha-problem/175017 "2009-09-06T22:38:46Z")

</div>

I recently set up an app on a new (old) computer, and I’m having problems running my tests. For some reason, mocha is not behaving at all. The first thing that happened was that all calls to stub (Mocha::API#stub) fai…

---

## [Caching question](https://www.ruby-forum.com/t/caching-question/175011)

<div class="topic-metadata">

**Author:** [@RVince](https://www.ruby-forum.com/u/RVince)\
**Replies:** 1\
**Last updated:** [September 6, 2009, 8:45pm UTC](https://www.ruby-forum.com/t/caching-question/175011 "2009-09-06T20:45:11Z")

</div>

My inderstand is that when a partial is re-rendered, it is also re- executed. So, if I have a select in a partial, say, select(“channelnotes”, “channelnotes”, Channelnote.find(:all, :order =\> ‘tstamp DESC’, :limit =\>3…

---

## [About configuration ror (i'm tiro)](https://www.ruby-forum.com/t/about-configuration-ror-im-tiro/175039)

<div class="topic-metadata">

**Author:** [@lilili](https://www.ruby-forum.com/u/lilili)\
**Replies:** 0\
**Last updated:** [September 6, 2009, 8:36pm UTC](https://www.ruby-forum.com/t/about-configuration-ror-im-tiro/175039 "2009-09-06T20:36:24Z")

</div>

hi, i’m using ubuntu9.04, download ruby Source code and make it. install rails 2.3.4 $rails /var/www/hello is work but when $ ruby script/generate migration hello\_db System tell me: /usr/local/lib/ruby/gems/1.9…

---

## [Personnel evaluation modeling question](https://www.ruby-forum.com/t/personnel-evaluation-modeling-question/174981)

<div class="topic-metadata">

**Author:** [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Replies:** 7\
**Last updated:** [September 6, 2009, 7:06pm UTC](https://www.ruby-forum.com/t/personnel-evaluation-modeling-question/174981 "2009-09-06T19:06:50Z")

</div>

I am looking to develop a personnel evaluation web form. This stuff below is repeated 5 times with different job responsibilities and outcomes ina kind table format. What is the most efficient way to model this? Mak…

---

## [Undefined method 'new\_search' after upgrading SearchLogic](https://www.ruby-forum.com/t/undefined-method-new-search-after-upgrading-searchlogic/171252)

<div class="topic-metadata">

**Author:** [@joep](https://www.ruby-forum.com/u/joep)\
**Replies:** 4\
**Last updated:** [September 6, 2009, 5:15pm UTC](https://www.ruby-forum.com/t/undefined-method-new-search-after-upgrading-searchlogic/171252 "2009-09-06T17:15:38Z")

</div>

Hey, I just upgraded from searchlogic-1.6.6 to searchlogic-2.1.1, and now I’m getting some new errors. Previously, in the model I could have something like this: def self.search(criteria, options={}) criteria ||= {} …

---

## [What have you proven?](https://www.ruby-forum.com/t/what-have-you-proven/175026)

<div class="topic-metadata">

**Author:** [@rpflaum](https://www.ruby-forum.com/u/rpflaum)\
**Replies:** 1\
**Last updated:** [September 6, 2009, 2:31pm UTC](https://www.ruby-forum.com/t/what-have-you-proven/175026 "2009-09-06T14:31:07Z")

</div>

I’m lost why your doing test using WEBrick. Unless you plan to use it as your production server you’re likely to get a completely different profile of results using Apache. You’ve proven that there is a difference bet…

---

## [Polymorphic many-to-many relationship?](https://www.ruby-forum.com/t/polymorphic-many-to-many-relationship/175022)

<div class="topic-metadata">

**Author:** [@cojones](https://www.ruby-forum.com/u/cojones)\
**Replies:** 1\
**Last updated:** [September 6, 2009, 10:47am UTC](https://www.ruby-forum.com/t/polymorphic-many-to-many-relationship/175022 "2009-09-06T10:47:51Z")

</div>

Good morning, I need to implement a many-to-many polymorphic relationship. Any of my books, Google and the search couldn’t help me. habtm doesn’t work cause it doesn’t support :polymorphic so this is my approach so f…

---

## [Passing context with request?](https://www.ruby-forum.com/t/passing-context-with-request/175018)

<div class="topic-metadata">

**Author:** [@Glen](https://www.ruby-forum.com/u/Glen)\
**Replies:** 2\
**Last updated:** [September 6, 2009, 4:12am UTC](https://www.ruby-forum.com/t/passing-context-with-request/175018 "2009-09-06T04:12:25Z")

</div>

I’m having trouble passing context data with a request. Rails keeps complaining that it can’t convert string to integer which is questionable in and of it’s self. Origionally the data was being added to the query st…

---

## [How toi incorporate google map in a rails application](https://www.ruby-forum.com/t/how-toi-incorporate-google-map-in-a-rails-application/175010)

<div class="topic-metadata">

**Author:** [@soutom](https://www.ruby-forum.com/u/soutom)\
**Replies:** 2\
**Last updated:** [September 6, 2009, 4:02am UTC](https://www.ruby-forum.com/t/how-toi-incorporate-google-map-in-a-rails-application/175010 "2009-09-06T04:02:27Z")

</div>

i just want ot incorporate google map in my application. So for this what should i do. if any one please help me step by step… thanking you

---

## [Rails 2.3.3 has a very serious performance problem](https://www.ruby-forum.com/t/rails-2-3-3-has-a-very-serious-performance-problem/174894)

<div class="topic-metadata">

**Author:** [@clive](https://www.ruby-forum.com/u/clive)\
**Replies:** 9\
**Last updated:** [September 6, 2009, 3:54am UTC](https://www.ruby-forum.com/t/rails-2-3-3-has-a-very-serious-performance-problem/174894 "2009-09-06T03:54:16Z")

</div>

On my Ubuntu 8.04 64 bit desktop, I created an empty Rails project and from another machine, I used ab -n 10 http://210.77.27.169:3000/ to test the performance: When I put rails 2.3.3 under vendor/rails: Server Soft…

---

## [Error (nil object) on object creation](https://www.ruby-forum.com/t/error-nil-object-on-object-creation/174849)

<div class="topic-metadata">

**Author:** [@zambezi](https://www.ruby-forum.com/u/zambezi)\
**Replies:** 10\
**Last updated:** [September 6, 2009, 1:13am UTC](https://www.ruby-forum.com/t/error-nil-object-on-object-creation/174849 "2009-09-06T01:13:49Z")

</div>

Greetings, Can anyone shed some light on why the following error is raised? I’ve depleted my small inventory of ideas. Thanks much. Bill NoMethodError in IncidentController#signup You have a nil object when you d…

---

## [RJS Chaining Problem](https://www.ruby-forum.com/t/rjs-chaining-problem/174977)

<div class="topic-metadata">

**Author:** [@bob](https://www.ruby-forum.com/u/bob)\
**Replies:** 2\
**Last updated:** [September 6, 2009, 12:01am UTC](https://www.ruby-forum.com/t/rjs-chaining-problem/174977 "2009-09-06T00:01:17Z")

</div>

Hi, I am having a problem with the way RJS generates code. Say I have html like this: \<div id="parent"\> \<div id="child1"\>\</div\> \<div id="child2"\>\</div\> \</div\> and RJS code like this: parent = page\["parent"\] par…

---

## [Upgrading from rails 1.1.6 to 2.3.2; problems with activerecord-oracle-adapter](https://www.ruby-forum.com/t/upgrading-from-rails-1-1-6-to-2-3-2-problems-with-activerecord-oracle-adapter/168146)

<div class="topic-metadata">

**Author:** [@sultan](https://www.ruby-forum.com/u/sultan)\
**Replies:** 6\
**Last updated:** [September 5, 2009, 10:16pm UTC](https://www.ruby-forum.com/t/upgrading-from-rails-1-1-6-to-2-3-2-problems-with-activerecord-oracle-adapter/168146 "2009-09-05T22:16:35Z")

</div>

I’m upgrading from rails 1.1.6 to 2.3.2 and having problems with activerecord-oracle-adapter. Following are the ruby, rails & gems versions. “ruby script/about” has the problems. $ ruby -v ruby 1.8.6 (2007-09-23 patc…

---

## [Backgroundrb help needed!](https://www.ruby-forum.com/t/backgroundrb-help-needed/174995)

<div class="topic-metadata">

**Author:** [@philswenson](https://www.ruby-forum.com/u/philswenson)\
**Replies:** 2\
**Last updated:** [September 5, 2009, 8:37pm UTC](https://www.ruby-forum.com/t/backgroundrb-help-needed/174995 "2009-09-05T20:37:32Z")

</div>

I have what I thought would be a simple thing - we use backgroundrb to watch a directory and process new files. We want to make sure that the worker is running. I thought I could have a schedule that started the worke…

---

## [How to compare two model instances? is "m1.to\_yaml.eql?(m2.to\_yaml)" a good way?](https://www.ruby-forum.com/t/how-to-compare-two-model-instances-is-m1-to-yaml-eql-m2-to-yaml-a-good-way/174989)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 4\
**Last updated:** [September 5, 2009, 7:31pm UTC](https://www.ruby-forum.com/t/how-to-compare-two-model-instances-is-m1-to-yaml-eql-m2-to-yaml-a-good-way/174989 "2009-09-05T19:31:59Z")

</div>

Hi, What’s an easy way to compare for equality two model instances (that haven’t been saved yet). Or in other words pretty much just two object instances. I’ve tried “==” and “eql?” on the objects directly and this…

---

## [Newbie question - limiting record view](https://www.ruby-forum.com/t/newbie-question-limiting-record-view/174443)

<div class="topic-metadata">

**Author:** [@mlittle](https://www.ruby-forum.com/u/mlittle)\
**Replies:** 6\
**Last updated:** [September 5, 2009, 7:22pm UTC](https://www.ruby-forum.com/t/newbie-question-limiting-record-view/174443 "2009-09-05T19:22:01Z")

</div>

I’m new to rails and I’m having problems figuring out how to limit the ability to for 1 user to see the records that another user creates. I have Users and Children and I want to make it so a User with user\_id of 1 wh…

---

## [Can't Access Mongrel on Vista](https://www.ruby-forum.com/t/cant-access-mongrel-on-vista/175009)

<div class="topic-metadata">

**Author:** [@prasanna](https://www.ruby-forum.com/u/prasanna)\
**Replies:** 1\
**Last updated:** [September 5, 2009, 7:19pm UTC](https://www.ruby-forum.com/t/cant-access-mongrel-on-vista/175009 "2009-09-05T19:19:06Z")

</div>

Hello, I am new to developing in Rails. I created a rails project using ‘rails mydiary’. Used ‘ruby script/generate scaffold Entry title:string content:text’ to generate scaffolding for the entry table. Did ‘rake d…

---

## [Help with events and current\_user](https://www.ruby-forum.com/t/help-with-events-and-current-user/175012)

<div class="topic-metadata">

**Author:** [@mlittle](https://www.ruby-forum.com/u/mlittle)\
**Replies:** 0\
**Last updated:** [September 5, 2009, 7:16pm UTC](https://www.ruby-forum.com/t/help-with-events-and-current-user/175012 "2009-09-05T19:16:10Z")

</div>

Ok. Here’s my problem. First of all, I’m new to ruby / rails and am using the eventcalendar plugin and am having trouble with the following: def event\_calendar calendar event\_calendar\_options do |event| # \<— I think …

---

## [Where to start?](https://www.ruby-forum.com/t/where-to-start/174991)

<div class="topic-metadata">

**Author:** [@jknowlage](https://www.ruby-forum.com/u/jknowlage)\
**Replies:** 1\
**Last updated:** [September 5, 2009, 7:09pm UTC](https://www.ruby-forum.com/t/where-to-start/174991 "2009-09-05T19:09:08Z")

</div>

Hello!! I have been interested in learning RoR since I was first introduced in 2006. Although my career tends to limit free time for programming, I have recently set a goal to teach myself RoR, or at least the basics,…

---

## [Changing a script into a database migration](https://www.ruby-forum.com/t/changing-a-script-into-a-database-migration/174999)

<div class="topic-metadata">

**Author:** [@Fifigyuri](https://www.ruby-forum.com/u/Fifigyuri)\
**Replies:** 3\
**Last updated:** [September 5, 2009, 7:05pm UTC](https://www.ruby-forum.com/t/changing-a-script-into-a-database-migration/174999 "2009-09-05T19:05:38Z")

</div>

Hi, I have a little dilemma where and how to place a script in my rails application. I work on a reimplementation and the original database structure is changed. The old data needs to be migrated into a new schema. …

---

## [ActiveRecord doesn't care about timezone?](https://www.ruby-forum.com/t/activerecord-doesnt-care-about-timezone/174854)

<div class="topic-metadata">

**Author:** [@coolmenu](https://www.ruby-forum.com/u/coolmenu)\
**Replies:** 4\
**Last updated:** [September 5, 2009, 6:23pm UTC](https://www.ruby-forum.com/t/activerecord-doesnt-care-about-timezone/174854 "2009-09-05T18:23:28Z")

</div>

I’m having some trouble getting activerecord to adhere to my timezone settings when finding objects based on its created\_at field. I understand that datetime fields are stored in UTC but it doesn’t convert the dateti…

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

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