# Rails

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

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

---

## [Weird behaviour of a Web Service](https://www.ruby-forum.com/t/weird-behaviour-of-a-web-service/159956)

<div class="topic-metadata">

**Author:** [@Rey9999](https://www.ruby-forum.com/u/Rey9999)\
**Replies:** 0\
**Last updated:** [February 10, 2009, 12:29pm UTC](https://www.ruby-forum.com/t/weird-behaviour-of-a-web-service/159956 "2009-02-10T12:29:40Z")

</div>

Hello everyone, I’m currently writing a Rails application which should expose some web methods, which need to be called by a windows mobile application. I’ve been able to successfully call some webmethods from the mob…

---

## [Rails on ruby-1.8.7](https://www.ruby-forum.com/t/rails-on-ruby-1-8-7/159835)

<div class="topic-metadata">

**Author:** [@toy](https://www.ruby-forum.com/u/toy)\
**Replies:** 4\
**Last updated:** [February 10, 2009, 10:27am UTC](https://www.ruby-forum.com/t/rails-on-ruby-1-8-7/159835 "2009-02-10T10:27:56Z")

</div>

Download page(http://rubyonrails.org/download) tells as follows “We recommend Ruby 1.8.7 for use with Rails.” Which version of RoR is stable(or available) on ruby-1.8.7? I want to use rails-2.1.2. but I dont know that…

---

## [1 vs True vs 't'](https://www.ruby-forum.com/t/1-vs-true-vs-t/159750)

<div class="topic-metadata">

**Author:** [@yachtman](https://www.ruby-forum.com/u/yachtman)\
**Replies:** 6\
**Last updated:** [February 10, 2009, 10:09am UTC](https://www.ruby-forum.com/t/1-vs-true-vs-t/159750 "2009-02-10T10:09:40Z")

</div>

I’m using SQLite3, but have been a longtime MySQL user. I have been wracking my brain over why I was getting a “0” result for a count when it should be “10”. The statement… Table.count (:conditions =\> “approved = 0”) …

---

## [How to get form parameters while using fields\_for with nested attributes](https://www.ruby-forum.com/t/how-to-get-form-parameters-while-using-fields-for-with-nested-attributes/159833)

<div class="topic-metadata">

**Author:** [@Sahil\_D](https://www.ruby-forum.com/u/Sahil_D)\
**Replies:** 2\
**Last updated:** [February 10, 2009, 9:57am UTC](https://www.ruby-forum.com/t/how-to-get-form-parameters-while-using-fields-for-with-nested-attributes/159833 "2009-02-10T09:57:58Z")

</div>

hi all… i am trying to use fields\_for to get and save nested attributes in a form. i have a ‘Partner’ model associated with an ‘Address’ model. partner has\_many :addresses although the form is displaying fine, but o…

---

## [Common model validation probelm](https://www.ruby-forum.com/t/common-model-validation-probelm/159940)

<div class="topic-metadata">

**Author:** [@dharmdip](https://www.ruby-forum.com/u/dharmdip)\
**Replies:** 1\
**Last updated:** [February 10, 2009, 9:57am UTC](https://www.ruby-forum.com/t/common-model-validation-probelm/159940 "2009-02-10T09:57:22Z")

</div>

Hello , I am facing strange problem here. I have model customer.rb , i am validating following fields validates\_presence\_of :email validates\_format\_of :email, :with =\> /(^(\[^@\\s\]+)@((?:\[-\_a-z0-9\]+.)+\[a-z\]{2,})$)|(^$…

---

## [Rspec test cannot be passed when render partial in layout](https://www.ruby-forum.com/t/rspec-test-cannot-be-passed-when-render-partial-in-layout/159944)

<div class="topic-metadata">

**Author:** [@zerogy](https://www.ruby-forum.com/u/zerogy)\
**Replies:** 0\
**Last updated:** [February 10, 2009, 9:57am UTC](https://www.ruby-forum.com/t/rspec-test-cannot-be-passed-when-render-partial-in-layout/159944 "2009-02-10T09:57:22Z")

</div>

I have a problem stuck me couples of days, could anyone help me? Thanks very much. The problem is that rspec test cannot be passed when the layout contains :partial, once i removed the :partial, the rspec test passed…

---

## [Serverside chart generator](https://www.ruby-forum.com/t/serverside-chart-generator/159858)

<div class="topic-metadata">

**Author:** [@tuktuk](https://www.ruby-forum.com/u/tuktuk)\
**Replies:** 4\
**Last updated:** [February 10, 2009, 9:37am UTC](https://www.ruby-forum.com/t/serverside-chart-generator/159858 "2009-02-10T09:37:31Z")

</div>

Does any of you know of a good server-side tool for generating line-charts - command-line tool will suffice (one that spits out a JPG, SVG, PNG or such) Something integrated in Ruby would be even nicer :slight\_smile: …

---

## [Get @current\_user into model](https://www.ruby-forum.com/t/get-current-user-into-model/159774)

<div class="topic-metadata">

**Author:** [@Geekyra](https://www.ruby-forum.com/u/Geekyra)\
**Replies:** 6\
**Last updated:** [February 10, 2009, 7:42am UTC](https://www.ruby-forum.com/t/get-current-user-into-model/159774 "2009-02-10T07:42:49Z")

</div>

Hello, can anybody help me, how to pass @current\_user (generated by session\[user\_id\] into a model ? for example I have a relationship like below : User has many Journals User has many Categories Journals has many It…

---

## [Full Ajax Application](https://www.ruby-forum.com/t/full-ajax-application/159665)

<div class="topic-metadata">

**Author:** [@Geekyra](https://www.ruby-forum.com/u/Geekyra)\
**Replies:** 4\
**Last updated:** [February 10, 2009, 7:39am UTC](https://www.ruby-forum.com/t/full-ajax-application/159665 "2009-02-10T07:39:52Z")

</div>

Hello, I’m a newbie here… please… can anyone help me about FULL AJAX ? for example if i’m scaffolding a simple model and controller for product which only have 1 field for NAME:STRING with the command : script/generat…

---

## [Problem in integrating Juggernaut chat plugin with Community Engine](https://www.ruby-forum.com/t/problem-in-integrating-juggernaut-chat-plugin-with-community-engine/159941)

<div class="topic-metadata">

**Author:** [@saideep\_a.v.s](https://www.ruby-forum.com/u/saideep_a.v.s)\
**Replies:** 0\
**Last updated:** [February 10, 2009, 6:48am UTC](https://www.ruby-forum.com/t/problem-in-integrating-juggernaut-chat-plugin-with-community-engine/159941 "2009-02-10T06:48:26Z")

</div>

Hello, I have been trying to integrate juggernaut chat plugin with Community-engline and as rails decided to deprecate add\_variables\_to\_assigns method in rails 2.2. They don’t include this on the list of deprecated…

---

## [Uploading files](https://www.ruby-forum.com/t/uploading-files/159939)

<div class="topic-metadata">

**Author:** [@chaitanya](https://www.ruby-forum.com/u/chaitanya)\
**Replies:** 1\
**Last updated:** [February 10, 2009, 6:48am UTC](https://www.ruby-forum.com/t/uploading-files/159939 "2009-02-10T06:48:26Z")

</div>

how to upload multiple photos to a rails application.

---

## [How to remove special characters? (ie. &amp;)](https://www.ruby-forum.com/t/how-to-remove-special-characters-ie-amp/159933)

<div class="topic-metadata">

**Author:** [@yachtman](https://www.ruby-forum.com/u/yachtman)\
**Replies:** 3\
**Last updated:** [February 10, 2009, 6:35am UTC](https://www.ruby-forum.com/t/how-to-remove-special-characters-ie-amp/159933 "2009-02-10T06:35:35Z")

</div>

This might be such a stupid simple question, so forgive me–I did search the forum and elsewhere and couldn’t find the answer… I have an HTML text string that formats nicely on a web page: s = “Mom & Dad” =\> “Mom & …

---

## [Dynamic constant assignment](https://www.ruby-forum.com/t/dynamic-constant-assignment/159904)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 2\
**Last updated:** [February 10, 2009, 5:33am UTC](https://www.ruby-forum.com/t/dynamic-constant-assignment/159904 "2009-02-10T05:33:36Z")

</div>

I have a constant set up like that : ALL\_LOCALES =\> {“it”=\>“Italian”, “fr”=\>“Français”, “de”=\>“Deutsch”, “en- GB”=\>“English (UK)”, “es”=\>“Español (España)”, “pt-PT”=\>“Português”, “pl”=\>“Polski”, “en-US”=\>“English (US…

---

## [Threading, returning from action method, blocking](https://www.ruby-forum.com/t/threading-returning-from-action-method-blocking/159909)

<div class="topic-metadata">

**Author:** [@jrochkind](https://www.ruby-forum.com/u/jrochkind)\
**Replies:** 1\
**Last updated:** [February 10, 2009, 5:19am UTC](https://www.ruby-forum.com/t/threading-returning-from-action-method-blocking/159909 "2009-02-10T05:19:32Z")

</div>

So, in a Rails 2.1 app, I’m doing a bit of threading. Even though this isn’t exactly recommended, it seemed to work (taking care to use ActiveRecord in a thread-safe manner, or not at all in threads). But I’ve noticed…

---

## [Upload multiple images with attachment\_fu](https://www.ruby-forum.com/t/upload-multiple-images-with-attachment-fu/159601)

<div class="topic-metadata">

**Author:** [@dharmdip](https://www.ruby-forum.com/u/dharmdip)\
**Replies:** 2\
**Last updated:** [February 10, 2009, 5:18am UTC](https://www.ruby-forum.com/t/upload-multiple-images-with-attachment-fu/159601 "2009-02-10T05:18:05Z")

</div>

i am getting array of images but when i trying to save it, it gives error NoMethodError (undefined method \`strip’ for #ActionController::UploadedStringIO:0x458afe4) help ?

---

## [Help with Scaffolding deprecation on Rails 2.2.2](https://www.ruby-forum.com/t/help-with-scaffolding-deprecation-on-rails-2-2-2/159913)

<div class="topic-metadata">

**Author:** [@untz](https://www.ruby-forum.com/u/untz)\
**Replies:** 2\
**Last updated:** [February 10, 2009, 5:06am UTC](https://www.ruby-forum.com/t/help-with-scaffolding-deprecation-on-rails-2-2-2/159913 "2009-02-10T05:06:05Z")

</div>

I am reading “Agile Web D. with Rails, 2nd Edition”, which is based on 1.2.6. However, on my Leopard based iMac, I was running Rails 2.2.2. When I got to the part with associating a scaffold to my :products (located …

---

## [Search between dates won't work properly](https://www.ruby-forum.com/t/search-between-dates-wont-work-properly/159880)

<div class="topic-metadata">

**Author:** [@gabi](https://www.ruby-forum.com/u/gabi)\
**Replies:** 5\
**Last updated:** [February 10, 2009, 5:04am UTC](https://www.ruby-forum.com/t/search-between-dates-wont-work-properly/159880 "2009-02-10T05:04:55Z")

</div>

I’d like to search for invoices in the database, having the date range set (from, to). The problem is that invoices whose issue dates match the ‘from’ or ‘to’ dates will not show up in results. For example: Created a…

---

## [Server won't start with ActiveMerchant](https://www.ruby-forum.com/t/server-wont-start-with-activemerchant/159921)

<div class="topic-metadata">

**Author:** [@fonziguy](https://www.ruby-forum.com/u/fonziguy)\
**Replies:** 1\
**Last updated:** [February 10, 2009, 4:28am UTC](https://www.ruby-forum.com/t/server-wont-start-with-activemerchant/159921 "2009-02-10T04:28:38Z")

</div>

Hi, Everything was working fine until I went to use ActiveMerchant. Have spent a few hours trying to figure this out with no success. Here’s the error I’m getting \*\* Starting Rails with development environment… Exit…

---

## [AR:BASE.default\_timezone](https://www.ruby-forum.com/t/ar-base-default-timezone/159889)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 3\
**Last updated:** [February 10, 2009, 1:56am UTC](https://www.ruby-forum.com/t/ar-base-default-timezone/159889 "2009-02-10T01:56:47Z")

</div>

I have a requirement to test code whose execution depends upon the default\_timezone setting. I have tried several approaches to this but nothing that I do in my test seems to alter the behaviour that is set in enviro…

---

## [Option on select form helper to customize "Select" text?](https://www.ruby-forum.com/t/option-on-select-form-helper-to-customize-select-text/159894)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 4\
**Last updated:** [February 10, 2009, 1:24am UTC](https://www.ruby-forum.com/t/option-on-select-form-helper-to-customize-select-text/159894 "2009-02-10T01:24:02Z")

</div>

All, Is there any built-in way in the “select” form helper to display something other than “Select” in the :include\_blank option? Specifically, for a date helper, would like to show “Month”, “Day”, “Year” respectivel…

---

## [Controller utility method: want to use in tests. Where should it go?](https://www.ruby-forum.com/t/controller-utility-method-want-to-use-in-tests-where-should-it-go/159912)

<div class="topic-metadata">

**Author:** [@itsastickup](https://www.ruby-forum.com/u/itsastickup)\
**Replies:** 2\
**Last updated:** [February 10, 2009, 1:21am UTC](https://www.ruby-forum.com/t/controller-utility-method-want-to-use-in-tests-where-should-it-go/159912 "2009-02-10T01:21:50Z")

</div>

Hi, I’ve a simple method I call in my action methods. So far I’ve put it in application.rb in the ActionController class. However I can’t call it from my test code. Where should I be putting it? I’ve tried adding thi…

---

## [Newbie - has\_many :through case?](https://www.ruby-forum.com/t/newbie-has-many-through-case/159920)

<div class="topic-metadata">

**Author:** [@gamericax](https://www.ruby-forum.com/u/gamericax)\
**Replies:** 0\
**Last updated:** [February 10, 2009, 1:04am UTC](https://www.ruby-forum.com/t/newbie-has-many-through-case/159920 "2009-02-10T01:04:16Z")

</div>

hi, i’m a newbie digging ROR for a week (and loving it i might add) and trying to get a project done at the same time. i’m more used to direct SQL so trying to get hang of active record asssociations and figure out …

---

## [Rails 2.3 (minus) engines = headaches](https://www.ruby-forum.com/t/rails-2-3-minus-engines-headaches/159917)

<div class="topic-metadata">

**Author:** [@davidjrice](https://www.ruby-forum.com/u/davidjrice)\
**Replies:** 0\
**Last updated:** [February 10, 2009, 1:04am UTC](https://www.ruby-forum.com/t/rails-2-3-minus-engines-headaches/159917 "2009-02-10T01:04:16Z")

</div>

Engine-Users mailing list removed\_email\_address@domain.invalid http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org

---

## [Specifying session\_id in params?](https://www.ruby-forum.com/t/specifying-session-id-in-params/159898)

<div class="topic-metadata">

**Author:** [@stickstone](https://www.ruby-forum.com/u/stickstone)\
**Replies:** 1\
**Last updated:** [February 10, 2009, 1:03am UTC](https://www.ruby-forum.com/t/specifying-session-id-in-params/159898 "2009-02-10T01:03:41Z")

</div>

I am using a Flex based front end on top of a rails backend. When the SWF is first loaded from the rails app to the client’s browser, a session is created on the rails side. However, subsequent requests from the load…

---

## [Fixtures load inconsistently](https://www.ruby-forum.com/t/fixtures-load-inconsistently/159915)

<div class="topic-metadata">

**Author:** [@bcm](https://www.ruby-forum.com/u/bcm)\
**Replies:** 0\
**Last updated:** [February 10, 2009, 1:03am UTC](https://www.ruby-forum.com/t/fixtures-load-inconsistently/159915 "2009-02-10T01:03:06Z")

</div>

Hi all, I’ve got a weird problem with loading fixtures, and I’m hoping someone out there can help. I’m having problems running my tests, because for one of my models the fixtures are loading strangely. Here’s an ex…

---

## [Acts\_as\_textiled missing something, possibly config?](https://www.ruby-forum.com/t/acts-as-textiled-missing-something-possibly-config/159914)

<div class="topic-metadata">

**Author:** [@mfabache](https://www.ruby-forum.com/u/mfabache)\
**Replies:** 0\
**Last updated:** [February 10, 2009, 1:01am UTC](https://www.ruby-forum.com/t/acts-as-textiled-missing-something-possibly-config/159914 "2009-02-10T01:01:55Z")

</div>

I’ve got acts\_as\_textiled working on my Mac,no problems. Same install process on RedHat FC8, is acting weird. For example: 1.) Already inplace HTML tags are not translated. An appears as . However any new 'h1.' w…

---

## [File upload time-out?](https://www.ruby-forum.com/t/file-upload-time-out/157014)

<div class="topic-metadata">

**Author:** [@r-a-mueller](https://www.ruby-forum.com/u/r-a-mueller)\
**Replies:** 1\
**Last updated:** [February 10, 2009, 12:53am UTC](https://www.ruby-forum.com/t/file-upload-time-out/157014 "2009-02-10T00:53:42Z")

</div>

I have an app that uploads large mp3 files (teaching), of around 30 megs or so. I am running my app on a mongrel cluster behind nginx. The file uplaods seem to hang. Is there a max execution time setting in rails, mon…

---

## [Can't call request.remote\_ip from object?](https://www.ruby-forum.com/t/cant-call-request-remote-ip-from-object/159890)

<div class="topic-metadata">

**Author:** [@taylorstrait](https://www.ruby-forum.com/u/taylorstrait)\
**Replies:** 3\
**Last updated:** [February 10, 2009, 12:53am UTC](https://www.ruby-forum.com/t/cant-call-request-remote-ip-from-object/159890 "2009-02-10T00:53:42Z")

</div>

class User def update\_metadata self.update\_attributes({:last\_login\_at =\> Time.now, :last\_known\_up =\> request.remote\_ip, :last\_known\_user\_agent =\> request.user\_agent}) end This does not work. It bombs out with: un…

---

## [Fixtures loading \*very\* strangely](https://www.ruby-forum.com/t/fixtures-loading-very-strangely/159903)

<div class="topic-metadata">

**Author:** [@bcm](https://www.ruby-forum.com/u/bcm)\
**Replies:** 2\
**Last updated:** [February 9, 2009, 11:54pm UTC](https://www.ruby-forum.com/t/fixtures-loading-very-strangely/159903 "2009-02-09T23:54:57Z")

</div>

Hi all, I’ve just hit a snag, and I’m hoping somebody out there can help. I’m working on an app that uses some legacy tables. One of them doesn’t have a column named “id” so I’ve got the following: class Student se…

---

## [Help with routes and params](https://www.ruby-forum.com/t/help-with-routes-and-params/159885)

<div class="topic-metadata">

**Author:** [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Replies:** 2\
**Last updated:** [February 9, 2009, 11:20pm UTC](https://www.ruby-forum.com/t/help-with-routes-and-params/159885 "2009-02-09T23:20:00Z")

</div>

I need some help with routes and params. I am developming some forums for a web. I want to be able to create new replies once a post has been created. So I create a post and then I have to put a link named “Reply”. Wh…

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

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