# Rails

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

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

---

## [Geocoding and XMLRPC](https://www.ruby-forum.com/t/geocoding-and-xmlrpc/136676)

<div class="topic-metadata">

**Author:** [@joel](https://www.ruby-forum.com/u/joel)\
**Replies:** 2\
**Last updated:** [March 16, 2009, 2:19pm UTC](https://www.ruby-forum.com/t/geocoding-and-xmlrpc/136676 "2009-03-16T14:19:06Z")

</div>

Hello people, I’m implementing a geocoding feature in my web app, a classic feature, for showing registered user by location. For this purpose, I’ve inspired myself from the following tutorial : http://earthcode.com/…

---

## [Freelancer in Eindhoven (Netherlands) area](https://www.ruby-forum.com/t/freelancer-in-eindhoven-netherlands-area/162998)

<div class="topic-metadata">

**Author:** [@Harm\_de\_Laat](https://www.ruby-forum.com/u/Harm_de_Laat)\
**Replies:** 0\
**Last updated:** [March 16, 2009, 2:18pm UTC](https://www.ruby-forum.com/t/freelancer-in-eindhoven-netherlands-area/162998 "2009-03-16T14:18:10Z")

</div>

Hi all, For a Ruby on Rails project we are currently looking for a freelance Ruby on Rails developer. We are looking for a developer who can work on-site in our office (Eindhoven area, Netherlands). If you are int…

---

## [File upload](https://www.ruby-forum.com/t/file-upload/162983)

<div class="topic-metadata">

**Author:** [@tanker](https://www.ruby-forum.com/u/tanker)\
**Replies:** 1\
**Last updated:** [March 16, 2009, 2:11pm UTC](https://www.ruby-forum.com/t/file-upload/162983 "2009-03-16T14:11:42Z")

</div>

Hi!!! i’m trying to send file via mails but i can get it work this is my form add your file: when i’m receiving the mail i can see only the path of file for exple C:\\image.gif but i want to send the file it…

---

## [Open social API in ROR](https://www.ruby-forum.com/t/open-social-api-in-ror/162997)

<div class="topic-metadata">

**Author:** [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Replies:** 0\
**Last updated:** [March 16, 2009, 2:08pm UTC](https://www.ruby-forum.com/t/open-social-api-in-ror/162997 "2009-03-16T14:08:22Z")

</div>

Hi, I want to use open social API to integrate my application with Orkut. Is there any one worked on this? Please give me some details about how to do that? Thanks, Tushar

---

## [Reading XML-file + saving to sqlite3 database](https://www.ruby-forum.com/t/reading-xml-file-saving-to-sqlite3-database/162996)

<div class="topic-metadata">

**Author:** [@washi](https://www.ruby-forum.com/u/washi)\
**Replies:** 0\
**Last updated:** [March 16, 2009, 1:46pm UTC](https://www.ruby-forum.com/t/reading-xml-file-saving-to-sqlite3-database/162996 "2009-03-16T13:46:20Z")

</div>

Hi! I’m new with Ruby On Rails, so I don’t really know how I can get this fixed. As a result of a program, I’ve got +/- 20 XML files, and I would like to import them to my sqlite3 database. Each XML-file having it’s …

---

## [ActiveRecord Nested Conditions Improvements Suggestion](https://www.ruby-forum.com/t/activerecord-nested-conditions-improvements-suggestion/162902)

<div class="topic-metadata">

**Author:** [@zyclops](https://www.ruby-forum.com/u/zyclops)\
**Replies:** 2\
**Last updated:** [March 16, 2009, 1:39pm UTC](https://www.ruby-forum.com/t/activerecord-nested-conditions-improvements-suggestion/162902 "2009-03-16T13:39:18Z")

</div>

I’m not satisfied with how rails currently handles finds accross active record models, and want to see if there’s a waywe can improve it. The ability to generate dynamic search criteria from forms that search accross…

---

## [Link\_to to open a website](https://www.ruby-forum.com/t/link-to-to-open-a-website/162979)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [March 16, 2009, 1:17pm UTC](https://www.ruby-forum.com/t/link-to-to-open-a-website/162979 "2009-03-16T13:17:35Z")

</div>

Hello there, I am using the link\_to tag to open a website. I am getting error. I used the following code. \<%= link\_to “click here”,:action =\>“http://www.rubyxml.com” %\> I am getting the following error No route mat…

---

## [How to add extension to routes?](https://www.ruby-forum.com/t/how-to-add-extension-to-routes/162864)

<div class="topic-metadata">

**Author:** [@devbanana](https://www.ruby-forum.com/u/devbanana)\
**Replies:** 2\
**Last updated:** [March 16, 2009, 12:44pm UTC](https://www.ruby-forum.com/t/how-to-add-extension-to-routes/162864 "2009-03-16T12:44:43Z")

</div>

Hi, I noticed that all routes have an alternative format ending in .:format. I tried this out, adding .html to some routes, and it worked. But I wondered how you can add an extension like this automatically to gener…

---

## [If else statments for errors within controller methods](https://www.ruby-forum.com/t/if-else-statments-for-errors-within-controller-methods/162896)

<div class="topic-metadata">

**Author:** [@david](https://www.ruby-forum.com/u/david)\
**Replies:** 2\
**Last updated:** [March 16, 2009, 12:37pm UTC](https://www.ruby-forum.com/t/if-else-statments-for-errors-within-controller-methods/162896 "2009-03-16T12:37:03Z")

</div>

When I first started learning ruby on rails I wrote my controller actions by using if else statements to display error messages in case something failed a validation. Like: if @user.save flash\[:notice\] = “User was sa…

---

## [Group\_by missing items](https://www.ruby-forum.com/t/group-by-missing-items/162982)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 0\
**Last updated:** [March 16, 2009, 12:34pm UTC](https://www.ruby-forum.com/t/group-by-missing-items/162982 "2009-03-16T12:34:41Z")

</div>

I use the acts\_as\_tree plugin, and I try to display a list of the elements w group\_by in my controller … companies = Company.find :all, conditions =\> Company.visible\_by (User.current), :include =\> :parent respond\_…

---

## [Render action in rails 2.3](https://www.ruby-forum.com/t/render-action-in-rails-2-3/162901)

<div class="topic-metadata">

**Author:** [@Zeljko\_Dakic](https://www.ruby-forum.com/u/Zeljko_Dakic)\
**Replies:** 2\
**Last updated:** [March 16, 2009, 12:24pm UTC](https://www.ruby-forum.com/t/render-action-in-rails-2-3/162901 "2009-03-16T12:24:08Z")

</div>

Hi, I might be out of touch with latest features in rails or this might be just simple error on my part. I can’t get this to work in site layout: \<%= render :controller =\> 'site', :action =\> "footer" %\> I need to…

---

## [Advanced search form & Named scopes](https://www.ruby-forum.com/t/advanced-search-form-named-scopes/162964)

<div class="topic-metadata">

**Author:** [@erezbens](https://www.ruby-forum.com/u/erezbens)\
**Replies:** 1\
**Last updated:** [March 16, 2009, 12:24pm UTC](https://www.ruby-forum.com/t/advanced-search-form-named-scopes/162964 "2009-03-16T12:24:08Z")

</div>

I have an Asset model in a Real Estate app See the Search form & Model here: http://www.qcm.co.il/qcme/index.html What is the best way to join all named\_scope(asset\_params) (lines 27…34) to line 36 Thanks Erez

---

## [Question on routes and default routes](https://www.ruby-forum.com/t/question-on-routes-and-default-routes/162910)

<div class="topic-metadata">

**Author:** [@techwiz18](https://www.ruby-forum.com/u/techwiz18)\
**Replies:** 3\
**Last updated:** [March 16, 2009, 12:20pm UTC](https://www.ruby-forum.com/t/question-on-routes-and-default-routes/162910 "2009-03-16T12:20:02Z")

</div>

Say I have a destroy action configured as the following map.foo ‘/foos/:id’, :controller =\> ‘foos’, :action =\> ‘show’, :conditions =\> { :method =\> :get } map.foo ‘/foos/:id’, :controller =\> ‘foos’, :action =\> ‘destroy…

---

## [Variable using problem](https://www.ruby-forum.com/t/variable-using-problem/162967)

<div class="topic-metadata">

**Author:** [@engamocap](https://www.ruby-forum.com/u/engamocap)\
**Replies:** 1\
**Last updated:** [March 16, 2009, 12:18pm UTC](https://www.ruby-forum.com/t/variable-using-problem/162967 "2009-03-16T12:18:17Z")

</div>

I have an array A = \[‘XXX’,‘YYY’,‘ZZZ’,‘RRR’,‘WWW’\] For each element of array I must execute a query on my database. I don’t want write this code: A.each { |elem| case elem when ‘XXX’ do Model.find(:all,:select =\> …

---

## [Parsing arrays from globbed routes into controller](https://www.ruby-forum.com/t/parsing-arrays-from-globbed-routes-into-controller/162938)

<div class="topic-metadata">

**Author:** [@johnsonmlw](https://www.ruby-forum.com/u/johnsonmlw)\
**Replies:** 1\
**Last updated:** [March 16, 2009, 11:10am UTC](https://www.ruby-forum.com/t/parsing-arrays-from-globbed-routes-into-controller/162938 "2009-03-16T11:10:42Z")

</div>

I have this in routes.rb: map.connect ‘pupils/\*filters’, :controller =\> “pupils”, :action =\> “:filter” Given this url, for example: http://localhost:3000/pupils/cohort\_id/1/house\_id/3 I would like to be able to grab…

---

## [Routes.recognize\_path on more complicated Routes](https://www.ruby-forum.com/t/routes-recognize-path-on-more-complicated-routes/162191)

<div class="topic-metadata">

**Author:** [@dannytip](https://www.ruby-forum.com/u/dannytip)\
**Replies:** 2\
**Last updated:** [March 16, 2009, 10:25am UTC](https://www.ruby-forum.com/t/routes-recognize-path-on-more-complicated-routes/162191 "2009-03-16T10:25:49Z")

</div>

For a permissions system i’m writing i’m extending the standard link\_to helpers to check if a user has a permission to perform that action before displaying a link to clean-up my code so i don’t have to put if checks …

---

## [Youtube html extraction](https://www.ruby-forum.com/t/youtube-html-extraction/162970)

<div class="topic-metadata">

**Author:** [@arunvoip](https://www.ruby-forum.com/u/arunvoip)\
**Replies:** 0\
**Last updated:** [March 16, 2009, 10:24am UTC](https://www.ruby-forum.com/t/youtube-html-extraction/162970 "2009-03-16T10:24:20Z")

</div>

I’m building an application using open-uri and hpricot for html contents of a web page. The problem is when i enter the url of youtube ie.‘http://www.youtube.com’ an error is shown stating: /usr/lib/ruby/1.8/open-uri.…

---

## [Problem with AJAX when using passenger](https://www.ruby-forum.com/t/problem-with-ajax-when-using-passenger/162875)

<div class="topic-metadata">

**Author:** [@tkbeili](https://www.ruby-forum.com/u/tkbeili)\
**Replies:** 7\
**Last updated:** [March 16, 2009, 10:14am UTC](https://www.ruby-forum.com/t/problem-with-ajax-when-using-passenger/162875 "2009-03-16T10:14:20Z")

</div>

Hello, I just switched to using Passenger from using Apache/Mongrel cluster. I have an AJAX form: \<% form\_remote\_tag :url =\> {:controller =\> “networks”, :action =\> ‘search’}, :update =\> ‘searchResults’, :loading =\> …

---

## [Problem with a join table having additional data](https://www.ruby-forum.com/t/problem-with-a-join-table-having-additional-data/162963)

<div class="topic-metadata">

**Author:** [@ball](https://www.ruby-forum.com/u/ball)\
**Replies:** 0\
**Last updated:** [March 16, 2009, 10:10am UTC](https://www.ruby-forum.com/t/problem-with-a-join-table-having-additional-data/162963 "2009-03-16T10:10:49Z")

</div>

Hi, I am a very new to both Rails and SQL, and am trying to learn both by using an already established nutrition database. I am stuck on a join table that is a couple layers deep, and I was hoping that someone could …

---

## [Transforming DateTime in this format: Fri Mar 13 13:00:52 -0700 2009](https://www.ruby-forum.com/t/transforming-datetime-in-this-format-fri-mar-13-1352-0700-2009/162843)

<div class="topic-metadata">

**Author:** [@Lee\_DSoSSSSjgi](https://www.ruby-forum.com/u/Lee_DSoSSSSjgi)\
**Replies:** 4\
**Last updated:** [March 16, 2009, 9:32am UTC](https://www.ruby-forum.com/t/transforming-datetime-in-this-format-fri-mar-13-1352-0700-2009/162843 "2009-03-16T09:32:52Z")

</div>

I’m trying to reformat the following DateTime: ‘Fri Mar 13 13:00:52 -0700 2009’ to be ‘2009-03-13 13:00:42’, but can’t quite seem to get it. I’ve tried strftime(’%a %b %d %H %M %S -0700 %Y’) amongst other things and …

---

## [About HAsh in ruby](https://www.ruby-forum.com/t/about-hash-in-ruby/162842)

<div class="topic-metadata">

**Author:** [@nilez](https://www.ruby-forum.com/u/nilez)\
**Replies:** 4\
**Last updated:** [March 16, 2009, 7:50am UTC](https://www.ruby-forum.com/t/about-hash-in-ruby/162842 "2009-03-16T07:50:11Z")

</div>

HI ALL, I want to add values present in hash text\_fields on form after form is displayed. is it possible, how can i do it.

---

## [Unable to observe select\_tag's value](https://www.ruby-forum.com/t/unable-to-observe-select-tags-value/162958)

<div class="topic-metadata">

**Author:** [@Sahil\_D](https://www.ruby-forum.com/u/Sahil_D)\
**Replies:** 0\
**Last updated:** [March 16, 2009, 7:09am UTC](https://www.ruby-forum.com/t/unable-to-observe-select-tags-value/162958 "2009-03-16T07:09:16Z")

</div>

Hi, I am trying to observe a select\_tag’s value, and insert a partial inside the page based on that value. Here’s the code: #index.html.erb \<% form\_tag do %\> \<%= select\_tag ‘product\_id’, options\_from\_collection\_fo…

---

## [Auto Complete in Rails](https://www.ruby-forum.com/t/auto-complete-in-rails/162955)

<div class="topic-metadata">

**Author:** [@charanya](https://www.ruby-forum.com/u/charanya)\
**Replies:** 1\
**Last updated:** [March 16, 2009, 7:08am UTC](https://www.ruby-forum.com/t/auto-complete-in-rails/162955 "2009-03-16T07:08:14Z")

</div>

Hi, I am A newbee to rails.I want to add Auto complete facility in my application.I have installed Autocomplete plugin.And i have added the lines auto\_complete\_for :location,:name in my controller and in my view i …

---

## [Subfolders in models](https://www.ruby-forum.com/t/subfolders-in-models/162951)

<div class="topic-metadata">

**Author:** [@arjackson](https://www.ruby-forum.com/u/arjackson)\
**Replies:** 0\
**Last updated:** [March 16, 2009, 4:25am UTC](https://www.ruby-forum.com/t/subfolders-in-models/162951 "2009-03-16T04:25:03Z")

</div>

Hi all, Not sure if I should ask here or the rails mailing list. Now that we can have app/models work automatically, shouldn’t there be a way to add load\_paths within a plugin’s init.rb, so that I don’t have to use …

---

## [Encryption error](https://www.ruby-forum.com/t/encryption-error/162943)

<div class="topic-metadata">

**Author:** [@mikec](https://www.ruby-forum.com/u/mikec)\
**Replies:** 1\
**Last updated:** [March 16, 2009, 3:02am UTC](https://www.ruby-forum.com/t/encryption-error/162943 "2009-03-16T03:02:01Z")

</div>

I’m using authlogic. On my local machine everything runs fine, but on my production server it’s giving me an error, telling me that crypted\_password can’t be null when I try and create the admin user. I look at the er…

---

## [Trivial rails model q](https://www.ruby-forum.com/t/trivial-rails-model-q/162886)

<div class="topic-metadata">

**Author:** [@tomjerry](https://www.ruby-forum.com/u/tomjerry)\
**Replies:** 3\
**Last updated:** [March 16, 2009, 2:32am UTC](https://www.ruby-forum.com/t/trivial-rails-model-q/162886 "2009-03-16T02:32:12Z")

</div>

hi, new to ruby/rails (where have i been) trying to add a basic static method to a model class… anything besides the normal: def self.method\_name(method\_args) if method\_args == “foo” result = true else result = fa…

---

## [Questions about connection pools](https://www.ruby-forum.com/t/questions-about-connection-pools/162911)

<div class="topic-metadata">

**Author:** [@starmaerker](https://www.ruby-forum.com/u/starmaerker)\
**Replies:** 2\
**Last updated:** [March 16, 2009, 2:28am UTC](https://www.ruby-forum.com/t/questions-about-connection-pools/162911 "2009-03-16T02:28:07Z")

</div>

Hi all, I currently am part of a team writing an app and I’m running into an issue with connection pools. Quick infrastructure overview: Rails 2.2.2, Ruby 1.8.7p72, Apache/ Mongrel, mongrel running single threaded. D…

---

## [Rails Edge?](https://www.ruby-forum.com/t/rails-edge/162944)

<div class="topic-metadata">

**Author:** [@devbanana](https://www.ruby-forum.com/u/devbanana)\
**Replies:** 1\
**Last updated:** [March 16, 2009, 2:14am UTC](https://www.ruby-forum.com/t/rails-edge/162944 "2009-03-16T02:14:05Z")

</div>

Hi, I just started a project with Rails, and am using Git. I thought of keeping the edge of Rails in vendor/rails, especially since I can do so pretty easily with a submodule. However, I wanted to ask how stable the…

---

## [Capistrano deploy errors](https://www.ruby-forum.com/t/capistrano-deploy-errors/162931)

<div class="topic-metadata">

**Author:** [@mikec](https://www.ruby-forum.com/u/mikec)\
**Replies:** 3\
**Last updated:** [March 15, 2009, 11:02pm UTC](https://www.ruby-forum.com/t/capistrano-deploy-errors/162931 "2009-03-15T23:02:45Z")

</div>

Hi, when I do cap deploy:cold I get this error: rake aborted! undefined local variable or method acts\_as\_commentable' for #\<Class: 0x7fa1c34a2f10\> /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active\_record/…

---

## [Link\_to with :method doesn't work for me (newbie)](https://www.ruby-forum.com/t/link-to-with-method-doesnt-work-for-me-newbie/162929)

<div class="topic-metadata">

**Author:** [@jazcyk](https://www.ruby-forum.com/u/jazcyk)\
**Replies:** 1\
**Last updated:** [March 15, 2009, 10:39pm UTC](https://www.ruby-forum.com/t/link-to-with-method-doesnt-work-for-me-newbie/162929 "2009-03-15T22:39:52Z")

</div>

Hi, I have a nice link which I intend to have non-idempotent consequences and so after a quick google I realized I want to use link\_to with the :method =\> :post option. Only problem is that this stubbornly refuses to…

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

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