# Rails

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

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

---

## [Namespacing conventions](https://www.ruby-forum.com/t/namespacing-conventions/154046)

<div class="topic-metadata">

**Author:** [@nickh](https://www.ruby-forum.com/u/nickh)\
**Replies:** 2\
**Last updated:** [November 25, 2008, 4:05am UTC](https://www.ruby-forum.com/t/namespacing-conventions/154046 "2008-11-25T04:05:21Z")

</div>

I compared the output from \`\`rake routes’’ for each solution below, and they both produce the exact same routes. Is one solution preferred over the over? Solution #1: map.resource :account do |account| account.reso…

---

## [View and Controller not working](https://www.ruby-forum.com/t/view-and-controller-not-working/154075)

<div class="topic-metadata">

**Author:** [@MrSWatson](https://www.ruby-forum.com/u/MrSWatson)\
**Replies:** 2\
**Last updated:** [November 25, 2008, 4:00am UTC](https://www.ruby-forum.com/t/view-and-controller-not-working/154075 "2008-11-25T04:00:40Z")

</div>

Hello, I created a controller named animals and a .rhtml file called hello. There is nothing in the controller, but there is “hello, world!” in the .rhtml. I booted up webbrick and typed “http://localhost:3000/animal…

---

## [Rails plugin (redmine)](https://www.ruby-forum.com/t/rails-plugin-redmine/154059)

<div class="topic-metadata">

**Author:** [@ponto](https://www.ruby-forum.com/u/ponto)\
**Replies:** 0\
**Last updated:** [November 24, 2008, 11:55pm UTC](https://www.ruby-forum.com/t/rails-plugin-redmine/154059 "2008-11-24T23:55:34Z")

</div>

Hi, i am adding functionality to the redmine’s repository feature. changing some of the user interaction workflow. I’ve modified some of the views and added some js and css. What i would like to know, is if i can dep…

---

## [Strange behavior of expire\_fragment](https://www.ruby-forum.com/t/strange-behavior-of-expire-fragment/196846)

<div class="topic-metadata">

**Author:** [@indigoi](https://www.ruby-forum.com/u/indigoi)\
**Replies:** 5\
**Last updated:** [November 24, 2008, 11:48pm UTC](https://www.ruby-forum.com/t/strange-behavior-of-expire-fragment/196846 "2008-11-24T23:48:36Z")

</div>

I’m following railscasts tutorial on fragment caching, everything works great except for the sweepers. When i put expire\_fragment(%r{.\*}) directly in my controller, i can expire my fragments with wonderful ease. Yet w…

---

## [Strange Issue w/ incorrect controller invocation for nested routes using the same controller name](https://www.ruby-forum.com/t/strange-issue-w-incorrect-controller-invocation-for-nested-routes-using-the-same-controller-name/154029)

<div class="topic-metadata">

**Author:** [@johnt519](https://www.ruby-forum.com/u/johnt519)\
**Replies:** 8\
**Last updated:** [November 24, 2008, 11:29pm UTC](https://www.ruby-forum.com/t/strange-issue-w-incorrect-controller-invocation-for-nested-routes-using-the-same-controller-name/154029 "2008-11-24T23:29:08Z")

</div>

Hi, I’ve been battling a very strange and irritating bug for a long time now. The issue is the following: I have namespaced my controllers in routes.rb map.resources :login, :collection =\> \[:login, :logout\] map.name…

---

## [Rubygems broken](https://www.ruby-forum.com/t/rubygems-broken/154005)

<div class="topic-metadata">

**Author:** [@expilo](https://www.ruby-forum.com/u/expilo)\
**Replies:** 10\
**Last updated:** [November 24, 2008, 11:26pm UTC](https://www.ruby-forum.com/t/rubygems-broken/154005 "2008-11-24T23:26:47Z")

</div>

Hello, I have been trying for the last three days on two different debian linux platforms x386 and amd64 using different rubygems versions 1.1.1, 1.2.0 and 1.3.1 to update gems on my system. No way! It only says it’s…

---

## [Attachment\_fu - uploading from different models in the same action](https://www.ruby-forum.com/t/attachment-fu-uploading-from-different-models-in-the-same-action/154056)

<div class="topic-metadata">

**Author:** [@shagymoe](https://www.ruby-forum.com/u/shagymoe)\
**Replies:** 0\
**Last updated:** [November 24, 2008, 11:22pm UTC](https://www.ruby-forum.com/t/attachment-fu-uploading-from-different-models-in-the-same-action/154056 "2008-11-24T23:22:05Z")

</div>

Hi, I’ve got a situation where I want to upload a zip file and an image from the same form. Each attachment is a different model. So, here’s what I’ve got. Models: class LogoImage \< ActiveRecord::Base belongs\_to :…

---

## [Actionwebservice as a SOAP client to .NET services](https://www.ruby-forum.com/t/actionwebservice-as-a-soap-client-to-net-services/153965)

<div class="topic-metadata">

**Author:** [@Tim\_U](https://www.ruby-forum.com/u/Tim_U)\
**Replies:** 2\
**Last updated:** [November 24, 2008, 11:19pm UTC](https://www.ruby-forum.com/t/actionwebservice-as-a-soap-client-to-net-services/153965 "2008-11-24T23:19:43Z")

</div>

I have read the (scant) documentation on the datanoise actionwebservice gems and can’t figure out how you are supposed to structure the SOAP client. Has anybody ever used actionwebservice as a client? If so could som…

---

## [Does anyone know whether ActiveRecord has supported connection pool?](https://www.ruby-forum.com/t/does-anyone-know-whether-activerecord-has-supported-connection-pool/153391)

<div class="topic-metadata">

**Author:** [@Kang\_P](https://www.ruby-forum.com/u/Kang_P)\
**Replies:** 10\
**Last updated:** [November 24, 2008, 10:56pm UTC](https://www.ruby-forum.com/t/does-anyone-know-whether-activerecord-has-supported-connection-pool/153391 "2008-11-24T22:56:31Z")

</div>

does anyone know whether ActiveRecord has supported connection pool? i can’t find articles talking about this, if so how to control it in Rails apps. thanks a lot.

---

## [MySQL](https://www.ruby-forum.com/t/mysql/153973)

<div class="topic-metadata">

**Author:** [@MrSWatson](https://www.ruby-forum.com/u/MrSWatson)\
**Replies:** 24\
**Last updated:** [November 24, 2008, 10:52pm UTC](https://www.ruby-forum.com/t/mysql/153973 "2008-11-24T22:52:08Z")

</div>

Hello, I am having problems with MySQL. Running: PC with Windows Vista Installed: Instant Rails AND RoR on (http://www.rubyonrails.com) I have edited the database.yml file. I went to C:/InstantRails/mysql/bin\>mysqla…

---

## [Undefined symbol: rb\_str\_set\_len](https://www.ruby-forum.com/t/undefined-symbol-rb-str-set-len/154042)

<div class="topic-metadata">

**Author:** [@renec](https://www.ruby-forum.com/u/renec)\
**Replies:** 2\
**Last updated:** [November 24, 2008, 10:31pm UTC](https://www.ruby-forum.com/t/undefined-symbol-rb-str-set-len/154042 "2008-11-24T22:31:08Z")

</div>

I recently downgraded from ruby 1.8.7-p72 to 1.8.6-p287 and now whenever i try to access the mysqldatabase my rails server (WEBrick) crashes with the following error: ruby: symbol lookup error: /usr/lib/ruby/site\_rub…

---

## [Should this work? - "validates\_inclusion\_of :start\_date, :in =\> (Time.now.to\_date - 100.years)..(Tim](https://www.ruby-forum.com/t/should-this-work-validates-inclusion-of-start-date-in-time-now-to-date-100-years-tim/153768)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 7\
**Last updated:** [November 24, 2008, 10:06pm UTC](https://www.ruby-forum.com/t/should-this-work-validates-inclusion-of-start-date-in-time-now-to-date-100-years-tim/153768 "2008-11-24T22:06:05Z")

</div>

wondering if should this work? - “validates\_inclusion\_of :start\_date, :in =\> (Time.now.to\_date - 100.years)…(Time.now.to\_date + 100.years)” (doesn’t seem to for me) i.e. should I be able to “validates\_inclusion\_of” to…

---

## [Subdomain fu woes](https://www.ruby-forum.com/t/subdomain-fu-woes/154006)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [November 24, 2008, 8:52pm UTC](https://www.ruby-forum.com/t/subdomain-fu-woes/154006 "2008-11-24T20:52:12Z")

</div>

I’m using subdomain\_fu successfully and generating subdomain routes like this: rotues.rb: map.city\_root ‘’,:controller =\> ‘cities’, :action =\> ‘index’, :conditions =\> { :subdomain =\> /.+/ } using it in a view: \<%= …

---

## [Math parser?](https://www.ruby-forum.com/t/math-parser/137946)

<div class="topic-metadata">

**Author:** [@emuen](https://www.ruby-forum.com/u/emuen)\
**Replies:** 6\
**Last updated:** [November 24, 2008, 8:17pm UTC](https://www.ruby-forum.com/t/math-parser/137946 "2008-11-24T20:17:34Z")

</div>

HI guys. I need to calculate a string as a math piece. E.i. “100\*500/2.5” Is there a build in parser in the Math class to do this?

---

## [Nested and non-nested resources, and admin restrictions](https://www.ruby-forum.com/t/nested-and-non-nested-resources-and-admin-restrictions/154041)

<div class="topic-metadata">

**Author:** [@nickh](https://www.ruby-forum.com/u/nickh)\
**Replies:** 0\
**Last updated:** [November 24, 2008, 8:14pm UTC](https://www.ruby-forum.com/t/nested-and-non-nested-resources-and-admin-restrictions/154041 "2008-11-24T20:14:35Z")

</div>

This is a fairly long question, but it’s a common one that applies to a lot of applications. Here goes! Many apps have/want a setup similar to this: ModelA has many ModelBs (Eg: User has many Photos). Admins CRUD all…

---

## [Date Comparison Problems](https://www.ruby-forum.com/t/date-comparison-problems/154018)

<div class="topic-metadata">

**Author:** [@cam295](https://www.ruby-forum.com/u/cam295)\
**Replies:** 3\
**Last updated:** [November 24, 2008, 7:47pm UTC](https://www.ruby-forum.com/t/date-comparison-problems/154018 "2008-11-24T19:47:31Z")

</div>

I’m trying to compare two dates (one from a database, and the other is the current date). Here is the code I’m using: if document.nil? "doc\_none" elsif document.status == 'archived' "doc\_archived" elsif document.…

---

## [Save url parameter in a session](https://www.ruby-forum.com/t/save-url-parameter-in-a-session/154000)

<div class="topic-metadata">

**Author:** [@PsionBlue](https://www.ruby-forum.com/u/PsionBlue)\
**Replies:** 3\
**Last updated:** [November 24, 2008, 7:26pm UTC](https://www.ruby-forum.com/t/save-url-parameter-in-a-session/154000 "2008-11-24T19:26:54Z")

</div>

Hi, I am a newb. Lets say I have url ABC Home Page - ABC.com. What I need to do is save the param in the session file but still have it available to other controllers. I can get it to work within one controller with: …

---

## [Checking if Image file exists before displaying it?](https://www.ruby-forum.com/t/checking-if-image-file-exists-before-displaying-it/154035)

<div class="topic-metadata">

**Author:** [@rubylicious](https://www.ruby-forum.com/u/rubylicious)\
**Replies:** 1\
**Last updated:** [November 24, 2008, 7:01pm UTC](https://www.ruby-forum.com/t/checking-if-image-file-exists-before-displaying-it/154035 "2008-11-24T19:01:51Z")

</div>

I want a page to display an image for a record if the image file actually exists. If the file does not exist (newly created record) I want the placeholder image to display. I’ve tried using File.exist? as my condition…

---

## [Updating select attributes on a profile page](https://www.ruby-forum.com/t/updating-select-attributes-on-a-profile-page/153967)

<div class="topic-metadata">

**Author:** [@Bobnation](https://www.ruby-forum.com/u/Bobnation)\
**Replies:** 2\
**Last updated:** [November 24, 2008, 6:54pm UTC](https://www.ruby-forum.com/t/updating-select-attributes-on-a-profile-page/153967 "2008-11-24T18:54:36Z")

</div>

Thanks ahead of time for everyone who will help out with this. I have a profile page for a blog engine I’m writing (because everyone much write a blog engine at some point to learn stuff) and I want to allow members t…

---

## [Call an action via another action](https://www.ruby-forum.com/t/call-an-action-via-another-action/154033)

<div class="topic-metadata">

**Author:** [@AnAnAn](https://www.ruby-forum.com/u/AnAnAn)\
**Replies:** 0\
**Last updated:** [November 24, 2008, 6:41pm UTC](https://www.ruby-forum.com/t/call-an-action-via-another-action/154033 "2008-11-24T18:41:39Z")

</div>

Hi everyone, I have a list of Items that I display in the index action (it’s a complicate index, involving ferret, query building and so on, not only a Items.find(:all)). Now I’ve written a bulk\_edit action that edit…

---

## [Automatically updating the localization dictionaries](https://www.ruby-forum.com/t/automatically-updating-the-localization-dictionaries/154030)

<div class="topic-metadata">

**Author:** [@Karl\_Eklund](https://www.ruby-forum.com/u/Karl_Eklund)\
**Replies:** 0\
**Last updated:** [November 24, 2008, 6:41pm UTC](https://www.ruby-forum.com/t/automatically-updating-the-localization-dictionaries/154030 "2008-11-24T18:41:03Z")

</div>

With gettext-rails, I could do “rake updatepo” to automatically scan my views and controllers for localizable messages and update my .po files. As gettext-rails stopped working with Rails 2.2, I decided to switch to t…

---

## [Architecture/model related question](https://www.ruby-forum.com/t/architecture-model-related-question/154024)

<div class="topic-metadata">

**Author:** [@melvinram](https://www.ruby-forum.com/u/melvinram)\
**Replies:** 0\
**Last updated:** [November 24, 2008, 6:25pm UTC](https://www.ruby-forum.com/t/architecture-model-related-question/154024 "2008-11-24T18:25:45Z")

</div>

I’ve currently got 3 models: User, Lesson and Course The associations are: Lesson belongs\_to Course Course has\_many Lessons Course belongs\_to User User has\_many Courses Now I’m adding a new model for Less…

---

## [File\_column help: want to pass along upload info to next state via form tags](https://www.ruby-forum.com/t/file-column-help-want-to-pass-along-upload-info-to-next-state-via-form-tags/154023)

<div class="topic-metadata">

**Author:** [@salamander](https://www.ruby-forum.com/u/salamander)\
**Replies:** 0\
**Last updated:** [November 24, 2008, 6:25pm UTC](https://www.ruby-forum.com/t/file-column-help-want-to-pass-along-upload-info-to-next-state-via-form-tags/154023 "2008-11-24T18:25:44Z")

</div>

Hello. I have a page in which I inserted the option to upload a file in a form where other kinds of input text fields, check boxes, and radio buttons are being filled/clicked. I followed the steps instructed here, h…

---

## [Using variables as FRAME links](https://www.ruby-forum.com/t/using-variables-as-frame-links/154022)

<div class="topic-metadata">

**Author:** [@jason](https://www.ruby-forum.com/u/jason)\
**Replies:** 0\
**Last updated:** [November 24, 2008, 6:13pm UTC](https://www.ruby-forum.com/t/using-variables-as-frame-links/154022 "2008-11-24T18:13:25Z")

</div>

I have a main page that calls a sub page (see code below) and in the controller I just set link1, link2, and link3 to be some hard coded test pages, but when i view the frames page below all the frames are empty. If I…

---

## [How is the request XML parsed](https://www.ruby-forum.com/t/how-is-the-request-xml-parsed/153897)

<div class="topic-metadata">

**Author:** [@makire](https://www.ruby-forum.com/u/makire)\
**Replies:** 2\
**Last updated:** [November 24, 2008, 6:08pm UTC](https://www.ruby-forum.com/t/how-is-the-request-xml-parsed/153897 "2008-11-24T18:08:42Z")

</div>

Hi all When one sends for example a POST request with an XML body Rails parses this into a hash with a corresponding structure. How is this conversion done and where? Which XML library is used? Any pointers on where …

---

## [Can't seem to map a route as GET for controller/search/term](https://www.ruby-forum.com/t/cant-seem-to-map-a-route-as-get-for-controller-search-term/154016)

<div class="topic-metadata">

**Author:** [@robkuz](https://www.ruby-forum.com/u/robkuz)\
**Replies:** 0\
**Last updated:** [November 24, 2008, 5:22pm UTC](https://www.ruby-forum.com/t/cant-seem-to-map-a-route-as-get-for-controller-search-term/154016 "2008-11-24T17:22:55Z")

</div>

Hi all, I’m making a search features for a record with a keywords field (keywords is a string right now), and my routing is having consistency troubles. What I desire is: localhost:3000/controller/search/:keyword …

---

## [Web service](https://www.ruby-forum.com/t/web-service/153999)

<div class="topic-metadata">

**Author:** [@subhadip](https://www.ruby-forum.com/u/subhadip)\
**Replies:** 1\
**Last updated:** [November 24, 2008, 4:36pm UTC](https://www.ruby-forum.com/t/web-service/153999 "2008-11-24T16:36:14Z")

</div>

Hi, i am creating a server side web service in ruby on rails. but when i am installing gem actionwebservice, its gives an error actionwebservice requires actionpack(=1.13.6,runtime). how this problem will be solved, …

---

## [2.2 Localization problem](https://www.ruby-forum.com/t/2-2-localization-problem/154008)

<div class="topic-metadata">

**Author:** [@giga](https://www.ruby-forum.com/u/giga)\
**Replies:** 0\
**Last updated:** [November 24, 2008, 4:05pm UTC](https://www.ruby-forum.com/t/2-2-localization-problem/154008 "2008-11-24T16:05:05Z")

</div>

I18n.locale = “en” =\> “en” I18n.t ‘date.formats.short’ I18n::MissingInterpolationArgument: interpolation argument count missing in “%b {{count}}” from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/a…

---

## [Rakismet revisited :(](https://www.ruby-forum.com/t/rakismet-revisited/153952)

<div class="topic-metadata">

**Author:** [@Schalk\_N](https://www.ruby-forum.com/u/Schalk_N)\
**Replies:** 10\
**Last updated:** [November 24, 2008, 2:31pm UTC](https://www.ruby-forum.com/t/rakismet-revisited/153952 "2008-11-24T14:31:10Z")

</div>

Hey all, Ok it seems that I got my one app upgraded to 2.1.2 successfully. Yeah! Now, when I try to install the Rakismet plugin I get the following: script/plugin install git://github.com/jfrench/rakismet script/plug…

---

## [Autocomplete in rails](https://www.ruby-forum.com/t/autocomplete-in-rails/153989)

<div class="topic-metadata">

**Author:** [@Pandu](https://www.ruby-forum.com/u/Pandu)\
**Replies:** 1\
**Last updated:** [November 24, 2008, 1:29pm UTC](https://www.ruby-forum.com/t/autocomplete-in-rails/153989 "2008-11-24T13:29:56Z")

</div>

Hai, I am venkat. I am building one application in rails. In that i want to implement autocomplete feature for one of my field (ex: Project name) instead of entering entire name which is already exist. So, please h…

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

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