# Rails

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

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

---

## [Nesting elements inside a generate \<a\> tag through link\_to](https://www.ruby-forum.com/t/nesting-elements-inside-a-generate-a-tag-through-link-to/132777)

<div class="topic-metadata">

**Author:** [@RoR\_pal\_0001](https://www.ruby-forum.com/u/RoR_pal_0001)\
**Replies:** 1\
**Last updated:** [March 24, 2008, 5:37pm UTC](https://www.ruby-forum.com/t/nesting-elements-inside-a-generate-a-tag-through-link-to/132777 "2008-03-24T17:37:22Z")

</div>

Hi all, I’ve just recently started developing on Rails, just this month. I have a simple question that I can’t find the answer to elsewhere; I’m using the link\_to\_remote directive which generates an anchor tag. I’d l…

---

## [Problem with link\_to\_remote](https://www.ruby-forum.com/t/problem-with-link-to-remote/132736)

<div class="topic-metadata">

**Author:** [@vapor](https://www.ruby-forum.com/u/vapor)\
**Replies:** 3\
**Last updated:** [March 24, 2008, 4:52pm UTC](https://www.ruby-forum.com/t/problem-with-link-to-remote/132736 "2008-03-24T16:52:31Z")

</div>

link\_to\_remote is passing :action as id and :id as action… I have following in view… \<%= link\_to\_remote ‘Hello’, :update =\> ‘list’, :url =\> {:action =\> ‘hello’, :id =\> project.id} %\> and in log, I get this… Paramete…

---

## [Create single .pot file across mult. directories w/ gettext](https://www.ruby-forum.com/t/create-single-pot-file-across-mult-directories-w-gettext/132769)

<div class="topic-metadata">

**Author:** [@max-lapshin](https://www.ruby-forum.com/u/max-lapshin)\
**Replies:** 0\
**Last updated:** [March 24, 2008, 4:08pm UTC](https://www.ruby-forum.com/t/create-single-pot-file-across-mult-directories-w-gettext/132769 "2008-03-24T16:08:34Z")

</div>

Using rgettext -o app.pot, I’m able to create a .pot file from any source files in a particular directory. I’ve thus far been unable to consolidate, for example, views from multiple controllers in to one, convenient …

---

## [Need help with gettext](https://www.ruby-forum.com/t/need-help-with-gettext/61921)

<div class="topic-metadata">

**Author:** [@orotone](https://www.ruby-forum.com/u/orotone)\
**Replies:** 1\
**Last updated:** [March 24, 2008, 4:01pm UTC](https://www.ruby-forum.com/t/need-help-with-gettext/61921 "2008-03-24T16:01:26Z")

</div>

I’m following the wiki instructions for using gettext: http://manuals.rubyonrails.com/read/chapter/105 I run ‘rake updatepo’ and it creates a myapp.pot file in rails\_root/po. I then create a sub-directory (rails\_roo…

---

## [Interesting problem](https://www.ruby-forum.com/t/interesting-problem/132765)

<div class="topic-metadata">

**Author:** [@sjglazer](https://www.ruby-forum.com/u/sjglazer)\
**Replies:** 0\
**Last updated:** [March 24, 2008, 3:40pm UTC](https://www.ruby-forum.com/t/interesting-problem/132765 "2008-03-24T15:40:11Z")

</div>

Hi there everybody, I am a few weeks into my first ROR project and have across a problem I was hoping someone could offer some help with. I have a database that stores restaurants and I am keeping the delivery hours f…

---

## [ActionController::InvalidAuthenticityToken not thrown in Windows](https://www.ruby-forum.com/t/actioncontroller-invalidauthenticitytoken-not-thrown-in-windows/132658)

<div class="topic-metadata">

**Author:** [@apramanik](https://www.ruby-forum.com/u/apramanik)\
**Replies:** 3\
**Last updated:** [March 24, 2008, 3:12pm UTC](https://www.ruby-forum.com/t/actioncontroller-invalidauthenticitytoken-not-thrown-in-windows/132658 "2008-03-24T15:12:56Z")

</div>

Hi all, I’m getting some weird behavior. I’m developing on two machines, one with os x and the other with windows xp. I was testing one of my registration forms and it worked fine when mongrel\_rails was run on the wi…

---

## [Multi polymorphic relationship?](https://www.ruby-forum.com/t/multi-polymorphic-relationship/132657)

<div class="topic-metadata">

**Author:** [@rubynuby](https://www.ruby-forum.com/u/rubynuby)\
**Replies:** 3\
**Last updated:** [March 24, 2008, 3:06pm UTC](https://www.ruby-forum.com/t/multi-polymorphic-relationship/132657 "2008-03-24T15:06:25Z")

</div>

In my app, I want to let users mark various relationship between them and other users and objects. Example john selects mary as favorite user john selects mary as featured user of the month john puts mary in bookmar…

---

## [Map.namespace :xxx =\> no xxx\_url() available?](https://www.ruby-forum.com/t/map-namespace-xxx-no-xxx-url-available/132759)

<div class="topic-metadata">

**Author:** [@josh](https://www.ruby-forum.com/u/josh)\
**Replies:** 0\
**Last updated:** [March 24, 2008, 2:27pm UTC](https://www.ruby-forum.com/t/map-namespace-xxx-no-xxx-url-available/132759 "2008-03-24T14:27:35Z")

</div>

Hi all! I have the following URL structure: /informations # Just a normal controller without any scaffolding functionality /informations/encyclopedia # Another normal controller /informations/news # A scaffold contr…

---

## [Custom actions with RESTful controllers - is this right?](https://www.ruby-forum.com/t/custom-actions-with-restful-controllers-is-this-right/132721)

<div class="topic-metadata">

**Author:** [@yardboy](https://www.ruby-forum.com/u/yardboy)\
**Replies:** 3\
**Last updated:** [March 24, 2008, 2:02pm UTC](https://www.ruby-forum.com/t/custom-actions-with-restful-controllers-is-this-right/132721 "2008-03-24T14:02:46Z")

</div>

I was having some problems with custom actions in my controllers for RESTful resources. For instance, in my controller I have the following: class VotersController \< ApplicationController def mark\_duplicates blah en…

---

## [Ajax call\_remote](https://www.ruby-forum.com/t/ajax-call-remote/132703)

<div class="topic-metadata">

**Author:** [@johnlester](https://www.ruby-forum.com/u/johnlester)\
**Replies:** 3\
**Last updated:** [March 24, 2008, 1:52pm UTC](https://www.ruby-forum.com/t/ajax-call-remote/132703 "2008-03-24T13:52:35Z")

</div>

Hello, is there something like a “call\_remote” ? I would like to execute an RJS template after a page is loaded so that it sets up the screen’s hidden fields as required when Ajax is in play. (I don’t want to make cer…

---

## [RJS to change image on submit button](https://www.ruby-forum.com/t/rjs-to-change-image-on-submit-button/132686)

<div class="topic-metadata">

**Author:** [@johnlester](https://www.ruby-forum.com/u/johnlester)\
**Replies:** 3\
**Last updated:** [March 24, 2008, 1:42pm UTC](https://www.ruby-forum.com/t/rjs-to-change-image-on-submit-button/132686 "2008-03-24T13:42:58Z")

</div>

Hi I have an observer that fires on the basis of a drop-down. I need to change the icon on the submit button of a form based on this value. I created the submit button using “image\_submit\_tag”. I have it working with …

---

## [Webcam:chat BDSM female group](https://www.ruby-forum.com/t/webcam-chat-bdsm-female-group/132754)

<div class="topic-metadata">

**Author:** [@Verona\_dsm](https://www.ruby-forum.com/u/Verona_dsm)\
**Replies:** 0\
**Last updated:** [March 24, 2008, 1:41pm UTC](https://www.ruby-forum.com/t/webcam-chat-bdsm-female-group/132754 "2008-03-24T13:41:08Z")

</div>

Webcam:chat BDSM female group http://adultfinderdating.0catch.com/swing.html

---

## [Javascript\_tag](https://www.ruby-forum.com/t/javascript-tag/132750)

<div class="topic-metadata">

**Author:** [@joel](https://www.ruby-forum.com/u/joel)\
**Replies:** 1\
**Last updated:** [March 24, 2008, 1:24pm UTC](https://www.ruby-forum.com/t/javascript-tag/132750 "2008-03-24T13:24:02Z")

</div>

Hi ! I’m a newbie to rails. I’m trying to add javascript tags to my view the following way : @events.each do |e| \[...\] %(javascript\_tag 'new Popup(‘event\_popup\_#{e.id}’,‘event\_link\_#{e.id}’)’) \[…\] end This c…

---

## [Camparing table and instance of another table](https://www.ruby-forum.com/t/camparing-table-and-instance-of-another-table/132751)

<div class="topic-metadata">

**Author:** [@katsuo](https://www.ruby-forum.com/u/katsuo)\
**Replies:** 0\
**Last updated:** [March 24, 2008, 12:52pm UTC](https://www.ruby-forum.com/t/camparing-table-and-instance-of-another-table/132751 "2008-03-24T12:52:52Z")

</div>

Hi, I did the following to compare two tables, products and orders using LEFT OUTER JOIN. It came out fine. However, I am not sure how to do the similar join if the products are an array. For example, there is another…

---

## [Need a simple graph example on ruby](https://www.ruby-forum.com/t/need-a-simple-graph-example-on-ruby/132746)

<div class="topic-metadata">

**Author:** [@dibyendu](https://www.ruby-forum.com/u/dibyendu)\
**Replies:** 6\
**Last updated:** [March 24, 2008, 12:02pm UTC](https://www.ruby-forum.com/t/need-a-simple-graph-example-on-ruby/132746 "2008-03-24T12:02:10Z")

</div>

Can anyone provide me a simple graph example on ruby Say I have a table with two columns like this : Age Number of people 1-20 35 21-40 48 41-60 22 61-80 18 Can anyone tell me, STEP BY STEP …

---

## [Observe\_field](https://www.ruby-forum.com/t/observe-field/132727)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 2\
**Last updated:** [March 24, 2008, 11:34am UTC](https://www.ruby-forum.com/t/observe-field/132727 "2008-03-24T11:34:25Z")

</div>

Hi I have in the controller def sd\_activity\_attach\_file @sd\_activity=ServiceDeskActivity.new(params\[:sd\_activity\]) @sd\_activity.save @sd\_activity\_attachment=ServiceDeskActivityAttachment.new(params\[:sd\_activity\_atta…

---

## [Rescue unique constraint in the model](https://www.ruby-forum.com/t/rescue-unique-constraint-in-the-model/132748)

<div class="topic-metadata">

**Author:** [@tatyree](https://www.ruby-forum.com/u/tatyree)\
**Replies:** 0\
**Last updated:** [March 24, 2008, 11:31am UTC](https://www.ruby-forum.com/t/rescue-unique-constraint-in-the-model/132748 "2008-03-24T11:31:32Z")

</div>

Hi, I’m trying to validate the uniqueness of a value in a model where a user has\_one item. When the record is created, this isn’t a problem as I just use validate\_uniqueness\_of. However, on update, I need to be abl…

---

## [Undefined method \`parse\_query\_parameters' for ActionController::CgiRequest:Class](https://www.ruby-forum.com/t/undefined-method-parse-query-parameters-for-actioncontroller-class/132747)

<div class="topic-metadata">

**Author:** [@stubbsuk](https://www.ruby-forum.com/u/stubbsuk)\
**Replies:** 0\
**Last updated:** [March 24, 2008, 10:50am UTC](https://www.ruby-forum.com/t/undefined-method-parse-query-parameters-for-actioncontroller-class/132747 "2008-03-24T10:50:15Z")

</div>

I’ve just deployed an update to one of my sites, and now I get this error in the production log. The update was just a simple update to one of the erb templates, adding a link to the sites blog. I’ve tried rolling the…

---

## [How should i use rspec to test these code](https://www.ruby-forum.com/t/how-should-i-use-rspec-to-test-these-code/132741)

<div class="topic-metadata">

**Author:** [@nathan\_wu](https://www.ruby-forum.com/u/nathan_wu)\
**Replies:** 0\
**Last updated:** [March 24, 2008, 9:47am UTC](https://www.ruby-forum.com/t/how-should-i-use-rspec-to-test-these-code/132741 "2008-03-24T09:47:56Z")

</div>

ids = Category.find(:all).map(&:id)

---

## [Calling controller function from model private method](https://www.ruby-forum.com/t/calling-controller-function-from-model-private-method/132735)

<div class="topic-metadata">

**Author:** [@sgudibanda](https://www.ruby-forum.com/u/sgudibanda)\
**Replies:** 2\
**Last updated:** [March 24, 2008, 9:43am UTC](https://www.ruby-forum.com/t/calling-controller-function-from-model-private-method/132735 "2008-03-24T09:43:50Z")

</div>

Hi, I have private methods written in my user model. I have schedule crontab to execute these methods like: ruby -e production “User.private\_function” But now i will have to either access global variable of the appli…

---

## [\[ANN\] singapore.rb meeting for March 2008](https://www.ruby-forum.com/t/ann-singapore-rb-meeting-for-march-2008/132739)

<div class="topic-metadata">

**Author:** [@douglas](https://www.ruby-forum.com/u/douglas)\
**Replies:** 0\
**Last updated:** [March 24, 2008, 9:11am UTC](https://www.ruby-forum.com/t/ann-singapore-rb-meeting-for-march-2008/132739 "2008-03-24T09:11:29Z")

</div>

Hi folks, Please take note of the details for the next singapore.rb meeting in March 2007. The brief: it will be held on the 27th of March at Singapore Management University, SIS from 7:30pm. Arun Thampi will be talk…

---

## [Mephisto with rails 1.2.5](https://www.ruby-forum.com/t/mephisto-with-rails-1-2-5/132725)

<div class="topic-metadata">

**Author:** [@dhaval\_parikh33](https://www.ruby-forum.com/u/dhaval_parikh33)\
**Replies:** 2\
**Last updated:** [March 24, 2008, 5:43am UTC](https://www.ruby-forum.com/t/mephisto-with-rails-1-2-5/132725 "2008-03-24T05:43:35Z")

</div>

hi all I have rails 1.2.5 installed on my server and I want to configure mephisto there…Now the thing is that I found out that mephisto requires rails 1.2.3 and rake version 0.7.3 So when i do that on local it works …

---

## [NameError on accessing Active Record from the controller with Rails 2.0.2](https://www.ruby-forum.com/t/nameerror-on-accessing-active-record-from-the-controller-with-rails-2-0-2/132723)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [March 24, 2008, 5:43am UTC](https://www.ruby-forum.com/t/nameerror-on-accessing-active-record-from-the-controller-with-rails-2-0-2/132723 "2008-03-24T05:43:25Z")

</div>

I get following error on accessing ActiveRecord from the controller, log\\development.log NameError (uninitialized constant ProductsController::Question): c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ active\_…

---

## [Get associated attribute using to\_json method](https://www.ruby-forum.com/t/get-associated-attribute-using-to-json-method/132631)

<div class="topic-metadata">

**Author:** [@infinit](https://www.ruby-forum.com/u/infinit)\
**Replies:** 1\
**Last updated:** [March 24, 2008, 3:50am UTC](https://www.ruby-forum.com/t/get-associated-attribute-using-to-json-method/132631 "2008-03-24T03:50:23Z")

</div>

Hi all, I hv the following model: class User \< ActiveRecord::Base has\_and\_belongs\_to\_many :roles def user\_role self.roles end end class Role \< ActiveRecord::Base has\_and\_belongs\_to\_many :users end When I run t…

---

## [Passing arguments from database? Not sure what to call this](https://www.ruby-forum.com/t/passing-arguments-from-database-not-sure-what-to-call-this/132724)

<div class="topic-metadata">

**Author:** [@ramontayag](https://www.ruby-forum.com/u/ramontayag)\
**Replies:** 0\
**Last updated:** [March 24, 2008, 3:49am UTC](https://www.ruby-forum.com/t/passing-arguments-from-database-not-sure-what-to-call-this/132724 "2008-03-24T03:49:33Z")

</div>

Hi everyone. i want to be able to do this: Parked at Loopia - pass args into a plugin but these args are read from the database. This way, I could have different settings (like the path it was saved) per attachment, …

---

## [Need help using will\_paginate with tagging](https://www.ruby-forum.com/t/need-help-using-will-paginate-with-tagging/132694)

<div class="topic-metadata">

**Author:** [@vince](https://www.ruby-forum.com/u/vince)\
**Replies:** 1\
**Last updated:** [March 24, 2008, 3:35am UTC](https://www.ruby-forum.com/t/need-help-using-will-paginate-with-tagging/132694 "2008-03-24T03:35:28Z")

</div>

I have a simple tagging system: places(id, title) taggings(id, place\_id, tag\_id) tags(id, title) I can do the following sql to find places that are tagged as ‘cheap’ AND tagged as ‘sushi’: select \* from places inne…

---

## [Form.select with images](https://www.ruby-forum.com/t/form-select-with-images/132689)

<div class="topic-metadata">

**Author:** [@johnlester](https://www.ruby-forum.com/u/johnlester)\
**Replies:** 1\
**Last updated:** [March 24, 2008, 3:29am UTC](https://www.ruby-forum.com/t/form-select-with-images/132689 "2008-03-24T03:29:42Z")

</div>

Hi, Is it possible to use form.select in such a way that the selection values are images rather than text ? I currently use an array like so \<%= form.select :card\_type, \[ \[ “display\_name\_1”, :value\_1 \], \[ “display\_…

---

## [Views losing values of Controller instance variables](https://www.ruby-forum.com/t/views-losing-values-of-controller-instance-variables/132708)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [March 24, 2008, 3:23am UTC](https://www.ruby-forum.com/t/views-losing-values-of-controller-instance-variables/132708 "2008-03-24T03:23:22Z")

</div>

Since moving my app from local to my host (and moving from development to production) I’ve run into some very odd issues. I’ve searched around for the past day or so and can’t find anything to answer my query! So I’…

---

## [Alphanumeric id](https://www.ruby-forum.com/t/alphanumeric-id/132706)

<div class="topic-metadata">

**Author:** [@William\_Fawcett](https://www.ruby-forum.com/u/William_Fawcett)\
**Replies:** 2\
**Last updated:** [March 24, 2008, 2:50am UTC](https://www.ruby-forum.com/t/alphanumeric-id/132706 "2008-03-24T02:50:20Z")

</div>

I am working on a ticketing system, and the client has requested a special format for a ticket id the format would be alphanumeric with a 3 character client tag, date, then a incremental number for the day, for exampl…

---

## [Nested get\_cache](https://www.ruby-forum.com/t/nested-get-cache/132719)

<div class="topic-metadata">

**Author:** [@grayson](https://www.ruby-forum.com/u/grayson)\
**Replies:** 0\
**Last updated:** [March 24, 2008, 12:38am UTC](https://www.ruby-forum.com/t/nested-get-cache/132719 "2008-03-24T00:38:53Z")

</div>

Following this advise I’m trying to do a nested get\_cache. http://lists.danga.com/pipermail/memcached/2007-July/004581.html Forum.get\_cache(185).users works fine and gives me back a list of users however these users d…

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

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