# Rails

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

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

---

## [Finding elements with hpricot/nokogiri](https://www.ruby-forum.com/t/finding-elements-with-hpricot-nokogiri/175829)

<div class="topic-metadata">

**Author:** [@david](https://www.ruby-forum.com/u/david)\
**Replies:** 1\
**Last updated:** [September 23, 2009, 2:58am UTC](https://www.ruby-forum.com/t/finding-elements-with-hpricot-nokogiri/175829 "2009-09-23T02:58:41Z")

</div>

I am attempting to parse a wiktionary entry to retrieve all english definitions. I am able to retrive all definitions, the problem is that some definitions are in other languages. What I would like to do is somehow …

---

## [EXTJS + drag and drop](https://www.ruby-forum.com/t/extjs-drag-and-drop/175949)

<div class="topic-metadata">

**Author:** [@Abhishek\_shukla](https://www.ruby-forum.com/u/Abhishek_shukla)\
**Replies:** 0\
**Last updated:** [September 23, 2009, 2:17am UTC](https://www.ruby-forum.com/t/extjs-drag-and-drop/175949 "2009-09-23T02:17:41Z")

</div>

Hello friends I need to configure the extjs drag and drop but somehow i am not able to display it. my controller contains the following code def index respond\_to do |format| format.html format.ext\_json { render :…

---

## [AR update and save child based on change in parent](https://www.ruby-forum.com/t/ar-update-and-save-child-based-on-change-in-parent/175932)

<div class="topic-metadata">

**Author:** [@S-gw](https://www.ruby-forum.com/u/S-gw)\
**Replies:** 1\
**Last updated:** [September 23, 2009, 1:06am UTC](https://www.ruby-forum.com/t/ar-update-and-save-child-based-on-change-in-parent/175932 "2009-09-23T01:06:13Z")

</div>

I thought this would be straightforward, but I’m missing something class User \< AR::Base has\_one :profile, :dependent =\> :destroy end class Profile \< AR::Base belongs\_to :user end Based on a field change in User, …

---

## [\[JOBS\] Ruby50 Jobs available (http://blog.ruby50.com)](https://www.ruby-forum.com/t/jobs-ruby50-jobs-available-http-blog-ruby50-com/175936)

<div class="topic-metadata">

**Author:** [@Darragh\_Browne](https://www.ruby-forum.com/u/Darragh_Browne)\
**Replies:** 0\
**Last updated:** [September 23, 2009, 12:57am UTC](https://www.ruby-forum.com/t/jobs-ruby50-jobs-available-http-blog-ruby50-com/175936 "2009-09-23T00:57:58Z")

</div>

Hi guys, We have a number of UK based rails jobs available. We are not just another recruiter but really a bunch of developers who found it hard to find guys for our sister company Dynamic50. We decided to set up rub…

---

## [Nested Tabs...help required](https://www.ruby-forum.com/t/nested-tabs-help-required/175924)

<div class="topic-metadata">

**Author:** [@prionko](https://www.ruby-forum.com/u/prionko)\
**Replies:** 1\
**Last updated:** [September 23, 2009, 12:37am UTC](https://www.ruby-forum.com/t/nested-tabs-help-required/175924 "2009-09-23T00:37:27Z")

</div>

Hi, For the rails app I am building, I need to have the feature of nested tabs. I need the feature to be something like this… say I have three controllers product, category and buyer controller. All these controllers…

---

## [Canceling onclick for link\_to\_remote within div](https://www.ruby-forum.com/t/canceling-onclick-for-link-to-remote-within-div/175930)

<div class="topic-metadata">

**Author:** [@david](https://www.ruby-forum.com/u/david)\
**Replies:** 0\
**Last updated:** [September 23, 2009, 12:33am UTC](https://www.ruby-forum.com/t/canceling-onclick-for-link-to-remote-within-div/175930 "2009-09-23T00:33:21Z")

</div>

If i have a div with an onclick event and a link\_to\_remote within this div, is there a way to cancel the onclick event when the link is clicked? I know one way is to cancel the event propigation with something like E…

---

## [Passing a named\_scope through a named\_route](https://www.ruby-forum.com/t/passing-a-named-scope-through-a-named-route/175931)

<div class="topic-metadata">

**Author:** [@Bob\_O](https://www.ruby-forum.com/u/Bob_O)\
**Replies:** 0\
**Last updated:** [September 23, 2009, 12:29am UTC](https://www.ruby-forum.com/t/passing-a-named-scope-through-a-named-route/175931 "2009-09-23T00:29:50Z")

</div>

I know i can pass a hash to a named\_route, but how do i filter. example i have a bookings\_controller and i want to filter the index lists based on which link is clicked. so something like \<%= link\_to “Current Bookin…

---

## [Cannot break down script into methods](https://www.ruby-forum.com/t/cannot-break-down-script-into-methods/175925)

<div class="topic-metadata">

**Author:** [@Thufir](https://www.ruby-forum.com/u/Thufir)\
**Replies:** 2\
**Last updated:** [September 23, 2009, 12:13am UTC](https://www.ruby-forum.com/t/cannot-break-down-script-into-methods/175925 "2009-09-23T00:13:19Z")

</div>

I’m trying to break this script into methods, but run into an error: thufir@ARRAKIS:~/projects/aggregator$ ruby rss2mysql.rb rss2mysql.rb:19: class definition in method body thufir@ARRAKIS:~/projects/aggregator$ The …

---

## [Bug in Firebug or in RJS? Or something else?](https://www.ruby-forum.com/t/bug-in-firebug-or-in-rjs-or-something-else/96256)

<div class="topic-metadata">

**Author:** [@wpwood](https://www.ruby-forum.com/u/wpwood)\
**Replies:** 3\
**Last updated:** [September 23, 2009, 12:11am UTC](https://www.ruby-forum.com/t/bug-in-firebug-or-in-rjs-or-something-else/96256 "2009-09-23T00:11:18Z")

</div>

I’m getting a really strange result using RJS page.replace\_html and wonder if anybody knows anything that could help me figure it out. I’m rendering a partial in a loop in edit.rhtml that puts a set of s on the page, …

---

## [Translatable columns and default language](https://www.ruby-forum.com/t/translatable-columns-and-default-language/175926)

<div class="topic-metadata">

**Author:** [@lis2](https://www.ruby-forum.com/u/lis2)\
**Replies:** 0\
**Last updated:** [September 23, 2009, 12:10am UTC](https://www.ruby-forum.com/t/translatable-columns-and-default-language/175926 "2009-09-23T00:10:09Z")

</div>

Hello. I use plugin translatable\_column. In admin panel user can add title in two languages(english and german) In application I wish that if language is german and the title in german isn\`t added, rails should show …

---

## [Nested comments system](https://www.ruby-forum.com/t/nested-comments-system/175923)

<div class="topic-metadata">

**Author:** [@vladk](https://www.ruby-forum.com/u/vladk)\
**Replies:** 4\
**Last updated:** [September 22, 2009, 11:32pm UTC](https://www.ruby-forum.com/t/nested-comments-system/175923 "2009-09-22T23:32:12Z")

</div>

Hi everybody! Since theres not much documentation for awasome\_nested\_set , acts\_as\_commentable etc , im trying to build the nested comments in easy way : event.rb … has\_many :comments … comment.rb … belongs\_to :e…

---

## [AJAX and RESTful routes](https://www.ruby-forum.com/t/ajax-and-restful-routes/175921)

<div class="topic-metadata">

**Author:** [@oldbug](https://www.ruby-forum.com/u/oldbug)\
**Replies:** 1\
**Last updated:** [September 22, 2009, 10:00pm UTC](https://www.ruby-forum.com/t/ajax-and-restful-routes/175921 "2009-09-22T22:00:16Z")

</div>

Is there a standard approach to the controller actions that exist solely to populate data do be shown in a view when using RESTful routing? I understand and almost appreciate the 7 actions that exist to implement the…

---

## [Decompose ActiveRecord script into methods](https://www.ruby-forum.com/t/decompose-activerecord-script-into-methods/175911)

<div class="topic-metadata">

**Author:** [@Thufir](https://www.ruby-forum.com/u/Thufir)\
**Replies:** 1\
**Last updated:** [September 22, 2009, 7:37pm UTC](https://www.ruby-forum.com/t/decompose-activerecord-script-into-methods/175911 "2009-09-22T19:37:42Z")

</div>

If I commend out the def and end lines for the “all” method, the script runs fine. However, the goal is to decompose the script into several methods, which fails with: thufir@ARRAKIS:~/projects/aggregator$ thufir@…

---

## [Accessing the instance variable in another method](https://www.ruby-forum.com/t/accessing-the-instance-variable-in-another-method/197098)

<div class="topic-metadata">

**Author:** [@subashinikumar](https://www.ruby-forum.com/u/subashinikumar)\
**Replies:** 5\
**Last updated:** [September 22, 2009, 6:07pm UTC](https://www.ruby-forum.com/t/accessing-the-instance-variable-in-another-method/197098 "2009-09-22T18:07:57Z")

</div>

Hi, I am new to Rails.I tried developing a basic quiz application.Please help me out in my doubt.Thanks in advance \<% CODE %\> class QuizController \< ApplicationController def index i have retrieved the first five q…

---

## [Rspec\_scaffold URL generation errors](https://www.ruby-forum.com/t/rspec-scaffold-url-generation-errors/175899)

<div class="topic-metadata">

**Author:** [@comtux](https://www.ruby-forum.com/u/comtux)\
**Replies:** 5\
**Last updated:** [September 22, 2009, 5:27pm UTC](https://www.ruby-forum.com/t/rspec-scaffold-url-generation-errors/175899 "2009-09-22T17:27:25Z")

</div>

I am using Rails 2.3.4 and when I use rspec\_scaffold the code that is generated does not work without modification. For example, the link\_to that is generated for a show \<%= link\_to 'Show', invoice\_payment %\> fails w…

---

## [Rails + SQLServer](https://www.ruby-forum.com/t/rails-sqlserver/175902)

<div class="topic-metadata">

**Author:** [@michbukana](https://www.ruby-forum.com/u/michbukana)\
**Replies:** 1\
**Last updated:** [September 22, 2009, 4:43pm UTC](https://www.ruby-forum.com/t/rails-sqlserver/175902 "2009-09-22T16:43:15Z")

</div>

Hello people, I am starting to build an application in Rails using SQLServer. In fact, I’m rebuilding it from Java EE to Rails. I created a new project and managed to connect to the database using ODBC, so I ran a ra…

---

## [What am I doing wrong?](https://www.ruby-forum.com/t/what-am-i-doing-wrong/175894)

<div class="topic-metadata">

**Author:** [@pl\_helpme](https://www.ruby-forum.com/u/pl_helpme)\
**Replies:** 3\
**Last updated:** [September 22, 2009, 3:27pm UTC](https://www.ruby-forum.com/t/what-am-i-doing-wrong/175894 "2009-09-22T15:27:32Z")

</div>

Hello, I’m trying to display chat messages from different users, and the content is to be read from respective partials. When I render the partials, I get the following error: \`@…’ is not allowed as an instance varia…

---

## [Query for a specific day and month of a date](https://www.ruby-forum.com/t/query-for-a-specific-day-and-month-of-a-date/175863)

<div class="topic-metadata">

**Author:** [@juanmac](https://www.ruby-forum.com/u/juanmac)\
**Replies:** 6\
**Last updated:** [September 22, 2009, 2:28pm UTC](https://www.ruby-forum.com/t/query-for-a-specific-day-and-month-of-a-date/175863 "2009-09-22T14:28:20Z")

</div>

Hi all! I have a table with the birthdays of users and I want my app to list all users who birthdays today. If today is 21/09/2009, I need all the rows which have the field b\_date 21/09. How can I get that condition…

---

## [What's the correct way to delete old sessions](https://www.ruby-forum.com/t/whats-the-correct-way-to-delete-old-sessions/175715)

<div class="topic-metadata">

**Author:** [@TRBNGR](https://www.ruby-forum.com/u/TRBNGR)\
**Replies:** 13\
**Last updated:** [September 22, 2009, 2:23pm UTC](https://www.ruby-forum.com/t/whats-the-correct-way-to-delete-old-sessions/175715 "2009-09-22T14:23:40Z")

</div>

Ok, I tried searching for the answer to this but couldn’t find a thread about it, so here goes… I’m using sessions that I am storing in the database, is there an accepted rails way of deleting out the old sessions? U…

---

## [Sessions are disabled with "config.cache\_classes =true"](https://www.ruby-forum.com/t/sessions-are-disabled-with-config-cache-classes-true/175890)

<div class="topic-metadata">

**Author:** [@k560](https://www.ruby-forum.com/u/k560)\
**Replies:** 0\
**Last updated:** [September 22, 2009, 10:09am UTC](https://www.ruby-forum.com/t/sessions-are-disabled-with-config-cache-classes-true/175890 "2009-09-22T10:09:54Z")

</div>

Hi. I found that sessions are disabled and can’t login with restful\_authentication. Session and login works fine with “config.cache\_classes = false” but it doesn’t work with “config.cache\_classes = true”. It doesn’t…

---

## [Plugin Install from tgz or zip file](https://www.ruby-forum.com/t/plugin-install-from-tgz-or-zip-file/175867)

<div class="topic-metadata">

**Author:** [@Josh\_White](https://www.ruby-forum.com/u/Josh_White)\
**Replies:** 4\
**Last updated:** [September 22, 2009, 7:56am UTC](https://www.ruby-forum.com/t/plugin-install-from-tgz-or-zip-file/175867 "2009-09-22T07:56:53Z")

</div>

I have a plugin I need to install on my bluehost rails app. Using ./script/plugin install git://github.com/ambethia/recaptcha.git My command line is giving me no response. It doesn’t seem to try or even fail, just the…

---

## [Associate HABTM Model on Create? Passing in a user\_id?](https://www.ruby-forum.com/t/associate-habtm-model-on-create-passing-in-a-user-id/175881)

<div class="topic-metadata">

**Author:** [@mgiorno](https://www.ruby-forum.com/u/mgiorno)\
**Replies:** 0\
**Last updated:** [September 22, 2009, 5:12am UTC](https://www.ruby-forum.com/t/associate-habtm-model-on-create-passing-in-a-user-id/175881 "2009-09-22T05:12:53Z")

</div>

Hi, Could anyone help me pass a user\_id when creating a child record with a HABTM relationship? I’m basically trying to create a record from the following url /users/:id/tasks/new I tried several variants of the fo…

---

## [Routes and urls: www.example.com](https://www.ruby-forum.com/t/routes-and-urls-www-example-com/175802)

<div class="topic-metadata">

**Author:** [@indigoi](https://www.ruby-forum.com/u/indigoi)\
**Replies:** 2\
**Last updated:** [September 22, 2009, 4:49am UTC](https://www.ruby-forum.com/t/routes-and-urls-www-example-com/175802 "2009-09-22T04:49:09Z")

</div>

I’m building an application that stores links, but i’ve run into a problem with routing. If my routes.rb looks like this: map.widget ‘/widget/show/:url’, :controller =\> “widget”, :action =\> “show” then when i go to /…

---

## [Ruby on Rails User Management Engine/Framework? (with web pages)](https://www.ruby-forum.com/t/ruby-on-rails-user-management-engine-framework-with-web-pages/175879)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 0\
**Last updated:** [September 22, 2009, 1:53am UTC](https://www.ruby-forum.com/t/ruby-on-rails-user-management-engine-framework-with-web-pages/175879 "2009-09-22T01:53:33Z")

</div>

Hi, There are quite a few post/recommendations re Rails authorization plugins. What I’m asking here however is whether there is a popular/good Ruby on Rails Engine (or framework) that includes the user interface pag…

---

## [Theme support alternative](https://www.ruby-forum.com/t/theme-support-alternative/175874)

<div class="topic-metadata">

**Author:** [@arvias](https://www.ruby-forum.com/u/arvias)\
**Replies:** 0\
**Last updated:** [September 22, 2009, 12:19am UTC](https://www.ruby-forum.com/t/theme-support-alternative/175874 "2009-09-22T00:19:19Z")

</div>

Hi. Is there any alternative to the theme support plugin? I know it has been ported to 2.3 by James Steward(which did an awesome job). At the same time I am worried that coming 3.0 everything in that code will break.…

---

## [Rails 3.0 status?](https://www.ruby-forum.com/t/rails-3-0-status/175718)

<div class="topic-metadata">

**Author:** [@andkjaer](https://www.ruby-forum.com/u/andkjaer)\
**Replies:** 2\
**Last updated:** [September 22, 2009, 12:07am UTC](https://www.ruby-forum.com/t/rails-3-0-status/175718 "2009-09-22T00:07:36Z")

</div>

Does anybody know how fare they are from finnishing Rails 3.0?

---

## [jRails + Element.show](https://www.ruby-forum.com/t/jrails-element-show/175864)

<div class="topic-metadata">

**Author:** [@Abhishek\_shukla](https://www.ruby-forum.com/u/Abhishek_shukla)\
**Replies:** 2\
**Last updated:** [September 21, 2009, 11:16pm UTC](https://www.ruby-forum.com/t/jrails-element-show/175864 "2009-09-21T23:16:06Z")

</div>

Hello Friends, I am using jRails no prototype.js. rails helper are working fine but problem with the spinner. Element.show(’#spinner’);", is not working. It will be great is someone can help me. Thanks Abhis

---

## [Set a select box with default value selected](https://www.ruby-forum.com/t/set-a-select-box-with-default-value-selected/175501)

<div class="topic-metadata">

**Author:** [@deostroll](https://www.ruby-forum.com/u/deostroll)\
**Replies:** 2\
**Last updated:** [September 21, 2009, 10:00pm UTC](https://www.ruby-forum.com/t/set-a-select-box-with-default-value-selected/175501 "2009-09-21T22:00:35Z")

</div>

I am relating to the book & subject example mentioned in the tutorial mentioned here: There is a file that goes like show\_subjects.html.erb and it will list all the books for that particular subject we’ve selected. …

---

## [Polymorphic form](https://www.ruby-forum.com/t/polymorphic-form/175866)

<div class="topic-metadata">

**Author:** [@princenamor](https://www.ruby-forum.com/u/princenamor)\
**Replies:** 0\
**Last updated:** [September 21, 2009, 7:57pm UTC](https://www.ruby-forum.com/t/polymorphic-form/175866 "2009-09-21T19:57:02Z")

</div>

I have two partials to deal with contact information. The Contact information uses single-table polymorphism. I want to be able to use save on Contact and set ‘type’ manually, based on the type of form the user is fil…

---

## [Doubly-nested models](https://www.ruby-forum.com/t/doubly-nested-models/175835)

<div class="topic-metadata">

**Author:** [@princenamor](https://www.ruby-forum.com/u/princenamor)\
**Replies:** 3\
**Last updated:** [September 21, 2009, 7:51pm UTC](https://www.ruby-forum.com/t/doubly-nested-models/175835 "2009-09-21T19:51:11Z")

</div>

Hi all, I have three models, like so: User belongs\_to :person accepts\_nested\_attributes\_for :person, :allow\_destroy =\> false has\_many :contacts Person has\_many :contacts accepts\_nested\_attributes\_for :contacts, :…

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

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