# Rails

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

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

---

## [Duplicate routes?](https://www.ruby-forum.com/t/duplicate-routes/130951)

<div class="topic-metadata">

**Author:** [@nospacesalloneword](https://www.ruby-forum.com/u/nospacesalloneword)\
**Replies:** 3\
**Last updated:** [March 5, 2008, 12:52pm UTC](https://www.ruby-forum.com/t/duplicate-routes/130951 "2008-03-05T12:52:35Z")

</div>

hi, I am using: map.resources :users, has\_many =\> ‘events’ to route a new app I am working on. Problem is that now, i can view the index action for my events controller at both: localhost:3000/events and localhost:…

---

## [Need Single sign on solution?](https://www.ruby-forum.com/t/need-single-sign-on-solution/197243)

<div class="topic-metadata">

**Author:** [@varunkumargoel](https://www.ruby-forum.com/u/varunkumargoel)\
**Replies:** 0\
**Last updated:** [March 5, 2008, 12:43pm UTC](https://www.ruby-forum.com/t/need-single-sign-on-solution/197243 "2008-03-05T12:43:14Z")

</div>

Hi All, I am doing my site user authentication through LDAP server and my company has 3 more sites with different technologies and they are also doing user authentication through LDAP server. Now we want that when us…

---

## [Dynamic method access from an Object](https://www.ruby-forum.com/t/dynamic-method-access-from-an-object/131015)

<div class="topic-metadata">

**Author:** [@vasan\_cec](https://www.ruby-forum.com/u/vasan_cec)\
**Replies:** 5\
**Last updated:** [March 5, 2008, 12:11pm UTC](https://www.ruby-forum.com/t/dynamic-method-access-from-an-object/131015 "2008-03-05T12:11:46Z")

</div>

Hi Everyone, I have a requirement where the method name of an Object will be generated and accessed dynamically in code. When I tried to access it showed me “undefined method”. Am attaching a sample code of what i wan…

---

## [NoMethodError (undefined method \`to\_sym' for {"6"=\>"1"}:Hash](https://www.ruby-forum.com/t/nomethoderror-undefined-method-to-sym-for-6-1-hash/127094)

<div class="topic-metadata">

**Author:** [@mcampbell](https://www.ruby-forum.com/u/mcampbell)\
**Replies:** 1\
**Last updated:** [March 5, 2008, 11:42am UTC](https://www.ruby-forum.com/t/nomethoderror-undefined-method-to-sym-for-6-1-hash/127094 "2008-03-05T11:42:56Z")

</div>

I’ve got a search form that was working on rails 1.2.6, but since upgrading to 2.0.2, I’m getting this error when I post my form. Here’s the full error: Processing SearchController#results (for 24.173.26.226 at 2008-0…

---

## [Ensuring using database indexes in find-methods with hash-conditions](https://www.ruby-forum.com/t/ensuring-using-database-indexes-in-find-methods-with-hash-conditions/131028)

<div class="topic-metadata">

**Author:** [@Artem\_V](https://www.ruby-forum.com/u/Artem_V)\
**Replies:** 0\
**Last updated:** [March 5, 2008, 10:56am UTC](https://www.ruby-forum.com/t/ensuring-using-database-indexes-in-find-methods-with-hash-conditions/131028 "2008-03-05T10:56:10Z")

</div>

Please give me links If sbj is described anywhere or was already discussed. Whether index is used or not depends on order of conditions in WHERE statement (it was surprise for me; I use mysql). When one uses hash as …

---

## [Possible to apply layouts on pages in public folder](https://www.ruby-forum.com/t/possible-to-apply-layouts-on-pages-in-public-folder/130933)

<div class="topic-metadata">

**Author:** [@Fred\_So](https://www.ruby-forum.com/u/Fred_So)\
**Replies:** 3\
**Last updated:** [March 5, 2008, 9:01am UTC](https://www.ruby-forum.com/t/possible-to-apply-layouts-on-pages-in-public-folder/130933 "2008-03-05T09:01:07Z")

</div>

Is it possible to apply a layout to rhtml files in the public folder? These files are essentially static. I am trying to avoid having to create blank actions/methods for each html files.

---

## [Sessions Not Working In Production Mode](https://www.ruby-forum.com/t/sessions-not-working-in-production-mode/121663)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 8\
**Last updated:** [March 5, 2008, 8:54am UTC](https://www.ruby-forum.com/t/sessions-not-working-in-production-mode/121663 "2008-03-05T08:54:35Z")

</div>

I am completely stumped by this problem, and would welcome any suggestions people could provide. My application uses active-record-based sessions. In development mode, the app works fine with sessions, no problems. Bu…

---

## [Iterating over all the named routes?](https://www.ruby-forum.com/t/iterating-over-all-the-named-routes/130915)

<div class="topic-metadata">

**Author:** [@MohsinHijazee](https://www.ruby-forum.com/u/MohsinHijazee)\
**Replies:** 2\
**Last updated:** [March 5, 2008, 8:24am UTC](https://www.ruby-forum.com/t/iterating-over-all-the-named-routes/130915 "2008-03-05T08:24:28Z")

</div>

Hello! We all know that we expose the resources in the config/routes.rb like this: map.resources :account This create a named url. But how can I iterate through all the available named routes? Regards, Mohsin

---

## [Where did update\_without\_callbacks go?](https://www.ruby-forum.com/t/where-did-update-without-callbacks-go/131000)

<div class="topic-metadata">

**Author:** [@dark-omen](https://www.ruby-forum.com/u/dark-omen)\
**Replies:** 3\
**Last updated:** [March 5, 2008, 8:21am UTC](https://www.ruby-forum.com/t/where-did-update-without-callbacks-go/131000 "2008-03-05T08:21:32Z")

</div>

I recently upgraded one of my apps to rails 2.0.2 and creating a certain object didn’t work. After some debugging, I discovered this exception: undefined method \`update\_without\_callbacks’ for #\<Journal: 0x4fc7048\> w…

---

## [Finding the line of code corresponding to an SQL statement](https://www.ruby-forum.com/t/finding-the-line-of-code-corresponding-to-an-sql-statement/130979)

<div class="topic-metadata">

**Author:** [@jamie](https://www.ruby-forum.com/u/jamie)\
**Replies:** 4\
**Last updated:** [March 5, 2008, 7:15am UTC](https://www.ruby-forum.com/t/finding-the-line-of-code-corresponding-to-an-sql-statement/130979 "2008-03-05T07:15:16Z")

</div>

Wondering if any one has suggestions for changing the log output such that the line of code (and associated file) that resulted in a query is output to the log file when running in the development env. for example: A…

---

## [Multiple db instances for a single ROR Application](https://www.ruby-forum.com/t/multiple-db-instances-for-a-single-ror-application/131012)

<div class="topic-metadata">

**Author:** [@priyasaini](https://www.ruby-forum.com/u/priyasaini)\
**Replies:** 0\
**Last updated:** [March 5, 2008, 7:00am UTC](https://www.ruby-forum.com/t/multiple-db-instances-for-a-single-ror-application/131012 "2008-03-05T07:00:36Z")

</div>

Hi All: We have a Rails application with a production db available to all as a single instance. Now, we want it to be accessible to multiple users with their seperate instance of db, keeping the code same (common) to …

---

## [Set attr\_accessor of active record (indirectly)](https://www.ruby-forum.com/t/set-attr-accessor-of-active-record-indirectly/130992)

<div class="topic-metadata">

**Author:** [@tharrison](https://www.ruby-forum.com/u/tharrison)\
**Replies:** 7\
**Last updated:** [March 5, 2008, 6:26am UTC](https://www.ruby-forum.com/t/set-attr-accessor-of-active-record-indirectly/130992 "2008-03-05T06:26:02Z")

</div>

I have an attr\_accessor for :password set on my user model. If I have a variable “key” whose value is “password” and another variable “value” whose value is “secret”, can I use this to set the :password? I can make i…

---

## ["employee"=\>{"id"=\>"101"}](https://www.ruby-forum.com/t/employee-id-101/130982)

<div class="topic-metadata">

**Author:** [@thriller](https://www.ruby-forum.com/u/thriller)\
**Replies:** 4\
**Last updated:** [March 5, 2008, 5:39am UTC](https://www.ruby-forum.com/t/employee-id-101/130982 "2008-03-05T05:39:47Z")

</div>

I am newbie to ruby as my question reveals. Can anybody help me, please, how to acces id when i get something like “employee”=\>{“id”=\>“101”} in request, thanxs a lot.

---

## [Text\_field\_with\_auto\_complete help](https://www.ruby-forum.com/t/text-field-with-auto-complete-help/130998)

<div class="topic-metadata">

**Author:** [@dino\_d](https://www.ruby-forum.com/u/dino_d)\
**Replies:** 2\
**Last updated:** [March 5, 2008, 5:28am UTC](https://www.ruby-forum.com/t/text-field-with-auto-complete-help/130998 "2008-03-05T05:28:39Z")

</div>

Hi- I am trying to understand how auto\_complete works. The docs don’t tell me what each parameter is, they all assume I know what they are. All I want to do is have a form that contains news stories that you can tag…

---

## [ActiveRecord::Base Collections](https://www.ruby-forum.com/t/activerecord-base-collections/130991)

<div class="topic-metadata">

**Author:** [@edmz](https://www.ruby-forum.com/u/edmz)\
**Replies:** 2\
**Last updated:** [March 5, 2008, 5:07am UTC](https://www.ruby-forum.com/t/activerecord-base-collections/130991 "2008-03-05T05:07:41Z")

</div>

I have two entities (Department and Project) that extends ActiveRecord::Base. The department is mapped to have many projects. When i make a query using the find(:all) (Department.find(:all)), i get a collection of th…

---

## [Capistrano on media temple - uploaded files deleting](https://www.ruby-forum.com/t/capistrano-on-media-temple-uploaded-files-deleting/131007)

<div class="topic-metadata">

**Author:** [@jimmypalmer](https://www.ruby-forum.com/u/jimmypalmer)\
**Replies:** 0\
**Last updated:** [March 5, 2008, 4:51am UTC](https://www.ruby-forum.com/t/capistrano-on-media-temple-uploaded-files-deleting/131007 "2008-03-05T04:51:08Z")

</div>

I’m using capistrano on media temple and I have files that I’m uploading. Every time I deploy capistrano is getting a new version which wipes out my uploaded files. I found this: http://blog.vixiom.com/2007/03/13/st…

---

## [How/where to declare a global data structure?](https://www.ruby-forum.com/t/how-where-to-declare-a-global-data-structure/130965)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [March 5, 2008, 4:31am UTC](https://www.ruby-forum.com/t/how-where-to-declare-a-global-data-structure/130965 "2008-03-05T04:31:45Z")

</div>

I’d like to read a custom config file into a hash at rails startup and have access to this hash from my controller actions. I wrote a sub to create the hash in my application controller (wrong place?) but I’m having t…

---

## [Sending SMS from rails](https://www.ruby-forum.com/t/sending-sms-from-rails/130719)

<div class="topic-metadata">

**Author:** [@ANSS](https://www.ruby-forum.com/u/ANSS)\
**Replies:** 11\
**Last updated:** [March 5, 2008, 4:17am UTC](https://www.ruby-forum.com/t/sending-sms-from-rails/130719 "2008-03-05T04:17:06Z")

</div>

Hi, I’m relatively new to rails so I’m sorry if this question seems ridiculous! I’m creating an application to send SMS messages, I got a gateway URL like: http://www.domain.com/sendsms/sendsms.asp?username=xxxx&pas…

---

## [Writing form hash data to a model](https://www.ruby-forum.com/t/writing-form-hash-data-to-a-model/130958)

<div class="topic-metadata">

**Author:** [@jack](https://www.ruby-forum.com/u/jack)\
**Replies:** 3\
**Last updated:** [March 5, 2008, 3:42am UTC](https://www.ruby-forum.com/t/writing-form-hash-data-to-a-model/130958 "2008-03-05T03:42:26Z")

</div>

I’m trying to take form data and put it into a model variable without using ActiveRecord’s features (save, create, update\_attributes, etc.) that would write the record out to a database. So I’ve written a method like …

---

## [Generate authenticated user error](https://www.ruby-forum.com/t/generate-authenticated-user-error/131003)

<div class="topic-metadata">

**Author:** [@capslock118](https://www.ruby-forum.com/u/capslock118)\
**Replies:** 0\
**Last updated:** [March 5, 2008, 3:36am UTC](https://www.ruby-forum.com/t/generate-authenticated-user-error/131003 "2008-03-05T03:36:53Z")

</div>

I am pulling my teeth out over here. It makes sense that the second step in setting something (role\_requirements in this case) I have problems - thats just how I roll…pun intended! I run this: ruby script/generate …

---

## [Newbea question again?](https://www.ruby-forum.com/t/newbea-question-again/131002)

<div class="topic-metadata">

**Author:** [@casid](https://www.ruby-forum.com/u/casid)\
**Replies:** 0\
**Last updated:** [March 5, 2008, 3:30am UTC](https://www.ruby-forum.com/t/newbea-question-again/131002 "2008-03-05T03:30:13Z")

</div>

Hello RoR Developers, I have tiny problem about comparison. I have a array and hash. I want to compare array elements with hash keys. more details: this is my hash, I create it from yaml file my yaml file template1…

---

## [Chronic parse problem?](https://www.ruby-forum.com/t/chronic-parse-problem/129698)

<div class="topic-metadata">

**Author:** [@cal](https://www.ruby-forum.com/u/cal)\
**Replies:** 1\
**Last updated:** [March 5, 2008, 2:56am UTC](https://www.ruby-forum.com/t/chronic-parse-problem/129698 "2008-03-05T02:56:38Z")

</div>

Hi all, Using the Chronic.parse method, I see some weird behavior. Perhaps someone can set me straight or confirm that it is indeed weird. Note that the date changes to one day earlier in the last example below. Si…

---

## [Render :collection and :partial](https://www.ruby-forum.com/t/render-collection-and-partial/130986)

<div class="topic-metadata">

**Author:** [@Pito](https://www.ruby-forum.com/u/Pito)\
**Replies:** 3\
**Last updated:** [March 5, 2008, 2:38am UTC](https://www.ruby-forum.com/t/render-collection-and-partial/130986 "2008-03-05T02:38:27Z")

</div>

Does the :collection option on render only work with :partials? Or can I call render :collection directly from a controller against a normal (non-partial) template? I couldn’t get it to work but maybe I am missing som…

---

## [Action Mailer throwing underscores on template name](https://www.ruby-forum.com/t/action-mailer-throwing-underscores-on-template-name/130978)

<div class="topic-metadata">

**Author:** [@starmaerker](https://www.ruby-forum.com/u/starmaerker)\
**Replies:** 2\
**Last updated:** [March 5, 2008, 2:20am UTC](https://www.ruby-forum.com/t/action-mailer-throwing-underscores-on-template-name/130978 "2008-03-05T02:20:52Z")

</div>

I’ve recently run into a problem with one of my applications that refuses to send emails using ActionMailer. Looking at the log, it become obvious what’s happening, the system is looking for templates with underscores…

---

## [On Nginx, images 30k+ sometimes load](https://www.ruby-forum.com/t/on-nginx-images-30k-sometimes-load/130997)

<div class="topic-metadata">

**Author:** [@eddiewould](https://www.ruby-forum.com/u/eddiewould)\
**Replies:** 0\
**Last updated:** [March 5, 2008, 2:16am UTC](https://www.ruby-forum.com/t/on-nginx-images-30k-sometimes-load/130997 "2008-03-05T02:16:53Z")

</div>

and sometimes load only 10-30 percent… i am on nginx v 4.13\*, with these configs: http://pastie.caboo.se/161542 has anyone experienced this? \*yes, i must upgrade, though ubuntu’s apt-get packages have not updated fo…

---

## [Amazon WS 3.0 Deprecation](https://www.ruby-forum.com/t/amazon-ws-3-0-deprecation/130994)

<div class="topic-metadata">

**Author:** [@grayson](https://www.ruby-forum.com/u/grayson)\
**Replies:** 0\
**Last updated:** [March 5, 2008, 1:53am UTC](https://www.ruby-forum.com/t/amazon-ws-3-0-deprecation/130994 "2008-03-05T01:53:06Z")

</div>

Hello, Not sure if this is the best place to ask but does anyone know of a Rail plugin that works with the new Amazon ECS 4.0? Here is the deprecation notice / migration guide http://developer.amazonwebservices.com/…

---

## [Named collection forward fetching](https://www.ruby-forum.com/t/named-collection-forward-fetching/130955)

<div class="topic-metadata">

**Author:** [@grayson](https://www.ruby-forum.com/u/grayson)\
**Replies:** 4\
**Last updated:** [March 5, 2008, 1:45am UTC](https://www.ruby-forum.com/t/named-collection-forward-fetching/130955 "2008-03-05T01:45:54Z")

</div>

Hello, I’m getting an “NoMethodError” traversing a named collection. Let me explain I have a named collection called best\_friend in a class called user def self.best\_friend find :all, :conditions =\> “designation = …

---

## [\[PATCH\] Compiling libev on Ubuntu Edgy Eft](https://www.ruby-forum.com/t/patch-compiling-libev-on-ubuntu-edgy-eft/130988)

<div class="topic-metadata">

**Author:** [@michael.dauria](https://www.ruby-forum.com/u/michael.dauria)\
**Replies:** 0\
**Last updated:** [March 5, 2008, 12:20am UTC](https://www.ruby-forum.com/t/patch-compiling-libev-on-ubuntu-edgy-eft/130988 "2008-03-05T00:20:02Z")

</div>

On Ubuntu Edy Eft sys/inotify.h does not define IN\_DONT\_FOLLOW (however linux/inotify.h does), so adding the check below will circumvent compilation errors. diff --git a/src/extconf.rb b/src/extconf.rb index 2175fab……

---

## [Help with RailRoad](https://www.ruby-forum.com/t/help-with-railroad/130989)

<div class="topic-metadata">

**Author:** [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Replies:** 0\
**Last updated:** [March 5, 2008, 12:20am UTC](https://www.ruby-forum.com/t/help-with-railroad/130989 "2008-03-05T00:20:00Z")

</div>

When I run this code I don’t hace any problem: railroad -a -i -o full\_models.dot -C But if run this code: railroad -a -i -o full\_models.dot -M I get this: /Users/juan/Desktop/dticket\_4\_03\_08/vendor/rails/activerecor…

---

## [No controllers visible in url](https://www.ruby-forum.com/t/no-controllers-visible-in-url/130974)

<div class="topic-metadata">

**Author:** [@remco](https://www.ruby-forum.com/u/remco)\
**Replies:** 1\
**Last updated:** [March 4, 2008, 11:00pm UTC](https://www.ruby-forum.com/t/no-controllers-visible-in-url/130974 "2008-03-04T23:00:51Z")

</div>

Hi, I have the url, describes below. continent/europa/countries/spain/city/barcelona Continent, countries and city are my controllers. Question how can i realize the url(no contollers visible in url) /europa/spain/b…

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

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